File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
app/code/Meta/Catalog/Model/Product/Feed Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -768,7 +768,7 @@ public function buildProductEntry(Product $product)
768
768
self ::ATTR_PRODUCT_TYPE => $ this ->getProductType ($ product ),
769
769
self ::ATTR_CONDITION => $ this ->getCondition ($ product ),
770
770
self ::ATTR_PRICE => $ this ->builderTools ->getProductPrice ($ product ),
771
- self ::ATTR_SALE_PRICE => $ this ->builderTools -> getProductSalePrice ($ product ),
771
+ self ::ATTR_SALE_PRICE => $ this ->getSalePrice ($ product ),
772
772
self ::ATTR_SALE_PRICE_EFFECTIVE_DATE => $ this ->builderTools ->getProductSalePriceEffectiveDate ($ product ),
773
773
self ::ATTR_COLOR => $ this ->getColor ($ product ),
774
774
self ::ATTR_SIZE => $ this ->getSize ($ product ),
@@ -819,6 +819,23 @@ public function buildProductEntry(Product $product)
819
819
return $ entry ;
820
820
}
821
821
822
+ /**
823
+ * Get product sale price
824
+ *
825
+ * @param Product $product
826
+ * @return mixed|null
827
+ */
828
+ private function getSalePrice (Product $ product )
829
+ {
830
+ $ salePrice = isset ($ this ->attrMap [self ::ATTR_SALE_PRICE ])
831
+ ? $ product ->getData ($ this ->attrMap [self ::ATTR_SALE_PRICE ]) : null ;
832
+ if (!$ salePrice ) {
833
+ $ this ->builderTools ->getProductSalePrice ($ product );
834
+ }
835
+
836
+ return $ salePrice ;
837
+ }
838
+
822
839
/**
823
840
* Get product additional images
824
841
*
You can’t perform that action at this time.
0 commit comments