Skip to content

Commit

Permalink
Merge pull request #16 from mageplaza/2.4-develop
Browse files Browse the repository at this point in the history
compatible with magento v2.4.0
  • Loading branch information
LuongNgoDoan authored Mar 23, 2021
2 parents 4af804d + 262ffd9 commit 0486b0b
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 28 deletions.
4 changes: 3 additions & 1 deletion Model/ShareCartRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
Expand Down
54 changes: 27 additions & 27 deletions composer.json
Original file line number Diff line number Diff line change
@@ -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": "[email protected]",
"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": "[email protected]",
"homepage": "https://www.mageplaza.com",
"role": "Technical Support"
}
],
"autoload": {
"files": [
"registration.php"
],
"psr-4": {
"Mageplaza\\ShareCart\\": ""
}
}
}

0 comments on commit 0486b0b

Please sign in to comment.