Skip to content

Commit

Permalink
issue magento#21329 rewrite fix while product website update using ma…
Browse files Browse the repository at this point in the history
…ss action
  • Loading branch information
AnshuMishra17 committed Feb 21, 2019
1 parent d8a2290 commit fbda060
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ public function execute(\Magento\Framework\Event\Observer $observer)
);

if (!empty($this->productUrlRewriteGenerator->generate($product))) {
if($this->request->getParam('remove_website_ids')) {
foreach($this->request->getParam('remove_website_ids') as $webId){
foreach($this->storeWebsiteRelation->getStoreByWebsiteId($webId) as $storeId){
if ($this->request->getParam('remove_website_ids')) {
foreach ($this->request->getParam('remove_website_ids') as $webId) {
foreach ($this->storeWebsiteRelation->getStoreByWebsiteId($webId) as $storeId) {
$this->urlPersist->deleteByData([
UrlRewrite::ENTITY_ID => $product->getId(),
UrlRewrite::ENTITY_TYPE => ProductUrlRewriteGenerator::ENTITY_TYPE,
Expand Down

0 comments on commit fbda060

Please sign in to comment.