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 | |
$code = 'color'; | |
$opts = Mage::getSingleton('eav/config') | |
->getAttribute('catalog_product', $code) | |
->getSource() | |
->getAllOptions(false); | |
foreach($opts as $opt) { |
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 | |
/** | |
* Short description of module | |
* | |
* PHP version 5 | |
* | |
* @category Kering | |
* @package Kering_Modulename | |
* @author Kering Magento Team <magento@kering.com> | |
* @copyright 2015 Kering |
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
select | |
eu_flat.entity_id, | |
eu_flat.sku, | |
def_eav.value default_eav_price, | |
eu_eav.value eu_eav_price, | |
eu_flat.price eu_flat_price | |
from catalog_product_flat_3 eu_flat | |
inner join catalog_product_entity_decimal eu_eav | |
on eu_flat.entity_id = eu_eav.entity_id | |
and eu_eav.attribute_id = 75 |
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
#!/bin/bash | |
DOMAIN=example.com | |
wget -w 2 -r --spider --delete-after -nd -nc --domains=$DOMAIN $DOMAIN > /dev/null 2>&1 & |
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
-- Make sure to uncomment one of the where conditions below or your query will take forever | |
select | |
lu.visit_time, | |
inet_ntoa(lvi.server_addr) server_addr, | |
inet_ntoa(lvi.remote_addr) remote_addr, | |
lui.url, | |
lc.customer_id, | |
ce.email, | |
cs.name store, | |
lvi.http_user_agent, |
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
<script> | |
var settings = { | |
exclude: ["US"], | |
regionselector: "example.com/regionselector", | |
homepages: { | |
"US": "example.com", | |
"DE": "example.com/de", | |
"FR": "example.com/fr", | |
"EU": "example.com/eu" | |
} |
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 takes about 30 seconds, but will make the next query a billion times faster | |
alter table sales_flat_order_item add index (product_id); | |
-- This takes about 5 seconds with the index added | |
select | |
cpe.entity_id product_id, | |
cpe.sku, | |
at_style_number.value style_number, | |
cpe.created_at product_created_date, | |
sum(sfoi.qty_ordered) total_ordered, |
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
select | |
sfo.entity_id, | |
sfo.increment_id, | |
sfo.created_at, | |
sfo.status, | |
sfo.state, | |
sfo.customer_id, | |
sfo.ap21_order_id, | |
sfo.ap21_person_id, | |
ce.email, |
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
jQuery('.nestedlisting .give-gold').each(function (i, that) { | |
setTimeout(function() { | |
jQuery(that).click(); | |
}, i * 1000); | |
}); | |
jQuery('button.btn.gold-button[type=button]:visible').each(function (i, that) { | |
setTimeout(function() { | |
jQuery(that).click(); | |
}, i * 1000); | |
}); |
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
set @lifecycle_attr_id = 144; | |
set @isorderable_attr_id = 151; | |
set @ispreorderable_attr_id = 186; | |
set @lifecycle_attr_value_active = 23; | |
set @lifecycle_attr_value_prerelease = 155; | |
select | |
cpe.entity_id product_id, | |
cpe.sku |