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 b.email, c.value AS name,d.value as lastname, a.updated_at, e.added_at, e.product_id, f.sku, f.name, f.price, SUM(h.qty_ordered) AS purchased | |
FROM `mage_wishlist` AS a | |
INNER JOIN mage_customer_entity AS b ON a.customer_id = b.entity_id | |
INNER JOIN mage_customer_entity_varchar AS c ON a.customer_id = c.entity_id AND c.attribute_id = (SELECT attribute_id FROM mage_eav_attribute WHERE attribute_code = 'firstname' AND entity_type_id = b.entity_type_id) | |
INNER JOIN mage_customer_entity_varchar AS d ON a.customer_id = d.entity_id AND d.attribute_id = (SELECT attribute_id FROM mage_eav_attribute WHERE attribute_code = 'lastname' AND entity_type_id = b.entity_type_id) | |
INNER JOIN mage_wishlist_item AS e ON a.wishlist_id = e.wishlist_id | |
INNER JOIN mage_catalog_product_flat_1 AS f ON e.product_id = f.entity_id | |
LEFT JOIN mage_sales_flat_order AS g ON g.customer_email = b.email | |
LEFT JOIN mage_sales_flat_order_item AS h ON (g.entity_id = h.order_id AND h.sku LIKE CONCAT(f.sku,'%') AND h.product_type = 'simple') | |
GROUP |
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 `main_table`.*, | |
`product_option`.`product_id` AS `entity_id`, | |
`product_option`.`option_id` AS `option_id`, | |
`store_value_title`.`title` AS `store_title`, | |
`default_value_id`.`option_type_id` AS `default_value_type_id`, | |
`default_value_title`.`title` AS `default_title` | |
FROM `catalog_product_entity` AS `main_table` | |
INNER JOIN `catalog_product_option` AS `product_option` | |
ON product_option.product_id = main_table.entity_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
<?php | |
define('MAGENTO_ROOT', "/var/www/web"); | |
$mageFilename = MAGENTO_ROOT . '/app/Mage.php'; | |
require_once $mageFilename; | |
umask(0); | |
Mage::app(); |
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 a basic VCL configuration file for PageCache powered by Varnish for Magento module. | |
# default backend definition. Set this to point to your content server. | |
backend default { | |
.host = "127.0.0.1"; | |
.port = "8000"; | |
.first_byte_timeout = 300s; | |
} | |
# add your Magento server IP to allow purges from the backend |
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
// Instantiate Magento | |
define('MAGENTO_ROOT', "shop"); | |
$mageFilename = MAGENTO_ROOT . '/app/Mage.php'; | |
require_once $mageFilename; | |
umask(0); | |
Mage::init(); | |
//$orderIds = array('100006363'); | |
// |
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
define('MAGENTO_ROOT', "/path/to/magento"); | |
$mageFilename = MAGENTO_ROOT . '/app/Mage.php'; | |
require_once $mageFilename; | |
umask(0); | |
Mage::app(); | |
Mage::app()->getStore()->setId(0); | |
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
#Convert local timezone DB to AWS | |
UPDATE customer_entity SET created_at = CONVERT_TZ(created_at,'-10:00','UTC'), updated_at = CONVERT_TZ(updated_at,'-10:00','UTC'); | |
UPDATE sales_flat_order SET created_at = CONVERT_TZ(created_at,'-10:00','UTC'), updated_at = CONVERT_TZ(updated_at,'-10:00','UTC'); | |
UPDATE sales_flat_order_grid SET created_at = CONVERT_TZ(created_at,'-10:00','UTC'), updated_at = CONVERT_TZ(updated_at,'-10:00','UTC'); | |
UPDATE sales_flat_invoice SET created_at = CONVERT_TZ(created_at,'-10:00','UTC'), updated_at = CONVERT_TZ(updated_at,'-10:00','UTC'); | |
UPDATE sales_flat_invoice_grid SET created_at = CONVERT_TZ(created_at,'-10:00','UTC'), order_created_at = CONVERT_TZ(order_created_at,'-10:00','UTC'); | |
UPDATE sales_flat_shipment SET created_at = CONVERT_TZ(created_at,'-10:00','UTC'), updated_at = CONVERT_TZ(updated_at,'-10:00','UTC'); | |
UPDATE sales_flat_shipment_grid SET created_at = CONVERT_TZ(created_at,'-10:00','UTC'), order_created_at = CONVERT_TZ(order_created_at,'-10:00','UTC'); | |
#Convert AWS (UTC |
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
131.161.8.0/24 | |
131.161.10.0/24 | |
131.161.9.0/24 | |
131.161.11.0/24 | |
131.161.9.253 | |
131.161.9.252 | |
131.161.9.251 | |
131.161.9.250 |
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 | |
/* Mage Australia - 2016-06-20 - | |
Finds Categories that match multiselect | |
attribute and saves the product as that style | |
*/ | |
require_once '../app/Mage.php'; | |
umask(0); | |
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_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
select sfo.customer_id, cg.customer_group_code, customer_firstname, customer_lastname, customer_email, street, city, region, postcode, country_id, sfoi.type, sfoi.sku, sfoi.name, sfoi.qty_ordered | |
FROM sales_flat_order as sfo | |
LEFT JOIN sales_flat_order_address sfoa on (sfo.entity_id = sfoa.parent_id) | |
LEFT JOIN (SELECT order_id, GROUP_CONCAT(product_type, '\n') as type, GROUP_CONCAT(sku, "\n") as sku, GROUP_CONCAT(name, "\n") as name, GROUP_CONCAT(qty_ordered, "\n") as qty_ordered from sales_flat_order_item GROUP BY order_id) as sfoi on sfo.entity_id = sfoi.order_id | |
LEFT JOIN customer_group as cg on (sfo.customer_group_id = cg.`customer_group_id`) | |
WHERE `sfoa`.`address_type` = "shipping" | |
ORDER BY customer_id ASC; |
OlderNewer