./mage config-set preferred_state stable
./mage clear-cache
./mage sync
./mage download community Module_Name
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Base-name | |
$name = 'foobar'; | |
// Init Magento | |
require_once 'app/Mage.php'; | |
Mage::app(); | |
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); | |
// Create the root catalog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is how you would use it. Pass in your collection | |
// along with an individual callback as well as a batch callback | |
Mage::getSingleton('stcore/resource_iterator_batched')->walk( | |
$collection, | |
array($this, 'batchIndividual'), | |
array($this, 'batchAfter'), | |
self::BATCH_SIZE | |
); | |
public function batchIndividual($model) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INSERT INTO `cataloginventory_stock_item` ( | |
`item_id` , | |
`product_id` , | |
`stock_id` , | |
`qty` , | |
`min_qty` , | |
`use_config_min_qty` , | |
`is_qty_decimal` , | |
`backorders` , | |
`use_config_backorders` , |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tag_save_after | |
admin_roles_save_after | |
admin_user_save_after | |
review_save_after | |
catalogsearch_query_save_after | |
sales_order_save_after | |
sales_quote_address_save_after | |
sales_quote_payment_save_after | |
sales_quote_item_save_after | |
sales_quote_save_after |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Empty relevant tables | |
DELETE FROM sales_flat_creditmemo; | |
DELETE FROM sales_flat_invoice; | |
DELETE FROM sales_flat_order; | |
DELETE FROM sales_flat_quote; | |
DELETE FROM sales_flat_shipment; | |
DELETE FROM customer_entity; | |
# Reset increment_ids | |
# Beware of store_ids when using multiple stores |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ######################################################################## | |
# api2_acl_attribute | |
# ######################################################################## | |
# IDX_API2_ACL_ATTRIBUTE_USER_TYPE is a left-prefix of UNQ_API2_ACL_ATTRIBUTE_USER_TYPE_RESOURCE_ID_OPERATION | |
# Key definitions: | |
# KEY `IDX_API2_ACL_ATTRIBUTE_USER_TYPE` (`user_type`) | |
# UNIQUE KEY `UNQ_API2_ACL_ATTRIBUTE_USER_TYPE_RESOURCE_ID_OPERATION` (`user_type`,`resource_id`,`operation`), | |
# Column types: | |
# `user_type` varchar(20) not null comment 'type of user' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd"> | |
<acl> | |
<resources> | |
<resource id="Magento_Backend::admin"> | |
</resource> | |
</resources> | |
</acl> | |
</config> |
Magento 2.3.7 and 2.4.2 ship with composer v2 support out of the box but as far as I can see the only thing that needs to happen is to use some more modern versions of certain composer plugins which are used by certain dependencies of Magento.
This means we should be able to add composer v2 support to older Magento2 versions as well if we get a bit creative.
See below for diffs of the composer.json
files you can apply to your projects, be sure to keep a mental note of these things, they will need to maintained by yourself in case newer versions of these modules are released. And if one day you update to Magento 2.3.7 or 2.4.2 or higher, you can remove these changes again.
OlderNewer