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 | |
count(product_id), | |
sum(cataloginventory_stock_item.qty) as child_qty, | |
sum(cataloginventory_stock_item.is_in_stock) > 0 as some_child_in_stock | |
FROM cataloginventory_stock_item | |
WHERE product_id in ( | |
SELECT | |
parent.product_id | |
FROM | |
catalog_product_super_link as parent |
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 DISTINCT | |
catalog_product_entity.entity_id, | |
catalog_product_entity.sku, | |
catalog_product_entity.type_id, | |
cataloginventory_stock_item.qty AS `stock qty`, | |
cataloginventory_stock_item.is_in_stock, | |
cataloginventory_stock_status_idx.qty AS `idx qty`, | |
cataloginventory_stock_status_idx.stock_status | |
FROM cataloginventory_stock_item INNER JOIN cataloginventory_stock_status_idx ON cataloginventory_stock_item.product_id = cataloginventory_stock_status_idx.product_id | |
INNER JOIN catalog_product_entity ON catalog_product_entity.entity_id = cataloginventory_stock_item.product_id |
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
# General web stuff | |
/.htaccess | |
/robots.txt | |
/sitemap.xml | |
/google* | |
# Dynamic Magento data that doesn't need to be in the repo | |
/var/* | |
/media/* |
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 | |
table_schema as "db name", | |
SUM( data_length + index_length) / 1024 / 1024 as "Data Base Size in MB" | |
FROM | |
information_schema.TABLES | |
GROUP BY | |
table_schema; |
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
Update Expires time to increase Browser Caching | |
At the beginning of the <IfModule mod_expires.c> section replace | |
<IfModule mod_expires.c> | |
############################################ | |
## Add default Expires header | |
## http://developer.yahoo.com/performance/rules.html#expires | |
ExpiresDefault "access plus 1 year" |
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
tail -n +2 filename.csv | split -l 25000 - filename_ | |
for file in filename_* | |
do | |
head -n 1 filename.csv > tmp_file | |
cat $file >> tmp_file | |
mv -f tmp_file $file.csv | |
done |
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
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?> | |
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 4.4.0-c007 1.126898, 2008/09/29-20:23:32 "> | |
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> | |
<rdf:Description rdf:about="" | |
xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/" | |
xmlns:stCamera="http://ns.adobe.com/photoshop/1.0/camera-profile"> | |
<photoshop:CameraProfiles> | |
<rdf:Seq> | |
<rdf:li rdf:parseType="Resource"> | |
<stCamera:Author>Thomas Berndt (www.photo-worX.de) - Modified for Sony by Greg Croasdill</stCamera:Author> |
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 | |
IGNORE_TABLES=( dataflow_batch_export dataflow_batch_import log_customer log_quote log_summary log_summary_type log_url log_url_info log_visitor log_visitor_info log_visitor_online report_viewed_product_index report_compared_product_index report_event index_event enterprise_logging_event_changes ) | |
CONFIG_FILE="./app/etc/local.xml" | |
IGNORE_STRING="" | |
TMP_FILE="./var/.tmp.local.xml" | |
if [ ! -f "$CONFIG_FILE" ]; then | |
echo "$CONFIG_FILE does not exist" | |
exit |
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 | |
parent.sku as 'sku', | |
eav.attribute_code as 'configurable_attribute', | |
GROUP_CONCAT(child.sku SEPARATOR ',') as 'simples_skus' | |
FROM catalog_product_super_link | |
INNER JOIN catalog_product_entity as child ON catalog_product_super_link.product_id = child.entity_id | |
INNER JOIN catalog_product_entity as parent ON catalog_product_super_link.parent_id = parent.entity_id | |
INNER JOIN catalog_product_super_attribute as super ON super.product_id = parent.entity_id | |
INNER JOIN eav_attribute as eav ON eav.attribute_id = super.attribute_id | |
Group By parent.sku |
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
//assumes you are using the PHPToolKit and have already | |
// require_once 'lib/NetSuite/NetSuiteService.php'; | |
private function _getNsPromoCode($magePromoCode){ | |
$service = new NetSuiteService(); | |
//get the ID of the coupon by code | |
$searchData = new SearchStringField(); | |
$searchData->operator = "is"; | |
$searchData->searchValue = $magePromoCode; |
OlderNewer