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:
parent
8c51adafed
commit
b0402f3558
@ -114,6 +114,9 @@ class Retailcrm_Retailcrm_Model_Icml
|
|||||||
$offer['name'] = $product->getName();
|
$offer['name'] = $product->getName();
|
||||||
$offer['productName'] = $product->getName();
|
$offer['productName'] = $product->getName();
|
||||||
$offer['initialPrice'] = (float) $product->getPrice();
|
$offer['initialPrice'] = (float) $product->getPrice();
|
||||||
|
if($product->hasCost())
|
||||||
|
$offer['purchasePrice'] = (float) $product->getCost();
|
||||||
|
|
||||||
$offer['url'] = $product->getProductUrl();
|
$offer['url'] = $product->getProductUrl();
|
||||||
$offer['picture'] = $picUrl.'catalog/product'.$product->getImage();
|
$offer['picture'] = $picUrl.'catalog/product'.$product->getImage();
|
||||||
$offer['quantity'] = Mage::getModel('cataloginventory/stock_item')
|
$offer['quantity'] = Mage::getModel('cataloginventory/stock_item')
|
||||||
@ -199,6 +202,8 @@ class Retailcrm_Retailcrm_Model_Icml
|
|||||||
$offer['name'] = $associatedProduct->getName().$attributesString;
|
$offer['name'] = $associatedProduct->getName().$attributesString;
|
||||||
$offer['productName'] = $product->getName();
|
$offer['productName'] = $product->getName();
|
||||||
$offer['initialPrice'] = (float) $associatedProduct->getFinalPrice();
|
$offer['initialPrice'] = (float) $associatedProduct->getFinalPrice();
|
||||||
|
if($associatedProduct->hasCost())
|
||||||
|
$offer['purchasePrice'] = (float) $associatedProduct->getCost();
|
||||||
$offer['url'] = $associatedProduct->getProductUrl();
|
$offer['url'] = $associatedProduct->getProductUrl();
|
||||||
$offer['picture'] = $picUrl.'catalog/product'.$associatedProduct->getImage();
|
$offer['picture'] = $picUrl.'catalog/product'.$associatedProduct->getImage();
|
||||||
$offer['quantity'] = Mage::getModel('cataloginventory/stock_item')
|
$offer['quantity'] = Mage::getModel('cataloginventory/stock_item')
|
||||||
|
Loading…
Reference in New Issue
Block a user