From d3d44165411f87e9885b2009aee241f10708763c Mon Sep 17 00:00:00 2001 From: Oliver Gronau Date: Tue, 27 Jan 2015 15:25:08 +0100 Subject: [PATCH] Create rewrites for all stores in the "On the fly indexer" plugin when using categories --- magmi/plugins/extra/itemprocessors/itemindexer/otfindexer.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/magmi/plugins/extra/itemprocessors/itemindexer/otfindexer.php b/magmi/plugins/extra/itemprocessors/itemindexer/otfindexer.php index 5ffbd867..9ed41d8d 100644 --- a/magmi/plugins/extra/itemprocessors/itemindexer/otfindexer.php +++ b/magmi/plugins/extra/itemprocessors/itemindexer/otfindexer.php @@ -68,10 +68,11 @@ public function getItemCategoryIds($pid) */ public function getItemCategoryPaths($pid) { - $sql = "SELECT cce.path as cpath,SUBSTR(cce.path,LOCATE('/',cce.path,3)+1) as cshortpath,csg.default_store_id as store_id,cce.entity_id as catid + $sql = "SELECT cce.path as cpath,SUBSTR(cce.path,LOCATE('/',cce.path,3)+1) as cshortpath,cs.store_id,cce.entity_id as catid FROM {$this->tns["ccp"]} as ccp JOIN {$this->tns["cce"]} as cce ON cce.entity_id=ccp.category_id JOIN {$this->tns["csg"]} as csg ON csg.root_category_id=SUBSTR(SUBSTRING_INDEX(cce.path,'/',2),LOCATE('/',SUBSTRING_INDEX(cce.path,'/',2))+1) + JOIN {$this->tns["cs"]} as cs ON cs.group_id=csg.group_id WHERE ccp.product_id=?"; $result = $this->selectAll($sql, $pid); $cpaths = array();