Questions tagged [install-script]

Denotes questions related to install scripts. Install scripts are scripts that are used for installation purposes. This installation may be of a software program or any other code routine.

Filter by
Sorted by
Tagged with
0 votes
0 answers
24 views

Customize profile Magento 2 Performance Toolkit

I want to generate 100000 products for performance testing. I using the magento performance toolkit and try to edit setup/performance-toolkit/profiles/ce/large.xml from 30000 to 100000 products. But ...
Mạnh Hùng Nguyễn Xuân's user avatar
0 votes
1 answer
166 views

Magento 2.4: Programmatically add an attribute from the default set to a custom attribute

I'm aiming to programmatically create a custom attribute set during setup. The attribute set should not inherit from the default set, but it should copy some of the default attributes. For example, ...
Muckee's user avatar
  • 689
2 votes
2 answers
2k views

Too many arguments, expected arguments "command"

Hi, can anyone help to identify how to fix this? I am installing from a Magento 2.4 Script onto ubuntu 20.04. Thanks
Simon Hegarty's user avatar
2 votes
3 answers
47 views

How to run the this code for Magento 2.3 version

I run the following code in magento2.3 but it's showing Class \Mastering\Itdesire\Setup\Mastering\Itdesire\Setup\InstallData does not exist error. Content of InstallData.php: <?php /* * To ...
Ankita's user avatar
  • 21
0 votes
1 answer
68 views

InstallSchema Doesn't Run

I've got a module that has this InstallSchema: <?php namespace Vendor\Module\Setup; class InstallSchema implements \Magento\Framework\Setup\InstallSchemaInterface { public ...
treyBake's user avatar
  • 131
2 votes
1 answer
1k views

Magento 2 how to add data to custom column in sales_order table

I wan't to add data in a custom field that I created, I used InstallSchema like this: Setup/InstallSchema.php use Magento\Framework\Setup\InstallSchemaInterface; use Magento\Framework\Setup\...
Oscar Vazquez's user avatar
0 votes
0 answers
143 views

How to create extension in Magento 2.3.3?

I am familiar with Magento 2 extension development but can anyone explain step by step extension development changes in Magento 2.3.3 by writing a simple "Hello_World" extension. In Magento 2.3.x no ...
Sanjay Gohil's user avatar
  • 2,180
3 votes
2 answers
2k views

Magento 2 : create view table via setup script

How do you create a view table via setup script Direct sql CREATE OR REPLACE VIEW... etc Or is there a magento way? Update Thanks for your suggestions so far. I'm asking whether possible to ...
Dominic Pixie's user avatar
4 votes
0 answers
202 views

How to reinstall module without any downtime or trigger InstallSchema.php on already installed module?

I am trying to reinstall a module on Magento ver. 2.2.8 to trigger the InstallSchema.php of a module without any downtime. My question: Is there a way of reinstalling the module or at least running ...
Greg's user avatar
  • 2,899
0 votes
3 answers
617 views

Custom script leading to 404 in M2

I want to create a custom script for this I have created folder test on root and two files inside folder index.php , test.php My index.php Looks like require DIR . '../../app/bootstrap.php'; ...
Daniel_12's user avatar
  • 670
2 votes
2 answers
2k views

How to check if column exist before trying to add it to the table?

We are using the Extension FollowUp E-Mail from AheadWorks. The Extension has bugs in the sql install scripts... they are trying to add a column to a table but don't check if the column does already ...
Black's user avatar
  • 3,100
1 vote
0 answers
73 views

InstallScheme Script for dynamic rows Magento 2

I have created dynamic rows on product creation form. I have to save their value in custom table and retrieve as a dropdown on frontend product detail page w.r.t product ID. I am aware of the event ...
Ajwad Syed's user avatar
  • 1,591
0 votes
1 answer
538 views

How to add a new field to Custom Options

How can I extend the "Custom Options" in a configurable product? I need to add a new field named Identifier. Where can I find the necessary templates? I figured out that the template is in app\design\...
Black's user avatar
  • 3,100
0 votes
1 answer
53 views

Magento1 website Security patch installation by script

Magento1 my website i have installing following Security patch: Security patch 10975 Security patch 10415 Security patch 9767 Security patch 8788 Security patch 7405 but i want script in my root ...
MehulKanjariya's user avatar
1 vote
1 answer
538 views

Magento 2 : Foreing key constraint issue

I'm trying to save records using the controller. I set foreign key in attribute_set_id and entity_type_id field in main table with eav_attribute_set and eav_entity_type respectivelly. But, when I ...
Emipro Technologies Pvt. Ltd.'s user avatar
1 vote
1 answer
1k views

Error Add Foreign Key Using Install Schema Magento 2

<?php namespace Magneto\BookFreeLayout\Setup; use Magento\Framework\Setup\InstallSchemaInterface; use Magento\Framework\Setup\ModuleContextInterface; use Magento\Framework\Setup\...
Harsh Jayswal's user avatar
0 votes
1 answer
219 views

adding custom attribute to category

I'm trying to add a new custom image attribute for category, following the guide here "https://webkul.com/blog/add-custom-image-attribute-category-magento-2/comment-page-1/#comment-16835" However, ...
Mage Explorer's user avatar
0 votes
0 answers
290 views

How to add a Megamenu programmatically in Magento 2?

I need to add Megamenu via an install/upgrade script. I've added my megamenu. I've figured out which tables get updated when I add Megamenu. The table which gets updated is mgs_megamenu ...
summu's user avatar
  • 837
0 votes
1 answer
31 views

Is there a way to perform a silent installation of Magento through a bash code?

Is there a way to perform a silent installation of Magento through a bash code? This is what I have in my bash: ... ... PRJ_MAGENTO_PUBK=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx PRJ_MAGENTO_PRVK=...
IgorAlves's user avatar
  • 189
3 votes
3 answers
1k views

Question about UpgradeSchema and UpgradeData files

Sorry, I'm new in using Magento 2. In my UpgradeSchema.php I would like to add a column to my table and in my UpgradeData.php I would like to add new records to the table. In both the file i have ...
Foo79's user avatar
  • 31
2 votes
1 answer
852 views

how to add collation( utf8_general_ci) using install schema in magento2?

I want to create table using install schema in magento2 with column collation( utf8_general_ci) . how to do this?
Rutvee Sojitra's user avatar
0 votes
2 answers
1k views

Magento 2 get database prefix on install data

How to get database table prefix on install data? It is showing "table or view not found". <?php namespace ...; use Magento\Eav\Setup\EavSetupFactory; use Magento\Framework\Setup\...
akshay billore's user avatar
1 vote
4 answers
288 views

InstallSchema.php not working in magento2

I have been trying to create a table from InstallSchema.php, but some reason the table is getting created. I haved created a bare minimum module with the following files. 1. registration.php <...
Rehan's user avatar
  • 15
0 votes
1 answer
337 views

Magento 2 Custom module installation time create media directory

I want to create media directory with 777 recursive permission on custom module installation time, So I have created createDirectory function in InstallSchema. But currently directory is created with ...
Himanshu's user avatar
  • 1,731
2 votes
0 answers
127 views

Insert data into core db table

I need to run this SQL query on Magento, but since I have a multi-tenant solution, it need to be done through Data/Install scripts as it will run every time a new client comes in. What should I use? ...
rrmesquita's user avatar
4 votes
1 answer
97 views

Custom Page Form and db insertion magento 2

I have created a custom Form and try to store details in databse. but the product url field and image url is not saved in db. app/code/Dyode/Pricebeat/Controller/User/Post.php <?php namespace ...
Nismath vi's user avatar
0 votes
1 answer
314 views

Wrong attribute set ID Mage_Eav_Model_Entity_Setup

I have been receiving this error. Error: mysql4-install-1.0.php" - Wrong attribute set ID";i:1;s:1016:"#0 /Applications/MAMP/htdocs/flicdes/app/code/core/Mage/Core/Model/Resource/Setup.php(644): ...
L.TurT's user avatar
  • 3
1 vote
1 answer
528 views

Install script not running

I know there's a million of these questions with answers but I still can't solve this. It does create the line in the core_resource table, but my install script is supposed to die to show it's running,...
ctrl-z pls's user avatar
0 votes
1 answer
235 views

Magento 1.9 add attribute to Credit memo item

I am trying to add a quantity to return to stock data to the credit memo item. I have made 2 install scripts. One adds a column to the database <?php $installer = $this; $installer->...
Igor  Ivanov's user avatar
0 votes
2 answers
352 views

How to create custom widget via Install?

I need to create widget category link via Upgrade. How to do this?
Duddy Woody's user avatar
1 vote
0 answers
155 views

Magento 2 : Call a function at the time of module installation

I want to call a function to send some store information through api call at the time of my custom module installation. Is there any event observer for this? How can we do it? Thanks. class ...
subhas's user avatar
  • 53
0 votes
3 answers
4k views

Force-run module install script in Magento 2

I have added some install data to my module (EAV attributes), and it doesn't look like it's working. However, I don't seem to get any relevant errors in the logs, and am a bit lost on whether the ...
Ynhockey's user avatar
  • 265
6 votes
2 answers
5k views

How to fix this "Running schema recurring.Unique constraint violation found"

How to fix this error "Running schema recurring.Unique constraint violation found". This statement occurs when I used upgrade command of Magento 2 model upgradation.
kaustubh borate's user avatar
3 votes
0 answers
450 views

Magento 2: Filter by custom product/category attribute returns 0 results

I created a bool (int) attribute with a default value of 0 for both category & product entities. I reindexed, cleared cache, etc... Now, no matter what I do, I can't filter the collection using ...
Pini's user avatar
  • 917
2 votes
5 answers
22k views

Magento 2 - Create product attribute programmatically

I have create product attribute of type select select with below configurations: $setup->addAttribute(\Magento\Catalog\Model\Product::ENTITY, 'attribute_code', [ 'attribute_model' =>...
DEEP JOSHI's user avatar
4 votes
2 answers
2k views

Recurring Upgrade Scripts in Magento 2.0, 2.1, or 2.2?

According to this dev doc (emphasis mine) InstallData and InstallSchema scripts, which are executed on a clean (empty) database UpgradeData and UpgradeSchema incremental scripts, which ...
Alana Storm's user avatar
  • 44.2k
1 vote
2 answers
2k views

Magento 2 : Creating widget using install script

I have a custom module for megamenu. I want to create some widgets predefined for the module when the customer installs this module. I have added the below script for creating the widget(widget type: ...
Vindhuja's user avatar
  • 1,365
1 vote
3 answers
5k views

Magento 2 - InstallData.php does not run again after first time

I have created my custom module to add more attributes for customers. The InstallData.php worked perfectly for the first time and added all the attributes I wanted. However, I need to add more ...
Magento Learner's user avatar
0 votes
2 answers
3k views

How to manage InstallData.php File in magento 2

How can I manage my InstallData.php file when I want to create multiple attribute for customer and product? Here, in my InstallData file I have create an attribute for the product. namespace ...
Bhavisha Thaker's user avatar
3 votes
1 answer
5k views

Magento 2 : Create product attribute with select box install script

I'm having issues while creating product attribute with Install Data.php with my custom module. Attribute is crated also with options what i have defined in source but i am facing weird check below ...
anonymous's user avatar
  • 3,724
0 votes
1 answer
525 views

How to do db table collate change using update script?

I am trying to make a collate change (DEFAULT CHARSET=utf8 COLLATE utf8_general_ci) to db but not sure how? (magento1.9) <?php $installer = $this; $installer->startSetup(); $installer->...
gvanto's user avatar
  • 175
0 votes
1 answer
1k views

Magento 2 Install schema

When I am adding column of TYPE_DECIMAL like this ->addColumn( 'credit', Table::TYPE_DECIMAL, null, ['nullable' => false, 'default' => '0.00', 'length' => '10,2'], '...
Abdullah Shahid's user avatar
0 votes
1 answer
260 views

Add new form code for customer_form_attribute in Magento 1.9

I added new customer fields (attributes) by installer in my Magento extension. I want group this fields and show in separate tabs on customer edit page. I can make it in installer with this code ...
newman's user avatar
  • 101
3 votes
2 answers
4k views

Magento 2: Run a uninstall script when module is uninstalled via command line?

I am creating a module and I am progressing it. I am new to Magento 2 so there are a lot of things that I am not yet familiar too. As a module creator, I am curious how to run an uninstall script when ...
Ner's user avatar
  • 1,059
1 vote
2 answers
1k views

Magento 2.2.2 - InstallSchema.php - update multiple tables

While developing a new extension, I'm trying to update two tables at installation time by using Setup\InstallSchema.php. The tables are "admin_user" and "customer_entity", and I basically need the ...
Florin Popescu's user avatar
2 votes
1 answer
301 views

Install and data-install script with different versions?

I have a custom module with several install and upgrade scripts under the sql directory, that create and alter my sql table. When Magento runs the scripts it updates both version and data_version ...
ella_beeriPrint's user avatar
1 vote
0 answers
24 views

After Magento 1 security upgrade, the install scripts are not working

After a security version upgrade to version (1.14.3.6) Enterprise all my update scripts don't work. Whether it's inserting, updating... nothing in the install scripts executes. Anyone with a similar ...
kuhle's user avatar
  • 11
0 votes
0 answers
37 views

Magento2 model save() method connected to db table structure in the install schema

I have a basic model - MyModel. The install schema for the table that the model is working with is $setup ->getConnection() ->newTable('my_table') ->addColumn( 'id', Table::...
Lachezar Raychev's user avatar
0 votes
1 answer
229 views

Table create script not working Magento2

So I followed this tutorial on how to create a module with a table setup script: http://www.mage-world.com/blog/create-a-module-with-custom-database-table-in-magento-2.html I took out a few things ...
treyBake's user avatar
  • 131
0 votes
1 answer
30 views

How to unselect modules in CLI installation

When installing through the web UI wizard, you're given the option to not install certain modules (Customize your store -> Advanced Modules Configurations). Can the same be done with the CLI ...
Mikko Ropanen's user avatar