Skip to content

Instantly share code, notes, and snippets.

@tegansnyder
tegansnyder / truncate_url_rewrites.sql
Created October 6, 2014 18:01
Truncate URL Rewrites Magento
SET FOREIGN_KEY_CHECKS = 0;
TRUNCATE TABLE `core_url_rewrite`;
TRUNCATE TABLE `enterprise_catalog_category_rewrite`;
TRUNCATE TABLE `enterprise_catalog_product_rewrite`;
TRUNCATE TABLE `enterprise_url_rewrite`;
TRUNCATE TABLE `enterprise_url_rewrite_category_cl`;
TRUNCATE TABLE `enterprise_url_rewrite_product_cl`;
TRUNCATE TABLE `enterprise_url_rewrite_redirect_cl`;
TRUNCATE TABLE `enterprise_url_rewrite_redirect_rewrite`;
TRUNCATE TABLE `enterprise_url_rewrite_redirect`;
@tegansnyder
tegansnyder / order-report.sql
Created August 12, 2014 02:37
Order Report MySQL - Magento example
SELECT so.increment_id,
status,
so.customer_id,
so.base_grand_total,
so.base_total_paid,
c.email,
so.created_at,
so.shipping_name,
sku,
qty_ordered,
@tegansnyder
tegansnyder / magento-ecg-phpcs.md
Last active October 27, 2015 19:14
Using PHPCS Code Sniffer with the Magento ECG coding standard: https://github.com/magento-ecg/coding-standard
phpcs -pv --report-full=full.txt --report-summary=summary.txt \
--standard=ecg --extensions=php,inc,lib,phtml /var/my_code
@Vinai
Vinai / example.php
Created October 7, 2013 15:58
Set Product Group Price using setData()
$product->setData('group_price', array(
array(
'website_id' => 0,
'cust_group' => $customerGroupId,
'price' => 19.99
)
));