Questions tagged [setup-script]

Installer/Update script

18 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2 votes
0 answers
261 views

Magento 2 - How To Generate Custom Data Fixture For Integration Testing

I'm required to generate 1000+ orders to test an integration + address verification. I've come across this data generation technique in my search and wish to create my own data fixture based off: ...
Chris Rogers's user avatar
2 votes
0 answers
128 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
2 votes
0 answers
31 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 ...
Suman Singh's user avatar
  • 1,007
2 votes
1 answer
644 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 ...
Jens's user avatar
  • 401
2 votes
2 answers
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:...
Matheus Silva Itep's user avatar
1 vote
0 answers
160 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
1 vote
0 answers
43 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 ...
anonymous's user avatar
  • 3,742
1 vote
0 answers
58 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 ...
PY Yick's user avatar
  • 2,705
1 vote
1 answer
35 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 ...
Rafael Kassner's user avatar
1 vote
1 answer
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, ...
Pawankumar's user avatar
1 vote
1 answer
350 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 $...
Timon de Groot's user avatar
0 votes
0 answers
19 views

Return product attribute object after creation

I've made a class to create product attributes on the fly. After creating it I want to return it immediately. However getAttributeByCode() returns NULL. When I start another process the ...
jrswgtr's user avatar
  • 63
0 votes
2 answers
79 views

Create custom attribute for specifi product

i'm tring to create a custom attribute only for a specific product. Into apply_to field i have setted a list "configurable, grouped" , a array('configurable', 'grouped') or single type, but ...
user3665773's user avatar
0 votes
2 answers
63 views

Magento 1.9: Sql setup Stripe module not execute

I'm installing throught composer the Stripe module, the problem is that when I installed the site, where the module work, crash because can't find the table in Database. I don't know why the setup sql ...
Luca's user avatar
  • 1
0 votes
0 answers
140 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', '...
gabtzi's user avatar
  • 656
0 votes
2 answers
271 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 ...
F1sh's user avatar
  • 1
0 votes
0 answers
319 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
  • 847
0 votes
0 answers
487 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\...
Anshu Mishra's user avatar
  • 8,960