Skip to content

Instantly share code, notes, and snippets.

View twosg's full-sized avatar

Sven Geiß twosg

View GitHub Profile
@twosg
twosg / pt-duplicate-key-checker.sql
Created February 5, 2023 15:10 — forked from SchumacherFM/pt-duplicate-key-checker.sql
pt-duplicate-key-checker for Magento 1.8 MySQL database. Less indexes the faster the update/insert statement
# ########################################################################
# 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'
@twosg
twosg / removeTestDataResetEntitySeries.sql
Created October 15, 2017 18:36 — forked from peterjaap/removeTestDataResetEntitySeries.sql
Remove orders, invoices, shipments, creditmemos, customers and quotes from Magento
# 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

Magento Code Snippets

Download extension manually using mage

./mage config-set preferred_state stable
./mage clear-cache
./mage sync
./mage download community Module_Name
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` ,