Last active
July 12, 2016 18:55
-
-
Save steverobbins/75108976cd9f1c1e3ebff1e2f4401dc4 to your computer and use it in GitHub Desktop.
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 | |
/** | |
* Magento | |
* | |
* NOTICE OF LICENSE | |
* | |
* This source file is subject to the Open Software License (OSL 3.0) | |
* that is bundled with this package in the file LICENSE.txt. | |
* It is also available through the world-wide-web at this URL: | |
* http://opensource.org/licenses/osl-3.0.php | |
* If you did not receive a copy of the license and are unable to | |
* obtain it through the world-wide-web, please send an email | |
* to license@magento.com so we can send you a copy immediately. | |
* | |
* DISCLAIMER | |
* | |
* Do not edit or add to this file if you wish to upgrade Magento to newer | |
* versions in the future. If you wish to customize Magento for your | |
* needs please refer to http://www.magento.com for more information. | |
* | |
* @category Mage | |
* @package Mage | |
* @copyright Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com) | |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | |
*/ | |
if (version_compare(phpversion(), '5.3.0', '<')===true) { | |
echo '<div style="font:12px/1.35em arial, helvetica, sans-serif;"> | |
<div style="margin:0 0 25px 0; border-bottom:1px solid #ccc;"> | |
<h3 style="margin:0; font-size:1.7em; font-weight:normal; text-transform:none; text-align:left; color:#2f2f2f;"> | |
Whoops, it looks like you have an invalid PHP version.</h3></div><p>Magento supports PHP 5.3.0 or newer. | |
<a href="http://www.magentocommerce.com/install" target="">Find out</a> how to install</a> | |
Magento using PHP-CGI as a work-around.</p></div>'; | |
exit; | |
} | |
/** | |
* Compilation includes configuration file | |
*/ | |
define('MAGENTO_ROOT', getcwd()); | |
$compilerConfig = MAGENTO_ROOT . '/includes/config.php'; | |
if (file_exists($compilerConfig)) { | |
include $compilerConfig; | |
} | |
$mageFilename = MAGENTO_ROOT . '/app/Mage.php'; | |
$maintenanceFile = 'maintenance.flag'; | |
if (!file_exists($mageFilename)) { | |
if (is_dir('downloader')) { | |
header("Location: downloader"); | |
} else { | |
echo $mageFilename." was not found"; | |
} | |
exit; | |
} | |
if (file_exists($maintenanceFile)) { | |
include_once dirname(__FILE__) . '/errors/503.php'; | |
exit; | |
} | |
require MAGENTO_ROOT . '/app/bootstrap.php'; | |
require_once $mageFilename; | |
#Varien_Profiler::enable(); | |
if (isset($_SERVER['MAGE_IS_DEVELOPER_MODE'])) { | |
Mage::setIsDeveloperMode(true); | |
} | |
#ini_set('display_errors', 1); | |
umask(0); | |
/* Store or website code */ | |
$mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : ''; | |
/* Run store or run website */ | |
$mageRunType = isset($_SERVER['MAGE_RUN_TYPE']) ? $_SERVER['MAGE_RUN_TYPE'] : 'store'; | |
Mage::app($mageRunCode, $mageRunType); | |
$map = array(693 => 701, | |
694 => 703, | |
695 => 731, | |
696 => 712, | |
697 => 704, | |
698 => 706, | |
699 => 707, | |
700 => 708, | |
701 => 709, | |
702 => 710, | |
703 => 714, | |
704 => 715, | |
705 => 716, | |
706 => 717, | |
707 => 718, | |
708 => 719, | |
709 => 723, | |
710 => 724, | |
711 => 725, | |
712 => 726, | |
713 => 727, | |
714 => 728, | |
715 => 729, | |
716 => 734, | |
717 => 735, | |
718 => 736, | |
720 => 737, | |
721 => 747, | |
722 => 748, | |
723 => 749, | |
724 => 750, | |
725 => 733, | |
726 => 732, | |
727 => 763, | |
728 => 764, | |
729 => 766, | |
730 => 767, | |
731 => 769, | |
732 => 770, | |
733 => 771, | |
734 => 772, | |
735 => 751, | |
736 => 752, | |
737 => 753, | |
738 => 754, | |
739 => 755, | |
740 => 757, | |
741 => 758, | |
742 => 760, | |
743 => 759, | |
745 => 761, | |
746 => 738, | |
747 => 739, | |
748 => 740, | |
749 => 741, | |
750 => 742, | |
751 => 743, | |
752 => 744, | |
753 => 745, | |
754 => 746, | |
755 => 721, | |
756 => 720, | |
757 => 730, | |
758 => 711, | |
759 => 713, | |
760 => 762, | |
761 => 705, | |
762 => 722, | |
763 => 756, | |
764 => 702, | |
765 => 768, | |
766 => 765,); | |
$products = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('sku'); | |
foreach ($products as $product) { | |
$categories = $product->getCategoryCollection()->getAllIds(); | |
echo '"' . $product->getSku() . '",'; | |
$cats = array(); | |
foreach ($categories as $cat) { | |
if (isset($map[$cat])) { | |
$cats[] = $map[$cat]; | |
} | |
} | |
echo '"' . implode(",", $cats) . '"' . PHP_EOL; | |
} |
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 | |
/** | |
* Magento | |
* | |
* NOTICE OF LICENSE | |
* | |
* This source file is subject to the Open Software License (OSL 3.0) | |
* that is bundled with this package in the file LICENSE.txt. | |
* It is also available through the world-wide-web at this URL: | |
* http://opensource.org/licenses/osl-3.0.php | |
* If you did not receive a copy of the license and are unable to | |
* obtain it through the world-wide-web, please send an email | |
* to license@magento.com so we can send you a copy immediately. | |
* | |
* DISCLAIMER | |
* | |
* Do not edit or add to this file if you wish to upgrade Magento to newer | |
* versions in the future. If you wish to customize Magento for your | |
* needs please refer to http://www.magento.com for more information. | |
* | |
* @category Mage | |
* @package Mage | |
* @copyright Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com) | |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | |
*/ | |
if (version_compare(phpversion(), '5.3.0', '<')===true) { | |
echo '<div style="font:12px/1.35em arial, helvetica, sans-serif;"> | |
<div style="margin:0 0 25px 0; border-bottom:1px solid #ccc;"> | |
<h3 style="margin:0; font-size:1.7em; font-weight:normal; text-transform:none; text-align:left; color:#2f2f2f;"> | |
Whoops, it looks like you have an invalid PHP version.</h3></div><p>Magento supports PHP 5.3.0 or newer. | |
<a href="http://www.magentocommerce.com/install" target="">Find out</a> how to install</a> | |
Magento using PHP-CGI as a work-around.</p></div>'; | |
exit; | |
} | |
/** | |
* Compilation includes configuration file | |
*/ | |
define('MAGENTO_ROOT', getcwd()); | |
$compilerConfig = MAGENTO_ROOT . '/includes/config.php'; | |
if (file_exists($compilerConfig)) { | |
include $compilerConfig; | |
} | |
$mageFilename = MAGENTO_ROOT . '/app/Mage.php'; | |
$maintenanceFile = 'maintenance.flag'; | |
if (!file_exists($mageFilename)) { | |
if (is_dir('downloader')) { | |
header("Location: downloader"); | |
} else { | |
echo $mageFilename." was not found"; | |
} | |
exit; | |
} | |
if (file_exists($maintenanceFile)) { | |
include_once dirname(__FILE__) . '/errors/503.php'; | |
exit; | |
} | |
require MAGENTO_ROOT . '/app/bootstrap.php'; | |
require_once $mageFilename; | |
#Varien_Profiler::enable(); | |
if (isset($_SERVER['MAGE_IS_DEVELOPER_MODE'])) { | |
Mage::setIsDeveloperMode(true); | |
} | |
#ini_set('display_errors', 1); | |
umask(0); | |
/* Store or website code */ | |
$mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : ''; | |
/* Run store or run website */ | |
$mageRunType = isset($_SERVER['MAGE_RUN_TYPE']) ? $_SERVER['MAGE_RUN_TYPE'] : 'store'; | |
Mage::app($mageRunCode, $mageRunType); | |
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); | |
$file = fopen('cp.csv', 'r'); | |
while (($row = fgetcsv($file)) !== false) { | |
$sku = $row[0]; | |
$cats = explode(',', $row[1]); | |
if (count($cats) == 0) { | |
continue; | |
} | |
$product = Mage::getModel('catalog/product')->loadByAttribute('sku', $sku); | |
if (!$product || !$product->getId()) { | |
echo 'No product ' . $sku . PHP_EOL; | |
continue; | |
} | |
echo $sku . PHP_EOL; | |
$current = $product->getCategoryCollection()->getAllIds(); | |
$save = false; | |
foreach ($cats as $cat) { | |
if (!in_array($cat, $current)) { | |
$save = true; | |
$current[] = $cat; | |
} | |
} | |
if ($save) { | |
$product->setCategoryIds($current)->save(); | |
} | |
} |
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
insert into mage_catalog_category_product (category_id, product_id, position) | |
select mc.prod_id, mp.prod_id, mcp.position | |
from migrate_category_product mcp | |
inner join migrate_category mc on mc.stage_id = mcp.category_id | |
inner join migrate_product mp on mp.stage_id = mcp.product_id | |
where mcp.category_id in (697,698,699,700,701,758,703,704,706,766,765) | |
on duplicate key update position = mcp.position; | |
insert into mage_catalog_category_product_index (category_id, product_id, position, is_parent, store_id, visibility) | |
select mc.prod_id, mp.prod_id, mcp.position, mcp.is_parent, mcp.store_id, mcp.visibility | |
from migrate_category_product_index mcp | |
inner join migrate_category mc on mc.stage_id = mcp.category_id | |
inner join migrate_product mp on mp.stage_id = mcp.product_id | |
where mcp.category_id in (697,698,699,700,701,758,703,704,706,766,765) | |
on duplicate key update position = mcp.position, is_parent = mcp.is_parent, store_id = mcp.store_id, visibility = mcp.visibility; |
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 c_name.value, c_url.value, c_display.value, c_metatitle.value, c.position | |
from mage_catalog_category_entity c | |
inner join mage_catalog_category_entity_varchar c_name on c_name.entity_id = c.entity_id and c_name.store_id = 0 and c_name.attribute_id = 33 | |
inner join mage_catalog_category_entity_varchar c_url on c_url.entity_id = c.entity_id and c_url.store_id = 0 and c_url.attribute_id = 35 | |
inner join mage_catalog_category_entity_varchar c_display on c_display.entity_id = c.entity_id and c_display.store_id = 0 and c_display.attribute_id = 41 | |
inner join mage_catalog_category_entity_varchar c_metatitle on c_metatitle.entity_id = c.entity_id and c_metatitle.store_id = 0 and c_metatitle.attribute_id = 38 | |
-- where c.path like "1/693/%" | |
where c.parent_id = 720 or c.parent_id = 724 | |
order by c.parent_id, round(length(c.path) - length(replace(c.path, "/", "")) - length("c.path")), c.position; | |
insert into migrate_category_id (stage_id, prod_id) | |
select mc.entity_id, c.entity_id | |
from migrate_category mc | |
inner join mage_catalog_category_entity_varchar c on c.value = mc.value and c.attribute_id = 33 and c.store_id = 0 | |
where mc.entity_id > 692 | |
and c.entity_id > 700 | |
and mc.attribute_id = 33 | |
and mc.store_id = 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
update mage_nwdthemes_revslider_slides set | |
params = replace(params, 'staging.flashingblinkylights.com', 'new.alightpromos.com'), | |
layers = replace(layers, 'staging.flashingblinkylights.com', 'new.alightpromos.com'); |
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
insert into mage_price_matrix (product_id, ap_net_price, marktype1, marktype2, marktype3, marktype4, markamount1, markamount2, markamount3, ap_net_day1, ap_list_day1, ap_net_day2, ap_list_day2, fbl_day1, fbl_day2, multiplier, notes, old_id) | |
select p.entity_id, mm.ap_net_price, mm.marktype1, mm.marktype2, mm.marktype3, mm.marktype4, mm.markamount1, mm.markamount2, mm.markamount3, mm.ap_net_day1, mm.ap_list_day1, mm.ap_net_day2, mm.ap_list_day2, mm.fbl_day1, mm.fbl_day2, mm.multiplier, mm.notes, mm.old_id | |
from migrate_matrix mm | |
left join mage_price_matrix m on m.old_sku = mm.old_sku | |
inner join mage_catalog_product_entity p on p.sku = mm.old_sku | |
where m.old_sku is null; | |
insert into mage_price_matrix_price (matrix_id, qty, fbl_price, markdown, ap_net, ap_list, markup, custom_show, stock_show, is_custom, show_5day, show_60day, fbl_real, markup_5day) | |
select m.id, mmp.qty, mmp.fbl_price, mmp.markdown, mmp.ap_net, mmp.ap_list, mmp.markup, mmp.custom_show, mmp.stock_show, mmp.is_custom, mmp.show_5day, mmp.show_60day, mmp.fbl_real, mmp.markup_5day | |
from migrate_matrix_price mmp | |
inner join migrate_matrix mm on mm.id = mmp.matrix_id | |
inner join mage_price_matrix m on m.old_sku = mm.old_sku | |
where m.id > 1455; | |
; | |
update mage_price_matrix m | |
inner join mage_catalog_product_entity p on m.product_id = p.entity_id | |
set m.old_sku = p.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
delete from mage_catalog_product_entity_media_gallery where value_id > 52139; | |
-- select p.sku, p.entity_id prod_id, mp.entity_id stage_id | |
insert into mage_catalog_product_entity_media_gallery_value (value_id, store_id, label, position, disabled) | |
select g.value_id, mgv.store_id, mgv.label, mgv.position, mgv.disabled | |
from mage_catalog_product_entity_media_gallery g | |
inner join migrate_gallery_value mgv on mgv.value_id = g.old_value_id | |
; | |
-- where g.entity_id > 52139; | |
p.sku in ( | |
'10431-AM', | |
'10431-BL', | |
'10431-GN', | |
'10431-MLT', | |
'10431-PK', | |
'10431-RD', | |
'10431-WT', | |
'10432-AM', | |
'10432-BL', | |
'10432-GN', | |
'10432-MLT', | |
'10432-PK', | |
'10432-RD', | |
'10432-WT', | |
'10433-AM', | |
'10433-BL', | |
'10433-GN', | |
'10433-MLT', | |
'10433-PK', | |
'10433-RD', | |
'10433-WT', | |
'10500', | |
'10627-BK', | |
'10627-BL', | |
'10627-GN', | |
'10627-OR', | |
'10627-RD', | |
'10627-WT', | |
'10697', | |
'10698', | |
'10734-BK', | |
'10734-BL', | |
'10734-BL-BL', | |
'10734-GN', | |
'10734-GN-GN', | |
'10734-PK', | |
'10734-RD', | |
'10734-WT', | |
'10734-WT-WT', | |
'10807-AM', | |
'10807-BL', | |
'10807-GN', | |
'10807-MLT', | |
'10807-PK', | |
'10807-RD', | |
'10807-WT', | |
'10809-AM', | |
'10809-BL', | |
'10809-GN', | |
'10809-MLT', | |
'10809-PK', | |
'10809-RD', | |
'10809-WT', | |
'10811-AM', | |
'10811-BL', | |
'10811-GN', | |
'10811-MLT', | |
'10811-PK', | |
'10811-RD', | |
'10811-WT', | |
'11015-BK', | |
'11015-BL', | |
'11015-GN', | |
'11015-OR', | |
'11015-RD', | |
'11015-WT', | |
'11105-yl', | |
'11162-AM', | |
'11162-BL', | |
'11162-GN', | |
'11162-MLT', | |
'11162-PK', | |
'11162-RD', | |
'11162-WT', | |
'11211-Cane', | |
'11211-PARENT', | |
'11223', | |
'11223-FCS', | |
'11224', | |
'11224-FCS', | |
'11225', | |
'11225-FCS', | |
'11226', | |
'11226-FCS', | |
'11227', | |
'11227-FCS', | |
'11475-AM', | |
'11475-BL', | |
'11475-GN', | |
'11475-MLT', | |
'11475-PK', | |
'11475-RD', | |
'11475-WT', | |
'11491', | |
'11491-FCS', | |
'11494', | |
'11569-AM', | |
'11569-BL', | |
'11569-GN', | |
'11569-MLT', | |
'11569-PK', | |
'11569-RD', | |
'11569-WT', | |
'11582', | |
'11671-AM', | |
'11671-BL', | |
'11671-GN', | |
'11671-MLT', | |
'11671-PK', | |
'11671-RD', | |
'11671-WT', | |
'11771-BL', | |
'11771-GN', | |
'11771-MLT', | |
'11771-OR', | |
'11771-PK', | |
'11771-RD', | |
'11771-RWB', | |
'11771-WT', | |
'11776', | |
'11952-BL', | |
'11952-GN', | |
'11952-MLT', | |
'11952-PK', | |
'11952-RD', | |
'11952-WT', | |
'11953-AM', | |
'11953-BL', | |
'11953-GN', | |
'11953-MLT', | |
'11953-PK', | |
'11953-RD', | |
'11953-WT', | |
'11954-AM', | |
'11954-BL', | |
'11954-GN', | |
'11954-MLT', | |
'11954-PK', | |
'11954-RD', | |
'11954-WT', | |
'11955-AM', | |
'11955-BL', | |
'11955-GN', | |
'11955-MLT', | |
'11955-PK', | |
'11955-RD', | |
'11955-WT', | |
'11963-AM', | |
'11963-BL', | |
'11963-GN', | |
'11963-MLT', | |
'11963-PK', | |
'11963-RD', | |
'11963-WT', | |
'12014-AM', | |
'12014-BL', | |
'12014-GN', | |
'12014-MLT', | |
'12014-PK', | |
'12014-RD', | |
'12014-WT', | |
'12017-BL-CR', | |
'12017-BL-DL', | |
'12017-BL-GT', | |
'12017-BL-HR', | |
'12017-BL-HT', | |
'12017-BL-MS', | |
'12017-BL-MT', | |
'12017-BL-OV', | |
'12017-BL-PG', | |
'12017-BL-RB', | |
'12017-BL-RT', | |
'12017-BL-SH', | |
'12017-BL-SQ', | |
'12017-BL-ST', | |
'12017-BL-TR', | |
'12017-GN-CR', | |
'12017-GN-DL', | |
'12017-GN-GT', | |
'12017-GN-HR', | |
'12017-GN-HT', | |
'12017-GN-MS', | |
'12017-GN-MT', | |
'12017-GN-OV', | |
'12017-GN-PG', | |
'12017-GN-RB', | |
'12017-GN-RT', | |
'12017-GN-SH', | |
'12017-GN-SQ', | |
'12017-GN-ST', | |
'12017-GN-TR', | |
'12017-RD-CR', | |
'12017-RD-DL', | |
'12017-RD-GT', | |
'12017-RD-HR', | |
'12017-RD-HT', | |
'12017-RD-MS', | |
'12017-RD-MT', | |
'12017-RD-OV', | |
'12017-RD-PG', | |
'12017-RD-RB', | |
'12017-RD-RT', | |
'12017-RD-SH', | |
'12017-RD-SQ', | |
'12017-RD-ST', | |
'12017-RD-TR' | |
); | |
-- select p.sku, p.entity_id prod_id, mp.entity_id stage_id | |
insert into mage_catalog_product_entity_media_gallery (attribute_id, entity_id, value, old_value_id) | |
select mg.attribute_id, p.entity_id, mg.value, mg.value_id | |
from mage_catalog_product_entity p | |
inner join migrate_product mp on p.sku = mp.sku | |
inner join migrate_gallery mg on mp.entity_id = mg.entity_id | |
where p.sku in ( | |
'10431-AM', | |
'10431-BL', | |
'10431-GN', | |
'10431-MLT', | |
'10431-PK', | |
'10431-RD', | |
'10431-WT', | |
'10432-AM', | |
'10432-BL', | |
'10432-GN', | |
'10432-MLT', | |
'10432-PK', | |
'10432-RD', | |
'10432-WT', | |
'10433-AM', | |
'10433-BL', | |
'10433-GN', | |
'10433-MLT', | |
'10433-PK', | |
'10433-RD', | |
'10433-WT', | |
'10500', | |
'10627-BK', | |
'10627-BL', | |
'10627-GN', | |
'10627-OR', | |
'10627-RD', | |
'10627-WT', | |
'10697', | |
'10698', | |
'10734-BK', | |
'10734-BL', | |
'10734-BL-BL', | |
'10734-GN', | |
'10734-GN-GN', | |
'10734-PK', | |
'10734-RD', | |
'10734-WT', | |
'10734-WT-WT', | |
'10807-AM', | |
'10807-BL', | |
'10807-GN', | |
'10807-MLT', | |
'10807-PK', | |
'10807-RD', | |
'10807-WT', | |
'10809-AM', | |
'10809-BL', | |
'10809-GN', | |
'10809-MLT', | |
'10809-PK', | |
'10809-RD', | |
'10809-WT', | |
'10811-AM', | |
'10811-BL', | |
'10811-GN', | |
'10811-MLT', | |
'10811-PK', | |
'10811-RD', | |
'10811-WT', | |
'11015-BK', | |
'11015-BL', | |
'11015-GN', | |
'11015-OR', | |
'11015-RD', | |
'11015-WT', | |
'11105-yl', | |
'11162-AM', | |
'11162-BL', | |
'11162-GN', | |
'11162-MLT', | |
'11162-PK', | |
'11162-RD', | |
'11162-WT', | |
'11211-Cane', | |
'11211-PARENT', | |
'11223', | |
'11223-FCS', | |
'11224', | |
'11224-FCS', | |
'11225', | |
'11225-FCS', | |
'11226', | |
'11226-FCS', | |
'11227', | |
'11227-FCS', | |
'11475-AM', | |
'11475-BL', | |
'11475-GN', | |
'11475-MLT', | |
'11475-PK', | |
'11475-RD', | |
'11475-WT', | |
'11491', | |
'11491-FCS', | |
'11494', | |
'11569-AM', | |
'11569-BL', | |
'11569-GN', | |
'11569-MLT', | |
'11569-PK', | |
'11569-RD', | |
'11569-WT', | |
'11582', | |
'11671-AM', | |
'11671-BL', | |
'11671-GN', | |
'11671-MLT', | |
'11671-PK', | |
'11671-RD', | |
'11671-WT', | |
'11771-BL', | |
'11771-GN', | |
'11771-MLT', | |
'11771-OR', | |
'11771-PK', | |
'11771-RD', | |
'11771-RWB', | |
'11771-WT', | |
'11776', | |
'11952-BL', | |
'11952-GN', | |
'11952-MLT', | |
'11952-PK', | |
'11952-RD', | |
'11952-WT', | |
'11953-AM', | |
'11953-BL', | |
'11953-GN', | |
'11953-MLT', | |
'11953-PK', | |
'11953-RD', | |
'11953-WT', | |
'11954-AM', | |
'11954-BL', | |
'11954-GN', | |
'11954-MLT', | |
'11954-PK', | |
'11954-RD', | |
'11954-WT', | |
'11955-AM', | |
'11955-BL', | |
'11955-GN', | |
'11955-MLT', | |
'11955-PK', | |
'11955-RD', | |
'11955-WT', | |
'11963-AM', | |
'11963-BL', | |
'11963-GN', | |
'11963-MLT', | |
'11963-PK', | |
'11963-RD', | |
'11963-WT', | |
'12014-AM', | |
'12014-BL', | |
'12014-GN', | |
'12014-MLT', | |
'12014-PK', | |
'12014-RD', | |
'12014-WT', | |
'12017-BL-CR', | |
'12017-BL-DL', | |
'12017-BL-GT', | |
'12017-BL-HR', | |
'12017-BL-HT', | |
'12017-BL-MS', | |
'12017-BL-MT', | |
'12017-BL-OV', | |
'12017-BL-PG', | |
'12017-BL-RB', | |
'12017-BL-RT', | |
'12017-BL-SH', | |
'12017-BL-SQ', | |
'12017-BL-ST', | |
'12017-BL-TR', | |
'12017-GN-CR', | |
'12017-GN-DL', | |
'12017-GN-GT', | |
'12017-GN-HR', | |
'12017-GN-HT', | |
'12017-GN-MS', | |
'12017-GN-MT', | |
'12017-GN-OV', | |
'12017-GN-PG', | |
'12017-GN-RB', | |
'12017-GN-RT', | |
'12017-GN-SH', | |
'12017-GN-SQ', | |
'12017-GN-ST', | |
'12017-GN-TR', | |
'12017-RD-CR', | |
'12017-RD-DL', | |
'12017-RD-GT', | |
'12017-RD-HR', | |
'12017-RD-HT', | |
'12017-RD-MS', | |
'12017-RD-MT', | |
'12017-RD-OV', | |
'12017-RD-PG', | |
'12017-RD-RB', | |
'12017-RD-RT', | |
'12017-RD-SH', | |
'12017-RD-SQ', | |
'12017-RD-ST', | |
'12017-RD-TR' | |
); |
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 migrate_category mc | |
inner join mage_catalog_category_entity_varchar cv | |
on cv.attribute_id = 35 | |
and cv.store_id = 0 | |
and cv.entity_id > 700 | |
and mc.slug = cv.value | |
set prod_id = cv.entity_id | |
where mc.stage_id > 692; | |
delete from migrate_category where prod_id = 0; | |
update migrate_product mp | |
inner join mage_catalog_product_entity p | |
on p.sku = mp.sku | |
set mp.prod_id = p.entity_id; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment