1
0
mirror of synced 2024-11-22 04:56:07 +03:00

Merge pull request #6 from devzorg/patch-1

Support an purchase price
This commit is contained in:
Alex Lushpai 2017-05-18 13:09:48 +03:00 committed by GitHub
commit 335c192a0e

View File

@ -114,6 +114,9 @@ class Retailcrm_Retailcrm_Model_Icml
$offer['name'] = $product->getName();
$offer['productName'] = $product->getName();
$offer['initialPrice'] = (float) $product->getPrice();
if($product->hasCost())
$offer['purchasePrice'] = (float) $product->getCost();
$offer['url'] = $product->getProductUrl();
$offer['picture'] = $picUrl.'catalog/product'.$product->getImage();
$offer['quantity'] = Mage::getModel('cataloginventory/stock_item')
@ -199,6 +202,8 @@ class Retailcrm_Retailcrm_Model_Icml
$offer['name'] = $associatedProduct->getName().$attributesString;
$offer['productName'] = $product->getName();
$offer['initialPrice'] = (float) $associatedProduct->getFinalPrice();
if($associatedProduct->hasCost())
$offer['purchasePrice'] = (float) $associatedProduct->getCost();
$offer['url'] = $associatedProduct->getProductUrl();
$offer['picture'] = $picUrl.'catalog/product'.$associatedProduct->getImage();
$offer['quantity'] = Mage::getModel('cataloginventory/stock_item')