Skip to content

Commit e442b33

Browse files
committed
resolved conflict
2 parents 0d74246 + bbf16a0 commit e442b33

File tree

6 files changed

+24
-301
lines changed

6 files changed

+24
-301
lines changed

app/code/Meta/BusinessExtension/Setup/InstallData.php

Lines changed: 0 additions & 52 deletions
This file was deleted.

app/code/Meta/BusinessExtension/Setup/InstallSchema.php

Lines changed: 0 additions & 64 deletions
This file was deleted.

app/code/Meta/BusinessExtension/Setup/Uninstall.php

Lines changed: 0 additions & 38 deletions
This file was deleted.

app/code/Meta/BusinessExtension/Setup/UpgradeData.php

Lines changed: 0 additions & 141 deletions
This file was deleted.

app/code/Meta/Catalog/Controller/Adminhtml/Ajax/ProductFeedUpload.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ class ProductFeedUpload extends AbstractAjax
4444
private $systemConfig;
4545

4646
/**
47+
* Construct
48+
*
4749
* @param Context $context
4850
* @param JsonFactory $resultJsonFactory
4951
* @param FBEHelper $fbeHelper
@@ -64,6 +66,8 @@ public function __construct(
6466
}
6567

6668
/**
69+
* Execute for json
70+
*
6771
* @return array
6872
* @throws NoSuchEntityException
6973
*/
@@ -82,9 +86,11 @@ public function executeForJson()
8286
$storeName = $this->systemConfig->getStoreManager()->getStore($storeId)->getName();
8387
}
8488

85-
if (!$this->systemConfig->getAccessToken()) {
89+
if (!$this->systemConfig->getAccessToken($storeId)) {
8690
$response['success'] = false;
87-
$response['message'] = __(sprintf('Before uploading products, set up the extension for \'%s\'.', $storeName));
91+
$response['message'] = __(
92+
sprintf('Before uploading products, set up the extension for \'%s\'.', $storeName)
93+
);
8894
return $response;
8995
}
9096

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

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
use Magento\Catalog\Model\ResourceModel\Category\CollectionFactory as CategoryCollectionFactory;
3030
use Magento\Framework\Exception\LocalizedException;
3131
use Magento\Framework\Escaper;
32+
use Magento\Framework\Filter\StripTagsFactory;
3233
use Magento\Customer\Model\GroupManagement;
3334

3435
class Builder
@@ -114,6 +115,11 @@ class Builder
114115
*/
115116
private $escaper;
116117

118+
/**
119+
* @var StripTagsFactory
120+
*/
121+
private $stripTags;
122+
117123
/**
118124
* Constructor
119125
*
@@ -125,6 +131,7 @@ class Builder
125131
* @param CatalogHelper $catalogHelper
126132
* @param InventoryInterface $inventory
127133
* @param Escaper $escaper
134+
* @param StripTagsFactory $stripTags
128135
*/
129136
public function __construct(
130137
FBEHelper $fbeHelper,
@@ -134,9 +141,9 @@ public function __construct(
134141
ProductIdentifier $productIdentifier,
135142
CatalogHelper $catalogHelper,
136143
InventoryInterface $inventory,
137-
Escaper $escaper
138-
)
139-
{
144+
Escaper $escaper,
145+
StripTagsFactory $stripTags
146+
) {
140147
$this->fbeHelper = $fbeHelper;
141148
$this->systemConfig = $systemConfig;
142149
$this->categoryCollectionFactory = $categoryCollectionFactory;
@@ -145,6 +152,7 @@ public function __construct(
145152
$this->catalogHelper = $catalogHelper;
146153
$this->inventory = $inventory;
147154
$this->escaper = $escaper;
155+
$this->stripTags = $stripTags;
148156
}
149157

150158
/**
@@ -402,8 +410,12 @@ private function getRichDescription(Product $product)
402410
if (!$description) {
403411
$description = $product->getShortDescription();
404412
}
413+
if (!$description) {
414+
return '';
415+
}
416+
$stripTags = $this->stripTags->create([$this->escaper, self::ALLOWED_TAGS_FOR_RICH_TEXT_DESCRIPTION]);
405417
return $this->trimAttribute(self::ATTR_RICH_DESCRIPTION,
406-
strip_tags($description, self::ALLOWED_TAGS_FOR_RICH_TEXT_DESCRIPTION));
418+
$stripTags->filter($description));
407419
}
408420

409421
/**

0 commit comments

Comments
 (0)