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 core_config_data | |
SET value = REPLACE ( value, 'www.domain', 'dev.domain') | |
WHERE path like ('%base%_url%'); |
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
# SQL Query | |
SET FOREIGN_KEY_CHECKS = 0; | |
TRUNCATE TABLE `enterprise_url_rewrite_redirect_rewrite`; | |
TRUNCATE TABLE `enterprise_url_rewrite_redirect_cl`; | |
TRUNCATE TABLE `enterprise_url_rewrite_redirect`; | |
TRUNCATE TABLE `enterprise_url_rewrite_product_cl`; | |
TRUNCATE TABLE `enterprise_url_rewrite_category_cl`; | |
TRUNCATE TABLE `enterprise_url_rewrite`; | |
TRUNCATE TABLE `enterprise_catalog_product_rewrite`; | |
TRUNCATE TABLE `enterprise_catalog_category_rewrite`; |
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 catalog_product_entity_text | |
SET value = REPLACE ( value, 'src="http://www', 'src="https://www') | |
WHERE value like ('%src="http://www%'); | |
UPDATE catalog_category_entity_text | |
SET value = REPLACE ( value, 'src="http://www', 'src="https://www') | |
WHERE value like ('%src="http://www%'); | |
UPDATE cms_block | |
SET content = REPLACE ( content, 'src="http://www', 'src="https://www') |
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 | |
require_once 'abstract.php'; | |
class Mage_Shell_Simples_Category extends Mage_Shell_Abstract | |
{ | |
/** | |
* Run script | |
* | |
*/ |
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 | |
type_id,sku, cpev.value | |
from catalog_product_entity a | |
left join catalog_category_product cp on cp.`product_id` = a.entity_id | |
left join catalog_product_relation cpr on cpr.child_id = a.entity_id | |
left join catalog_product_entity_varchar cpev on cpev.entity_id = a.entity_id | |
left join catalog_product_entity_int cpei on cpei.entity_id = a.entity_id | |
where | |
# add this if you want to filter by no category | |
# cp.product_id is null |
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 cpe.entity_id product_id_maybe, cpe.sku product_id, CONCAT('http://www.domain.com/', cur.request_path) productUrl, cpev.value productUrl, null reviewphotosUrl, rov.percent rating_percent, rov.value rating_of_5, rd.title title, rd.nickname author, ce.email, rd.detail body, r.created_at, CONCAT('http://www.domain.com', cpev2.value) productImageUrl | |
from review as r | |
LEFT JOIN review_detail rd on r.review_id = rd.review_id | |
LEFT JOIN catalog_product_entity cpe on r.entity_pk_value = cpe.entity_id | |
LEFT JOIN catalog_product_entity_int cpei on cpei.`entity_id` = cpe.entity_id | |
LEFT JOIN catalog_product_entity_varchar cpev on cpev.entity_id = cpe.entity_id | |
LEFT JOIN catalog_product_entity_varchar cpev2 on cpev2.entity_id = cpe.entity_id | |
LEFT JOIN rating_option_vote rov on rov.review_id = r.review_id | |
LEFT JOIN customer_entity ce on ce.entity_id = rd.customer_id | |
LEFT JOIN core_url_rewrite cur on cur.product_id = cpe.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
select DISTINCT cpe.entity_id product_id, cpev3.value product_title, CONCAT('http://www.domain.com.au/', cur.request_path) product_url, rd.detail review_content, rov.value review_score, rd.title review_title, rd.nickname display_name, ce.email email, CONCAT('http://www.domain.com.au/media/catalog/product', cpev2.value) product_image_url, DATE_FORMAT(r.created_at,'%Y-%m-%d') date, '' product_description, '' cf_title_X, '' review_image_urls, '' comment_content, '' comment_public, '' comment_created_at | |
from review as r | |
LEFT JOIN review_detail rd on r.review_id = rd.review_id | |
LEFT JOIN catalog_product_entity cpe on r.entity_pk_value = cpe.entity_id | |
LEFT JOIN catalog_product_entity_int cpei on cpei.`entity_id` = cpe.entity_id | |
LEFT JOIN catalog_product_entity_varchar cpev on cpev.entity_id = cpe.entity_id | |
LEFT JOIN catalog_product_entity_varchar cpev2 on cpev2.entity_id = cpe.entity_id | |
LEFT JOIN catalog_product_entity_varchar cpev3 on cpev3.entity_id = cpe.entity_id | |
LEFT JOIN rating_option_vote rov on rov.review_ |
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 | |
CHECKOUTS_IP=`/bin/grep saveOrder /var/log/httpd/access.log | grep -v "js\|media\|css\|skin" | awk {'print $1'} | sort | uniq -c | sort -rn | head -1 | awk {'print $2'}` | |
CHECKOUTS_QTY=`/bin/grep saveOrder /var/log/httpd/access.log | grep -v "js\|media\|css\|skin" | awk {'print $1'} | sort | uniq -c | sort -rn | head -1 | awk {'print $1'}` | |
CHECKOUTS_COUNTRY=`/usr/bin/geoiplookup $CHECKOUTS_IP | grep Country | awk {'print $5'}` | |
if [[ $CHECKOUTS_QTY -gt 4 && $CHECKOUTS_COUNTRY != "Australia" ]] | |
then | |
#echo $IPADDRESS | |
/usr/sbin/csf -d $CHECKOUTS_IP |
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 * FROM `catalog_product_entity` where entity_id | |
not in (SELECT product_id FROM `catalog_product_super_link`) and type_id='simple' |
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
-- First, update the attribute input type to multiselect | |
UPDATE eav_attribute SET | |
entity_type_id = 4, | |
attribute_model = NULL, | |
backend_model = 'eav/entity_attribute_backend_array', | |
source_model = NULL, | |
backend_type = 'varchar', | |
backend_table = NULL, | |
frontend_model = NULL, | |
frontend_input = 'multiselect', |