Questions tagged [setup-script]

Installer/Update script

19 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
0answers
80 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? ...
2
votes
0answers
30 views

Send email to admin during extension installation?

I want to send an email to admin (website owner) to notify that our extension has been installed in your web store. For that, I have developing an extension but not getting any way to shoot the email ...
2
votes
1answer
473 views

Magento 2.2: InstallData script never called even though no entry in setup_module

Hello I have created a module in accordance to the tutorial at Magento Docs My InstallData class looks like this: <?php /** * Copyright © 2016 Magento. All rights reserved. * See COPYING.txt ...
2
votes
2answers
2k views

MG2 Integration give error Unable to post data to consumer due to an unexpected error

I'm follow the http://devdocs.magento.com/guides/v2.0/howdoi/webapi/integration.html and i have an error when i try do activates the integrator. [2017-06-20 05:22:08] main.CRITICAL: Exception: Notice:...
1
vote
0answers
90 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 ...
1
vote
0answers
25 views

When Installer Class Execute

I am trying to Implement same thing Magento is doing when we run web installer wizard. Magento is creating sample data (Attributes, Products, Categories) using Setup\SampleData\InstallerInterface ...
1
vote
0answers
33 views

Problems While Creating Product Attribute With InstallData

I've created InstallData for creating product attribute with default options to be set yes like, used_in_product_listing and is_used_for_promo_rules Probelm is only used_in_product_listing is ...
1
vote
1answer
177 views

How do I find all valid array keys for the EavSetup::addAttribute method?

When adding an EAV attribute in an install script (Setup/InstallData.php or Setup/UpgradeData.php), the third argument to the addAttribute method is an array of information customizing the created ...
1
vote
0answers
54 views

Is it necessary to addIndex() on Setup Script?

I'm writing a setup script for my new module. I found that there are many setup scripts in InstallSchema.php contains addIndex(). But after I found some info on W3School, seems it's just a performance ...
1
vote
1answer
32 views

How to avoid huge setup scripts?

The approach I've seen so far to handle setup scripts is the version_compare: namespace My\Module\Setup; class UpgradeSchema implements \Magento\Framework\Setup\UpgradeSchemaInterface; { public ...
1
vote
1answer
2k views

Magento 2 module “data_version - not upgrading"?

In Magento 2.0 I have written UpgradeData and UpgradeSchema and I have changed the setup_version in module.xml. After that I run php bin/magento setup:upgrade After this in the database, ...
1
vote
1answer
335 views

Add subscriber status to flat order grid

I'm trying to add subscriber status to sales_flat_order_grid. I already got postcode working, but now I'm kind of stuck. This is what I've tried so far: startSetup(); // Add column to grid table $...
0
votes
0answers
19 views

boolean order attribute won't save correctly in Magento 1.9

I have created my boolean order attribute /* @var $installer \Mage_Sales_Model_Resource_Setup */ $installer = $this; $installer->startSetup(); $smsAttribute = [ 'type' => 'int', '...
0
votes
0answers
13 views

How to update all bundle products

How to add a new Bundle item to all products? Is there a way in Magento to update all of these products? I have not found a normal example at the moment
0
votes
0answers
10 views

Add new option for existing bundle products

Can't find an example for adding new Bundle Items to existing Bundle products. I'm looking for an implementation like Upgrade Script or something similar, but I found an implementation for magento 1 ...
0
votes
0answers
11 views

Update all bundle products add new options and add products to this option by id?

I have 50 bundle products. I need to add a new option to all products, and add products by id to it, how can I implement this programmatically? Magento 2.2.2
0
votes
2answers
91 views

Database not creating tables for new extensions on bin/magento setup:upgrade. Declarative Schema is not up to date

I installed Magento 2.3 successfully, with custom style sheet and Mageplaza Blog ext which all works fine. I wanted to install a slider module and I have done this through ssh. Composer installs the ...
0
votes
0answers
177 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 ...
0
votes
0answers
331 views

setup:upgrade stuck exit at installing Data

I have created following Setup Script <?php namespace Anshu\Custom\Setup; use Magento\Framework\Setup\ModuleDataSetupInterface; use Magento\Framework\Setup\ModuleContextInterface; use Magento\...