diff --git a/README.md b/README.md index 9bb18c7a..f8022366 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ [![Join the chat at https://gitter.im/dweeves/magmi-git](https://badges.gitter.im/dweeves/magmi-git.svg)](https://gitter.im/dweeves/magmi-git?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FCTC7R3YUJVPQ) magmi-git 0.7.23 === diff --git a/magmi/engines/magmi_productimportengine.php b/magmi/engines/magmi_productimportengine.php index cf0070aa..37cde4ef 100755 --- a/magmi/engines/magmi_productimportengine.php +++ b/magmi/engines/magmi_productimportengine.php @@ -1684,7 +1684,7 @@ public function createAttributes($pid, &$item, $attmap, $isnew, $itemids) $data[] = $attid; $data[] = $store_id; $data[] = $pid; - $data[] = $ovalue == '__NULL__' ? null : $ovalue; + $data[] = $ovalue === '__NULL__' ? null : $ovalue; $insstr = "(?,?,?,?,?)"; $inserts[] = $insstr; } diff --git a/magmi/plugins/base/itemprocessors/bundle/limora_bundleprocessor.php b/magmi/plugins/base/itemprocessors/bundle/limora_bundleprocessor.php index e592c59e..cd46d778 100755 --- a/magmi/plugins/base/itemprocessors/bundle/limora_bundleprocessor.php +++ b/magmi/plugins/base/itemprocessors/bundle/limora_bundleprocessor.php @@ -163,9 +163,9 @@ protected function _createOptions($item, $params) if (!empty($option['title'])) { if (empty($existingOption['title'])) { - $sql = "INSERT INTO $optv (option_id, store_id, title) VALUES(:option_id, :store_id, :title)"; + $sql = "INSERT INTO $optv (option_id, store_id, title,parent_product_id) VALUES(:option_id, :store_id, :title, :parent_product_id)"; $bind = array('option_id'=>$option['option_id'],'store_id'=>$option['store_id'], - 'title'=>$option['title']); + 'title'=>$option['title'],'parent_product_id' => $option['parent_id']); $this->insert($sql, $bind); } elseif ($existingOption['title'] != $option['title']) { $sql = "UPDATE $optv SET title = :title WHERE option_id = :option_id AND store_id = :store_id"; @@ -181,13 +181,13 @@ protected function _createOptions($item, $params) $optionId = $this->insert($sql, $bind); $option['option_id'] = $optionId; - $sql = "INSERT INTO $optv (option_id, store_id, title) VALUES(:option_id, :store_id, :title)"; - $bind = array('option_id'=>$option['option_id'],'store_id'=>0,'title'=>$option['code']); + $sql = "INSERT INTO $optv (option_id, store_id, title, parent_product_id) VALUES(:option_id, :store_id, :title, :parent_product_id)"; + $bind = array('option_id'=>$option['option_id'],'store_id'=>0,'title'=>$option['code'],'parent_product_id' => $option['parent_id']); $this->insert($sql, $bind); if (!empty($option['title']) && $option['store_id'] != 0) { $bind = array('option_id'=>$option['option_id'],'store_id'=>$option['store_id'], - 'title'=>$option['title']); + 'title'=>$option['title'],'parent_product_id' => $option['parent_id']); $this->insert($sql, $bind); } }