1
0
mirror of synced 2024-11-25 06:26:07 +03:00

Support an purchase price

Use Cost attribute in Magento. Don't forget to select this attribute for exchange with RetailCRM for purchase price feature.
This commit is contained in:
Oleg 2017-05-17 16:33:29 +03:00 committed by GitHub
parent 8c51adafed
commit b0402f3558

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')