Skip to content

Commit 2b92fa9

Browse files
Attribute Mapping scope fixed for catalog feed creation (#795)
* Attribute Mapping scope fixed for catalog feed creation * Static error fixed
1 parent 123eb3f commit 2b92fa9

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

app/code/Meta/Catalog/Helper/Product/MappingConfig.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,12 @@ public function __construct(
5454
/**
5555
* Get Meta attribute mapping
5656
*
57+
* @param int $storeId
5758
* @return array
58-
* @throws LocalizedException
5959
*/
60-
public function getAttributeMapping(): array
60+
public function getAttributeMapping(int $storeId): array
6161
{
6262
$metaAttrMappings = [];
63-
$storeId = $this->_getRequest()->getParam('store');
6463
try {
6564
$attributeMaps = $this->scopeConfig->getValue(
6665
self::XML_PATH_META_CATALOG_MAPPING,

app/code/Meta/Catalog/Model/Product/Feed/Builder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,7 @@ private function getWeight(Product $product)
736736
*/
737737
public function buildProductEntry(Product $product)
738738
{
739-
$this->attrMap = $this->mappingConfig->getAttributeMapping();
739+
$this->attrMap = $this->mappingConfig->getAttributeMapping($product->getStoreId());
740740
$product->setCustomerGroupId(self::NOT_LOGGED_IN_ID);
741741

742742
$inventory = $this->getInventory($product);

0 commit comments

Comments
 (0)