diff --git a/Model/ShareCartRepository.php b/Model/ShareCartRepository.php index 18c80cd..995fd62 100644 --- a/Model/ShareCartRepository.php +++ b/Model/ShareCartRepository.php @@ -124,10 +124,12 @@ public function share($mpShareCartToken) ->getOrderOptions($item->getProduct()); $info = $options['info_buyRequest']; $productType = $item->getProductType(); + $info['qty'] = $item->getQty(); + if ($productType === 'configurable' || $productType === 'bundle') { $this->cart->addProduct($product, $info); } else { - $this->cart->addProduct($item->getProduct(), $item->getQty()); + $this->cart->addProduct($item->getProduct(), $info); } } catch (NoSuchEntityException $e) { throw new LocalizedException(__('Can not add product to cart')); diff --git a/composer.json b/composer.json index fea6a93..c079eff 100644 --- a/composer.json +++ b/composer.json @@ -1,27 +1,27 @@ -{ - "name": "mageplaza/module-share-cart", - "description": "Magento 2 Share Cart extension", - "type": "magento2-module", - "require": { - "mageplaza/module-core": "^1.4.5", - "mpdf/mpdf": "^7.1.0 | ^8.0.0" - }, - "version": "1.1.2", - "license": "proprietary", - "authors": [ - { - "name": "Mageplaza", - "email": "support@mageplaza.com", - "homepage": "https://www.mageplaza.com", - "role": "Technical Support" - } - ], - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Mageplaza\\ShareCart\\": "" - } - } -} +{ + "name": "mageplaza/module-share-cart", + "description": "Magento 2 Share Cart extension", + "type": "magento2-module", + "require": { + "mageplaza/module-core": "^1.4.5", + "mpdf/mpdf": "^7.1.0 | ^8.0.0" + }, + "version": "4.0.0", + "license": "proprietary", + "authors": [ + { + "name": "Mageplaza", + "email": "support@mageplaza.com", + "homepage": "https://www.mageplaza.com", + "role": "Technical Support" + } + ], + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Mageplaza\\ShareCart\\": "" + } + } +}