Adding a Product to the Cart via Querystring using SKUAdding a Product to the Cart via Querystring using SKU in magento 1.9Adding to Cart with Querystring - Takes me to homepage?Adding product SKU into existing Cart Price rule Magento 1.7.0.2Unable to add product in cart with custom option via querystringMultiple Add to Cart Button from External php site using product idAdd product sku in URLHow can I get the product details (like SKU) on JS when “Add to Cart” button is clicked?Add a product to cart in checkout cart page?Why the product button aren't adding into the cart?Issue in adding the product to cart

Is there a creature that is resistant or immune to non-magical damage other than bludgeoning, slashing, and piercing?

Is honey really a supersaturated solution? Does heating to un-crystalize redissolve it or melt it?

I seem to dance, I am not a dancer. Who am I?

Is it possible to stack the damage done by the Absorb Elements spell?

Why is indicated airspeed rather than ground speed used during the takeoff roll?

How do hiring committees for research positions view getting "scooped"?

What exactly term 'companion plants' means?

Have the tides ever turned twice on any open problem?

I got the following comment from a reputed math journal. What does it mean?

Print a physical multiplication table

Describing a chess game in a novel

Geography in 3D perspective

Would it be believable to defy demographics in a story?

Calculate the frequency of characters in a string

Maths symbols and unicode-math input inside siunitx commands

Do native speakers use "ultima" and "proxima" frequently in spoken English?

Should I use acronyms in dialogues before telling the readers what it stands for in fiction?

Relation between independence and correlation of uniform random variables

Help prove this basic trig identity please!

Turning a hard to access nut?

Does .bashrc contain syntax errors?

Variable completely messes up echoed string

What does Jesus mean regarding "Raca," and "you fool?" - is he contrasting them?

Is it insecure to send a password in a `curl` command?



Adding a Product to the Cart via Querystring using SKU


Adding a Product to the Cart via Querystring using SKU in magento 1.9Adding to Cart with Querystring - Takes me to homepage?Adding product SKU into existing Cart Price rule Magento 1.7.0.2Unable to add product in cart with custom option via querystringMultiple Add to Cart Button from External php site using product idAdd product sku in URLHow can I get the product details (like SKU) on JS when “Add to Cart” button is clicked?Add a product to cart in checkout cart page?Why the product button aren't adding into the cart?Issue in adding the product to cart













2















I know that we can adding a product to cart via querystring.

but how do we add sku to cart via querystring in url without including product id
like this :

domain/checkout/cart/add?sku=ABC
or
domain/checkout/cart/add/sku=BC










share|improve this question


























    2















    I know that we can adding a product to cart via querystring.

    but how do we add sku to cart via querystring in url without including product id
    like this :

    domain/checkout/cart/add?sku=ABC
    or
    domain/checkout/cart/add/sku=BC










    share|improve this question
























      2












      2








      2








      I know that we can adding a product to cart via querystring.

      but how do we add sku to cart via querystring in url without including product id
      like this :

      domain/checkout/cart/add?sku=ABC
      or
      domain/checkout/cart/add/sku=BC










      share|improve this question














      I know that we can adding a product to cart via querystring.

      but how do we add sku to cart via querystring in url without including product id
      like this :

      domain/checkout/cart/add?sku=ABC
      or
      domain/checkout/cart/add/sku=BC







      addtocart query sku






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 24 '14 at 3:08









      Andhi IrawanAndhi Irawan

      3771720




      3771720




















          2 Answers
          2






          active

          oldest

          votes


















          2














          Andhi Irawan,you can not do this type of work at checkout Cart controllers. If want this type of work then you need to rewrite Checkout CartController.php and on this class magento is load the product object by id before going to cart,So you need load product by sku on this place .



          Step 1: rewrite cartController.php and code is for xml rewrite



           <frontend>
          <routers>
          <checkout>
          <args>
          <modules>
          <customcart before="Mage_Checkout">YourNameSpace_YourMOdule</customcart>
          </modules>
          </args>
          </checkout>
          </routers>
          </frontend>


          Step2: and on your extended Cartcontorller _initProduct function you need product load product by sku



           protected function _initProduct()

          $sku=$this->getRequest()->setParam('sku');
          $_catalog = Mage::getModel('catalog/product');
          $idBySku = $_catalog->getIdBySku($sku);

          if ($idBySku)
          $productId = $idBySku;
          $this->getRequest()->setParam('product', $productId );
          else
          $productId = (int) $this->getRequest()->getParam('product');

          if ($productId)
          $product = Mage::getModel('catalog/product')
          ->setStoreId(Mage::app()->getStore()->getId())
          ->load($productId);
          if ($product->getId())
          return $product;



          return false;



          How to rewrite controller see more at : http://www.amitbera.com/how-to-override-a-controller-in-magento/






          share|improve this answer

























          • Amit Bera, thank you for your help. i had read your tutorial how to override controller. previous checkout module is apparently already override on the path codelocalABCCheckout. so I do not change the file config.xml. I added a function _initProduct in codelocalABCCheckoutcontrollersCartController.php.The following config.xml file contents:<br/><?xml version="1.0" ?><config><frontend><routers><checkout><args><modules><abc_checkout before="Mage_Checkout">ABC_Checkout</abc_checkout></modules></args></checkout></routers></frontend></config>

            – Andhi Irawan
            Nov 24 '14 at 8:03












          • my appcodelocalABCCheckoutcontrollersCartController.php : pastebin.com/873rBFYm

            – Andhi Irawan
            Nov 24 '14 at 8:56











          • On magenot 1.9 magent is used form key which is validate your cart is proper or not if (!$this->_validateFormKey()) $this->_goBack(); return;

            – Amit Bera
            Nov 24 '14 at 9:04











          • hey,is it resolved or not

            – Amit Bera
            Nov 25 '14 at 7:51











          • hi Amit Bera, sorry I was sick yesterday. my Magento version 1.7. and yes, it resolved. thanks to you and the tutorial you made. i modify the config.xml, function _initProduct() in CartController.php and adding a helper file appcodelocalABCCheckoutHelperCart.php

            – Andhi Irawan
            Nov 27 '14 at 7:10


















          1














          my function _initProduct() : pastebin.com/873rBFYm



          protected function _initProduct()

          $sku = $this->getRequest()->getParam('sku');
          $productId = (int) $this->getRequest()->getParam('product');

          if($sku)
          $params = $this->getRequest()->getParams();
          $productId = Mage::helper('checkout/cart')->getProductIdByParams($params, false);
          if(! $productId)
          return false;



          if ($productId)
          $product = Mage::getModel('catalog/product')
          ->setStoreId(Mage::app()->getStore()->getId())
          ->load($productId);
          if ($product->getId())
          return $product;


          return false;



          my config.xml : pastebin.com/Ks85etyQ



          <?xml version="1.0" ?><config>
          <frontend>
          <routers>
          <checkout>
          <args>
          <modules>
          <abc_checkout before="Mage_Checkout">ABC_Checkout</abc_checkout>
          </modules>
          </args>
          </checkout>
          </routers>
          </frontend><global><helpers>
          <checkout>
          <rewrite>
          <cart>ABC_Checkout_Helper_Cart</cart>
          </rewrite>
          </checkout>
          </helpers></global></config>


          my helper : appcodelocalABCCheckoutHelperCart.php : pastebin.com/RZGSKJdr



          <?php class ABC_Checkout_Helper_Cart extends Mage_Checkout_Helper_Cart
          public function getProductIdByParams($param, $outputFlag = true)
          $sku = trim($param['sku']);
          $_product = Mage::getModel('catalog/product')->setStoreId(Mage::app()->getStore()->getId())
          ->loadByAttribute('sku', $sku);

          if($_product)
          $productTypeId = $_product->getTypeId();
          $productId = $_product->getId();
          if($productTypeId == 'simple')
          $result = $outputFlag ? true : $productId;

          elseif($productTypeId == 'configurable')
          $color = trim($param['color']);
          $size = trim($param['size']);
          $config = trim($param['option']);

          $configurableProduct = Mage::getModel('catalog/product_type_configurable')->setProduct($_product);
          $simpleCollections = $configurableProduct->getUsedProductCollection()
          ->addAttributeToSelect('id');
          if(! empty($color))
          $attrColor = $_product->getResource()->getAttribute("sp_color");
          $colorId = $attrColor->usesSource() ? $attrColor->getSource()->getOptionId($color) : '';
          $simpleCollections->addAttributeToFilter('sp_color', $colorId);

          if(! empty($size))
          $attrSize = $_product->getResource()->getAttribute("sp_size");
          $sizeId = $attrSize->usesSource() ? $attrSize->getSource()->getOptionId($size) : '';
          $simpleCollections->addAttributeToFilter('sp_size', $sizeId);

          if(! empty($config))
          $attrConfig = $_product->getResource()->getAttribute("sp_config");
          $configId = $attrConfig->usesSource() ? $attrConfig->getSource()->getOptionId($config) : '';
          $simpleCollections->addAttributeToFilter('sp_config', $configId);

          $simpleCollections->addFilterByRequiredOptions();

          if($simpleCollections->count() == 1)
          $productId = $simpleCollections->getFirstItem()->getId();
          $result = $outputFlag ? true : $productId;

          else
          $result = false;



          return $result;

          return false;



          so sku can be adding via url querystring like this :



          SIMPLE PRODUCT



          Parameter:<br/>
          ~ sku<br/>
          ~ qty<br/>


          a. Add product with qty = 1



          domain/id/index.php/checkout/cart/add/sku/ABCD<br/>
          or<br/>
          domain/id/index.php/checkout/cart/add?sku=ABCD


          b. Add product with qty more than 1



          domain/id/index.php/checkout/cart/add/sku/ABCD/qty/3<br/>
          or<br/>
          domain/id/index.php/checkout/cart/add?sku=ABCD&qty=3<br/>

          CONFIGURABLE PRODUCT<br/>
          Parameter:<br/>
          ~ sku<br/>
          ~ color<br/>
          ~ size<br/>
          ~ option (ex: used by XYZ)<br/>
          ~ qty<br/>
          ~ __store (id or en)<br/>


          a. Add product with qty = 1



          domain/id/index.php/checkout/cart/add/sku/XYZ/color/merah tua/size/M/__store/id<br/>
          domain/id/index.php/checkout/cart/add/sku/XYZ/color/maroon/size/M/__store/en<br/>
          domain/id/index.php/checkout/cart/add/sku/XYZ/option/bilqis/__store/id<br/>
          or<br/>
          domain/id/index.php/checkout/cart/add?sku=XYZ&color=merah tua&size=M&__store=id<br/>
          domain/id/index.php/checkout/cart/add?sku=XYZ&color=maroon&size=M&__store=en<br/>
          domain/id/index.php/checkout/cart/add?sku=XYZ&option=bilqis&__store=id<br/>


          b. Add product with qty more than 1



          domain/id/index.php/checkout/cart/add/sku/XYZ/color/merah tua/size/M/qty/3/__store/id<br/>
          domain/id/index.php/checkout/cart/add/sku/XYZ/color/maroon/size/M/qty/3/__store/en<br/>
          domain/id/index.php/checkout/cart/add/sku/XYZ/option/bilqis/qty/3/__store/id<br/>
          or<br/>
          domain/id/index.php/checkout/cart/add?sku=XYZ&color=merah tua&size=M&qty=3&__store=id<br/>
          domain/id/index.php/checkout/cart/add?sku=XYZ&color=maroon&size=M&qty=3&__store=en<br/>
          domain/id/index.php/checkout/cart/add?sku=XYZ&option=bilqis&qty=3&__store=id





          share|improve this answer
























            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "479"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f45132%2fadding-a-product-to-the-cart-via-querystring-using-sku%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            2














            Andhi Irawan,you can not do this type of work at checkout Cart controllers. If want this type of work then you need to rewrite Checkout CartController.php and on this class magento is load the product object by id before going to cart,So you need load product by sku on this place .



            Step 1: rewrite cartController.php and code is for xml rewrite



             <frontend>
            <routers>
            <checkout>
            <args>
            <modules>
            <customcart before="Mage_Checkout">YourNameSpace_YourMOdule</customcart>
            </modules>
            </args>
            </checkout>
            </routers>
            </frontend>


            Step2: and on your extended Cartcontorller _initProduct function you need product load product by sku



             protected function _initProduct()

            $sku=$this->getRequest()->setParam('sku');
            $_catalog = Mage::getModel('catalog/product');
            $idBySku = $_catalog->getIdBySku($sku);

            if ($idBySku)
            $productId = $idBySku;
            $this->getRequest()->setParam('product', $productId );
            else
            $productId = (int) $this->getRequest()->getParam('product');

            if ($productId)
            $product = Mage::getModel('catalog/product')
            ->setStoreId(Mage::app()->getStore()->getId())
            ->load($productId);
            if ($product->getId())
            return $product;



            return false;



            How to rewrite controller see more at : http://www.amitbera.com/how-to-override-a-controller-in-magento/






            share|improve this answer

























            • Amit Bera, thank you for your help. i had read your tutorial how to override controller. previous checkout module is apparently already override on the path codelocalABCCheckout. so I do not change the file config.xml. I added a function _initProduct in codelocalABCCheckoutcontrollersCartController.php.The following config.xml file contents:<br/><?xml version="1.0" ?><config><frontend><routers><checkout><args><modules><abc_checkout before="Mage_Checkout">ABC_Checkout</abc_checkout></modules></args></checkout></routers></frontend></config>

              – Andhi Irawan
              Nov 24 '14 at 8:03












            • my appcodelocalABCCheckoutcontrollersCartController.php : pastebin.com/873rBFYm

              – Andhi Irawan
              Nov 24 '14 at 8:56











            • On magenot 1.9 magent is used form key which is validate your cart is proper or not if (!$this->_validateFormKey()) $this->_goBack(); return;

              – Amit Bera
              Nov 24 '14 at 9:04











            • hey,is it resolved or not

              – Amit Bera
              Nov 25 '14 at 7:51











            • hi Amit Bera, sorry I was sick yesterday. my Magento version 1.7. and yes, it resolved. thanks to you and the tutorial you made. i modify the config.xml, function _initProduct() in CartController.php and adding a helper file appcodelocalABCCheckoutHelperCart.php

              – Andhi Irawan
              Nov 27 '14 at 7:10















            2














            Andhi Irawan,you can not do this type of work at checkout Cart controllers. If want this type of work then you need to rewrite Checkout CartController.php and on this class magento is load the product object by id before going to cart,So you need load product by sku on this place .



            Step 1: rewrite cartController.php and code is for xml rewrite



             <frontend>
            <routers>
            <checkout>
            <args>
            <modules>
            <customcart before="Mage_Checkout">YourNameSpace_YourMOdule</customcart>
            </modules>
            </args>
            </checkout>
            </routers>
            </frontend>


            Step2: and on your extended Cartcontorller _initProduct function you need product load product by sku



             protected function _initProduct()

            $sku=$this->getRequest()->setParam('sku');
            $_catalog = Mage::getModel('catalog/product');
            $idBySku = $_catalog->getIdBySku($sku);

            if ($idBySku)
            $productId = $idBySku;
            $this->getRequest()->setParam('product', $productId );
            else
            $productId = (int) $this->getRequest()->getParam('product');

            if ($productId)
            $product = Mage::getModel('catalog/product')
            ->setStoreId(Mage::app()->getStore()->getId())
            ->load($productId);
            if ($product->getId())
            return $product;



            return false;



            How to rewrite controller see more at : http://www.amitbera.com/how-to-override-a-controller-in-magento/






            share|improve this answer

























            • Amit Bera, thank you for your help. i had read your tutorial how to override controller. previous checkout module is apparently already override on the path codelocalABCCheckout. so I do not change the file config.xml. I added a function _initProduct in codelocalABCCheckoutcontrollersCartController.php.The following config.xml file contents:<br/><?xml version="1.0" ?><config><frontend><routers><checkout><args><modules><abc_checkout before="Mage_Checkout">ABC_Checkout</abc_checkout></modules></args></checkout></routers></frontend></config>

              – Andhi Irawan
              Nov 24 '14 at 8:03












            • my appcodelocalABCCheckoutcontrollersCartController.php : pastebin.com/873rBFYm

              – Andhi Irawan
              Nov 24 '14 at 8:56











            • On magenot 1.9 magent is used form key which is validate your cart is proper or not if (!$this->_validateFormKey()) $this->_goBack(); return;

              – Amit Bera
              Nov 24 '14 at 9:04











            • hey,is it resolved or not

              – Amit Bera
              Nov 25 '14 at 7:51











            • hi Amit Bera, sorry I was sick yesterday. my Magento version 1.7. and yes, it resolved. thanks to you and the tutorial you made. i modify the config.xml, function _initProduct() in CartController.php and adding a helper file appcodelocalABCCheckoutHelperCart.php

              – Andhi Irawan
              Nov 27 '14 at 7:10













            2












            2








            2







            Andhi Irawan,you can not do this type of work at checkout Cart controllers. If want this type of work then you need to rewrite Checkout CartController.php and on this class magento is load the product object by id before going to cart,So you need load product by sku on this place .



            Step 1: rewrite cartController.php and code is for xml rewrite



             <frontend>
            <routers>
            <checkout>
            <args>
            <modules>
            <customcart before="Mage_Checkout">YourNameSpace_YourMOdule</customcart>
            </modules>
            </args>
            </checkout>
            </routers>
            </frontend>


            Step2: and on your extended Cartcontorller _initProduct function you need product load product by sku



             protected function _initProduct()

            $sku=$this->getRequest()->setParam('sku');
            $_catalog = Mage::getModel('catalog/product');
            $idBySku = $_catalog->getIdBySku($sku);

            if ($idBySku)
            $productId = $idBySku;
            $this->getRequest()->setParam('product', $productId );
            else
            $productId = (int) $this->getRequest()->getParam('product');

            if ($productId)
            $product = Mage::getModel('catalog/product')
            ->setStoreId(Mage::app()->getStore()->getId())
            ->load($productId);
            if ($product->getId())
            return $product;



            return false;



            How to rewrite controller see more at : http://www.amitbera.com/how-to-override-a-controller-in-magento/






            share|improve this answer















            Andhi Irawan,you can not do this type of work at checkout Cart controllers. If want this type of work then you need to rewrite Checkout CartController.php and on this class magento is load the product object by id before going to cart,So you need load product by sku on this place .



            Step 1: rewrite cartController.php and code is for xml rewrite



             <frontend>
            <routers>
            <checkout>
            <args>
            <modules>
            <customcart before="Mage_Checkout">YourNameSpace_YourMOdule</customcart>
            </modules>
            </args>
            </checkout>
            </routers>
            </frontend>


            Step2: and on your extended Cartcontorller _initProduct function you need product load product by sku



             protected function _initProduct()

            $sku=$this->getRequest()->setParam('sku');
            $_catalog = Mage::getModel('catalog/product');
            $idBySku = $_catalog->getIdBySku($sku);

            if ($idBySku)
            $productId = $idBySku;
            $this->getRequest()->setParam('product', $productId );
            else
            $productId = (int) $this->getRequest()->getParam('product');

            if ($productId)
            $product = Mage::getModel('catalog/product')
            ->setStoreId(Mage::app()->getStore()->getId())
            ->load($productId);
            if ($product->getId())
            return $product;



            return false;



            How to rewrite controller see more at : http://www.amitbera.com/how-to-override-a-controller-in-magento/







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Nov 24 '14 at 5:22

























            answered Nov 24 '14 at 4:41









            Amit BeraAmit Bera

            59.2k1575176




            59.2k1575176












            • Amit Bera, thank you for your help. i had read your tutorial how to override controller. previous checkout module is apparently already override on the path codelocalABCCheckout. so I do not change the file config.xml. I added a function _initProduct in codelocalABCCheckoutcontrollersCartController.php.The following config.xml file contents:<br/><?xml version="1.0" ?><config><frontend><routers><checkout><args><modules><abc_checkout before="Mage_Checkout">ABC_Checkout</abc_checkout></modules></args></checkout></routers></frontend></config>

              – Andhi Irawan
              Nov 24 '14 at 8:03












            • my appcodelocalABCCheckoutcontrollersCartController.php : pastebin.com/873rBFYm

              – Andhi Irawan
              Nov 24 '14 at 8:56











            • On magenot 1.9 magent is used form key which is validate your cart is proper or not if (!$this->_validateFormKey()) $this->_goBack(); return;

              – Amit Bera
              Nov 24 '14 at 9:04











            • hey,is it resolved or not

              – Amit Bera
              Nov 25 '14 at 7:51











            • hi Amit Bera, sorry I was sick yesterday. my Magento version 1.7. and yes, it resolved. thanks to you and the tutorial you made. i modify the config.xml, function _initProduct() in CartController.php and adding a helper file appcodelocalABCCheckoutHelperCart.php

              – Andhi Irawan
              Nov 27 '14 at 7:10

















            • Amit Bera, thank you for your help. i had read your tutorial how to override controller. previous checkout module is apparently already override on the path codelocalABCCheckout. so I do not change the file config.xml. I added a function _initProduct in codelocalABCCheckoutcontrollersCartController.php.The following config.xml file contents:<br/><?xml version="1.0" ?><config><frontend><routers><checkout><args><modules><abc_checkout before="Mage_Checkout">ABC_Checkout</abc_checkout></modules></args></checkout></routers></frontend></config>

              – Andhi Irawan
              Nov 24 '14 at 8:03












            • my appcodelocalABCCheckoutcontrollersCartController.php : pastebin.com/873rBFYm

              – Andhi Irawan
              Nov 24 '14 at 8:56











            • On magenot 1.9 magent is used form key which is validate your cart is proper or not if (!$this->_validateFormKey()) $this->_goBack(); return;

              – Amit Bera
              Nov 24 '14 at 9:04











            • hey,is it resolved or not

              – Amit Bera
              Nov 25 '14 at 7:51











            • hi Amit Bera, sorry I was sick yesterday. my Magento version 1.7. and yes, it resolved. thanks to you and the tutorial you made. i modify the config.xml, function _initProduct() in CartController.php and adding a helper file appcodelocalABCCheckoutHelperCart.php

              – Andhi Irawan
              Nov 27 '14 at 7:10
















            Amit Bera, thank you for your help. i had read your tutorial how to override controller. previous checkout module is apparently already override on the path codelocalABCCheckout. so I do not change the file config.xml. I added a function _initProduct in codelocalABCCheckoutcontrollersCartController.php.The following config.xml file contents:<br/><?xml version="1.0" ?><config><frontend><routers><checkout><args><modules><abc_checkout before="Mage_Checkout">ABC_Checkout</abc_checkout></modules></args></checkout></routers></frontend></config>

            – Andhi Irawan
            Nov 24 '14 at 8:03






            Amit Bera, thank you for your help. i had read your tutorial how to override controller. previous checkout module is apparently already override on the path codelocalABCCheckout. so I do not change the file config.xml. I added a function _initProduct in codelocalABCCheckoutcontrollersCartController.php.The following config.xml file contents:<br/><?xml version="1.0" ?><config><frontend><routers><checkout><args><modules><abc_checkout before="Mage_Checkout">ABC_Checkout</abc_checkout></modules></args></checkout></routers></frontend></config>

            – Andhi Irawan
            Nov 24 '14 at 8:03














            my appcodelocalABCCheckoutcontrollersCartController.php : pastebin.com/873rBFYm

            – Andhi Irawan
            Nov 24 '14 at 8:56





            my appcodelocalABCCheckoutcontrollersCartController.php : pastebin.com/873rBFYm

            – Andhi Irawan
            Nov 24 '14 at 8:56













            On magenot 1.9 magent is used form key which is validate your cart is proper or not if (!$this->_validateFormKey()) $this->_goBack(); return;

            – Amit Bera
            Nov 24 '14 at 9:04





            On magenot 1.9 magent is used form key which is validate your cart is proper or not if (!$this->_validateFormKey()) $this->_goBack(); return;

            – Amit Bera
            Nov 24 '14 at 9:04













            hey,is it resolved or not

            – Amit Bera
            Nov 25 '14 at 7:51





            hey,is it resolved or not

            – Amit Bera
            Nov 25 '14 at 7:51













            hi Amit Bera, sorry I was sick yesterday. my Magento version 1.7. and yes, it resolved. thanks to you and the tutorial you made. i modify the config.xml, function _initProduct() in CartController.php and adding a helper file appcodelocalABCCheckoutHelperCart.php

            – Andhi Irawan
            Nov 27 '14 at 7:10





            hi Amit Bera, sorry I was sick yesterday. my Magento version 1.7. and yes, it resolved. thanks to you and the tutorial you made. i modify the config.xml, function _initProduct() in CartController.php and adding a helper file appcodelocalABCCheckoutHelperCart.php

            – Andhi Irawan
            Nov 27 '14 at 7:10













            1














            my function _initProduct() : pastebin.com/873rBFYm



            protected function _initProduct()

            $sku = $this->getRequest()->getParam('sku');
            $productId = (int) $this->getRequest()->getParam('product');

            if($sku)
            $params = $this->getRequest()->getParams();
            $productId = Mage::helper('checkout/cart')->getProductIdByParams($params, false);
            if(! $productId)
            return false;



            if ($productId)
            $product = Mage::getModel('catalog/product')
            ->setStoreId(Mage::app()->getStore()->getId())
            ->load($productId);
            if ($product->getId())
            return $product;


            return false;



            my config.xml : pastebin.com/Ks85etyQ



            <?xml version="1.0" ?><config>
            <frontend>
            <routers>
            <checkout>
            <args>
            <modules>
            <abc_checkout before="Mage_Checkout">ABC_Checkout</abc_checkout>
            </modules>
            </args>
            </checkout>
            </routers>
            </frontend><global><helpers>
            <checkout>
            <rewrite>
            <cart>ABC_Checkout_Helper_Cart</cart>
            </rewrite>
            </checkout>
            </helpers></global></config>


            my helper : appcodelocalABCCheckoutHelperCart.php : pastebin.com/RZGSKJdr



            <?php class ABC_Checkout_Helper_Cart extends Mage_Checkout_Helper_Cart
            public function getProductIdByParams($param, $outputFlag = true)
            $sku = trim($param['sku']);
            $_product = Mage::getModel('catalog/product')->setStoreId(Mage::app()->getStore()->getId())
            ->loadByAttribute('sku', $sku);

            if($_product)
            $productTypeId = $_product->getTypeId();
            $productId = $_product->getId();
            if($productTypeId == 'simple')
            $result = $outputFlag ? true : $productId;

            elseif($productTypeId == 'configurable')
            $color = trim($param['color']);
            $size = trim($param['size']);
            $config = trim($param['option']);

            $configurableProduct = Mage::getModel('catalog/product_type_configurable')->setProduct($_product);
            $simpleCollections = $configurableProduct->getUsedProductCollection()
            ->addAttributeToSelect('id');
            if(! empty($color))
            $attrColor = $_product->getResource()->getAttribute("sp_color");
            $colorId = $attrColor->usesSource() ? $attrColor->getSource()->getOptionId($color) : '';
            $simpleCollections->addAttributeToFilter('sp_color', $colorId);

            if(! empty($size))
            $attrSize = $_product->getResource()->getAttribute("sp_size");
            $sizeId = $attrSize->usesSource() ? $attrSize->getSource()->getOptionId($size) : '';
            $simpleCollections->addAttributeToFilter('sp_size', $sizeId);

            if(! empty($config))
            $attrConfig = $_product->getResource()->getAttribute("sp_config");
            $configId = $attrConfig->usesSource() ? $attrConfig->getSource()->getOptionId($config) : '';
            $simpleCollections->addAttributeToFilter('sp_config', $configId);

            $simpleCollections->addFilterByRequiredOptions();

            if($simpleCollections->count() == 1)
            $productId = $simpleCollections->getFirstItem()->getId();
            $result = $outputFlag ? true : $productId;

            else
            $result = false;



            return $result;

            return false;



            so sku can be adding via url querystring like this :



            SIMPLE PRODUCT



            Parameter:<br/>
            ~ sku<br/>
            ~ qty<br/>


            a. Add product with qty = 1



            domain/id/index.php/checkout/cart/add/sku/ABCD<br/>
            or<br/>
            domain/id/index.php/checkout/cart/add?sku=ABCD


            b. Add product with qty more than 1



            domain/id/index.php/checkout/cart/add/sku/ABCD/qty/3<br/>
            or<br/>
            domain/id/index.php/checkout/cart/add?sku=ABCD&qty=3<br/>

            CONFIGURABLE PRODUCT<br/>
            Parameter:<br/>
            ~ sku<br/>
            ~ color<br/>
            ~ size<br/>
            ~ option (ex: used by XYZ)<br/>
            ~ qty<br/>
            ~ __store (id or en)<br/>


            a. Add product with qty = 1



            domain/id/index.php/checkout/cart/add/sku/XYZ/color/merah tua/size/M/__store/id<br/>
            domain/id/index.php/checkout/cart/add/sku/XYZ/color/maroon/size/M/__store/en<br/>
            domain/id/index.php/checkout/cart/add/sku/XYZ/option/bilqis/__store/id<br/>
            or<br/>
            domain/id/index.php/checkout/cart/add?sku=XYZ&color=merah tua&size=M&__store=id<br/>
            domain/id/index.php/checkout/cart/add?sku=XYZ&color=maroon&size=M&__store=en<br/>
            domain/id/index.php/checkout/cart/add?sku=XYZ&option=bilqis&__store=id<br/>


            b. Add product with qty more than 1



            domain/id/index.php/checkout/cart/add/sku/XYZ/color/merah tua/size/M/qty/3/__store/id<br/>
            domain/id/index.php/checkout/cart/add/sku/XYZ/color/maroon/size/M/qty/3/__store/en<br/>
            domain/id/index.php/checkout/cart/add/sku/XYZ/option/bilqis/qty/3/__store/id<br/>
            or<br/>
            domain/id/index.php/checkout/cart/add?sku=XYZ&color=merah tua&size=M&qty=3&__store=id<br/>
            domain/id/index.php/checkout/cart/add?sku=XYZ&color=maroon&size=M&qty=3&__store=en<br/>
            domain/id/index.php/checkout/cart/add?sku=XYZ&option=bilqis&qty=3&__store=id





            share|improve this answer





























              1














              my function _initProduct() : pastebin.com/873rBFYm



              protected function _initProduct()

              $sku = $this->getRequest()->getParam('sku');
              $productId = (int) $this->getRequest()->getParam('product');

              if($sku)
              $params = $this->getRequest()->getParams();
              $productId = Mage::helper('checkout/cart')->getProductIdByParams($params, false);
              if(! $productId)
              return false;



              if ($productId)
              $product = Mage::getModel('catalog/product')
              ->setStoreId(Mage::app()->getStore()->getId())
              ->load($productId);
              if ($product->getId())
              return $product;


              return false;



              my config.xml : pastebin.com/Ks85etyQ



              <?xml version="1.0" ?><config>
              <frontend>
              <routers>
              <checkout>
              <args>
              <modules>
              <abc_checkout before="Mage_Checkout">ABC_Checkout</abc_checkout>
              </modules>
              </args>
              </checkout>
              </routers>
              </frontend><global><helpers>
              <checkout>
              <rewrite>
              <cart>ABC_Checkout_Helper_Cart</cart>
              </rewrite>
              </checkout>
              </helpers></global></config>


              my helper : appcodelocalABCCheckoutHelperCart.php : pastebin.com/RZGSKJdr



              <?php class ABC_Checkout_Helper_Cart extends Mage_Checkout_Helper_Cart
              public function getProductIdByParams($param, $outputFlag = true)
              $sku = trim($param['sku']);
              $_product = Mage::getModel('catalog/product')->setStoreId(Mage::app()->getStore()->getId())
              ->loadByAttribute('sku', $sku);

              if($_product)
              $productTypeId = $_product->getTypeId();
              $productId = $_product->getId();
              if($productTypeId == 'simple')
              $result = $outputFlag ? true : $productId;

              elseif($productTypeId == 'configurable')
              $color = trim($param['color']);
              $size = trim($param['size']);
              $config = trim($param['option']);

              $configurableProduct = Mage::getModel('catalog/product_type_configurable')->setProduct($_product);
              $simpleCollections = $configurableProduct->getUsedProductCollection()
              ->addAttributeToSelect('id');
              if(! empty($color))
              $attrColor = $_product->getResource()->getAttribute("sp_color");
              $colorId = $attrColor->usesSource() ? $attrColor->getSource()->getOptionId($color) : '';
              $simpleCollections->addAttributeToFilter('sp_color', $colorId);

              if(! empty($size))
              $attrSize = $_product->getResource()->getAttribute("sp_size");
              $sizeId = $attrSize->usesSource() ? $attrSize->getSource()->getOptionId($size) : '';
              $simpleCollections->addAttributeToFilter('sp_size', $sizeId);

              if(! empty($config))
              $attrConfig = $_product->getResource()->getAttribute("sp_config");
              $configId = $attrConfig->usesSource() ? $attrConfig->getSource()->getOptionId($config) : '';
              $simpleCollections->addAttributeToFilter('sp_config', $configId);

              $simpleCollections->addFilterByRequiredOptions();

              if($simpleCollections->count() == 1)
              $productId = $simpleCollections->getFirstItem()->getId();
              $result = $outputFlag ? true : $productId;

              else
              $result = false;



              return $result;

              return false;



              so sku can be adding via url querystring like this :



              SIMPLE PRODUCT



              Parameter:<br/>
              ~ sku<br/>
              ~ qty<br/>


              a. Add product with qty = 1



              domain/id/index.php/checkout/cart/add/sku/ABCD<br/>
              or<br/>
              domain/id/index.php/checkout/cart/add?sku=ABCD


              b. Add product with qty more than 1



              domain/id/index.php/checkout/cart/add/sku/ABCD/qty/3<br/>
              or<br/>
              domain/id/index.php/checkout/cart/add?sku=ABCD&qty=3<br/>

              CONFIGURABLE PRODUCT<br/>
              Parameter:<br/>
              ~ sku<br/>
              ~ color<br/>
              ~ size<br/>
              ~ option (ex: used by XYZ)<br/>
              ~ qty<br/>
              ~ __store (id or en)<br/>


              a. Add product with qty = 1



              domain/id/index.php/checkout/cart/add/sku/XYZ/color/merah tua/size/M/__store/id<br/>
              domain/id/index.php/checkout/cart/add/sku/XYZ/color/maroon/size/M/__store/en<br/>
              domain/id/index.php/checkout/cart/add/sku/XYZ/option/bilqis/__store/id<br/>
              or<br/>
              domain/id/index.php/checkout/cart/add?sku=XYZ&color=merah tua&size=M&__store=id<br/>
              domain/id/index.php/checkout/cart/add?sku=XYZ&color=maroon&size=M&__store=en<br/>
              domain/id/index.php/checkout/cart/add?sku=XYZ&option=bilqis&__store=id<br/>


              b. Add product with qty more than 1



              domain/id/index.php/checkout/cart/add/sku/XYZ/color/merah tua/size/M/qty/3/__store/id<br/>
              domain/id/index.php/checkout/cart/add/sku/XYZ/color/maroon/size/M/qty/3/__store/en<br/>
              domain/id/index.php/checkout/cart/add/sku/XYZ/option/bilqis/qty/3/__store/id<br/>
              or<br/>
              domain/id/index.php/checkout/cart/add?sku=XYZ&color=merah tua&size=M&qty=3&__store=id<br/>
              domain/id/index.php/checkout/cart/add?sku=XYZ&color=maroon&size=M&qty=3&__store=en<br/>
              domain/id/index.php/checkout/cart/add?sku=XYZ&option=bilqis&qty=3&__store=id





              share|improve this answer



























                1












                1








                1







                my function _initProduct() : pastebin.com/873rBFYm



                protected function _initProduct()

                $sku = $this->getRequest()->getParam('sku');
                $productId = (int) $this->getRequest()->getParam('product');

                if($sku)
                $params = $this->getRequest()->getParams();
                $productId = Mage::helper('checkout/cart')->getProductIdByParams($params, false);
                if(! $productId)
                return false;



                if ($productId)
                $product = Mage::getModel('catalog/product')
                ->setStoreId(Mage::app()->getStore()->getId())
                ->load($productId);
                if ($product->getId())
                return $product;


                return false;



                my config.xml : pastebin.com/Ks85etyQ



                <?xml version="1.0" ?><config>
                <frontend>
                <routers>
                <checkout>
                <args>
                <modules>
                <abc_checkout before="Mage_Checkout">ABC_Checkout</abc_checkout>
                </modules>
                </args>
                </checkout>
                </routers>
                </frontend><global><helpers>
                <checkout>
                <rewrite>
                <cart>ABC_Checkout_Helper_Cart</cart>
                </rewrite>
                </checkout>
                </helpers></global></config>


                my helper : appcodelocalABCCheckoutHelperCart.php : pastebin.com/RZGSKJdr



                <?php class ABC_Checkout_Helper_Cart extends Mage_Checkout_Helper_Cart
                public function getProductIdByParams($param, $outputFlag = true)
                $sku = trim($param['sku']);
                $_product = Mage::getModel('catalog/product')->setStoreId(Mage::app()->getStore()->getId())
                ->loadByAttribute('sku', $sku);

                if($_product)
                $productTypeId = $_product->getTypeId();
                $productId = $_product->getId();
                if($productTypeId == 'simple')
                $result = $outputFlag ? true : $productId;

                elseif($productTypeId == 'configurable')
                $color = trim($param['color']);
                $size = trim($param['size']);
                $config = trim($param['option']);

                $configurableProduct = Mage::getModel('catalog/product_type_configurable')->setProduct($_product);
                $simpleCollections = $configurableProduct->getUsedProductCollection()
                ->addAttributeToSelect('id');
                if(! empty($color))
                $attrColor = $_product->getResource()->getAttribute("sp_color");
                $colorId = $attrColor->usesSource() ? $attrColor->getSource()->getOptionId($color) : '';
                $simpleCollections->addAttributeToFilter('sp_color', $colorId);

                if(! empty($size))
                $attrSize = $_product->getResource()->getAttribute("sp_size");
                $sizeId = $attrSize->usesSource() ? $attrSize->getSource()->getOptionId($size) : '';
                $simpleCollections->addAttributeToFilter('sp_size', $sizeId);

                if(! empty($config))
                $attrConfig = $_product->getResource()->getAttribute("sp_config");
                $configId = $attrConfig->usesSource() ? $attrConfig->getSource()->getOptionId($config) : '';
                $simpleCollections->addAttributeToFilter('sp_config', $configId);

                $simpleCollections->addFilterByRequiredOptions();

                if($simpleCollections->count() == 1)
                $productId = $simpleCollections->getFirstItem()->getId();
                $result = $outputFlag ? true : $productId;

                else
                $result = false;



                return $result;

                return false;



                so sku can be adding via url querystring like this :



                SIMPLE PRODUCT



                Parameter:<br/>
                ~ sku<br/>
                ~ qty<br/>


                a. Add product with qty = 1



                domain/id/index.php/checkout/cart/add/sku/ABCD<br/>
                or<br/>
                domain/id/index.php/checkout/cart/add?sku=ABCD


                b. Add product with qty more than 1



                domain/id/index.php/checkout/cart/add/sku/ABCD/qty/3<br/>
                or<br/>
                domain/id/index.php/checkout/cart/add?sku=ABCD&qty=3<br/>

                CONFIGURABLE PRODUCT<br/>
                Parameter:<br/>
                ~ sku<br/>
                ~ color<br/>
                ~ size<br/>
                ~ option (ex: used by XYZ)<br/>
                ~ qty<br/>
                ~ __store (id or en)<br/>


                a. Add product with qty = 1



                domain/id/index.php/checkout/cart/add/sku/XYZ/color/merah tua/size/M/__store/id<br/>
                domain/id/index.php/checkout/cart/add/sku/XYZ/color/maroon/size/M/__store/en<br/>
                domain/id/index.php/checkout/cart/add/sku/XYZ/option/bilqis/__store/id<br/>
                or<br/>
                domain/id/index.php/checkout/cart/add?sku=XYZ&color=merah tua&size=M&__store=id<br/>
                domain/id/index.php/checkout/cart/add?sku=XYZ&color=maroon&size=M&__store=en<br/>
                domain/id/index.php/checkout/cart/add?sku=XYZ&option=bilqis&__store=id<br/>


                b. Add product with qty more than 1



                domain/id/index.php/checkout/cart/add/sku/XYZ/color/merah tua/size/M/qty/3/__store/id<br/>
                domain/id/index.php/checkout/cart/add/sku/XYZ/color/maroon/size/M/qty/3/__store/en<br/>
                domain/id/index.php/checkout/cart/add/sku/XYZ/option/bilqis/qty/3/__store/id<br/>
                or<br/>
                domain/id/index.php/checkout/cart/add?sku=XYZ&color=merah tua&size=M&qty=3&__store=id<br/>
                domain/id/index.php/checkout/cart/add?sku=XYZ&color=maroon&size=M&qty=3&__store=en<br/>
                domain/id/index.php/checkout/cart/add?sku=XYZ&option=bilqis&qty=3&__store=id





                share|improve this answer















                my function _initProduct() : pastebin.com/873rBFYm



                protected function _initProduct()

                $sku = $this->getRequest()->getParam('sku');
                $productId = (int) $this->getRequest()->getParam('product');

                if($sku)
                $params = $this->getRequest()->getParams();
                $productId = Mage::helper('checkout/cart')->getProductIdByParams($params, false);
                if(! $productId)
                return false;



                if ($productId)
                $product = Mage::getModel('catalog/product')
                ->setStoreId(Mage::app()->getStore()->getId())
                ->load($productId);
                if ($product->getId())
                return $product;


                return false;



                my config.xml : pastebin.com/Ks85etyQ



                <?xml version="1.0" ?><config>
                <frontend>
                <routers>
                <checkout>
                <args>
                <modules>
                <abc_checkout before="Mage_Checkout">ABC_Checkout</abc_checkout>
                </modules>
                </args>
                </checkout>
                </routers>
                </frontend><global><helpers>
                <checkout>
                <rewrite>
                <cart>ABC_Checkout_Helper_Cart</cart>
                </rewrite>
                </checkout>
                </helpers></global></config>


                my helper : appcodelocalABCCheckoutHelperCart.php : pastebin.com/RZGSKJdr



                <?php class ABC_Checkout_Helper_Cart extends Mage_Checkout_Helper_Cart
                public function getProductIdByParams($param, $outputFlag = true)
                $sku = trim($param['sku']);
                $_product = Mage::getModel('catalog/product')->setStoreId(Mage::app()->getStore()->getId())
                ->loadByAttribute('sku', $sku);

                if($_product)
                $productTypeId = $_product->getTypeId();
                $productId = $_product->getId();
                if($productTypeId == 'simple')
                $result = $outputFlag ? true : $productId;

                elseif($productTypeId == 'configurable')
                $color = trim($param['color']);
                $size = trim($param['size']);
                $config = trim($param['option']);

                $configurableProduct = Mage::getModel('catalog/product_type_configurable')->setProduct($_product);
                $simpleCollections = $configurableProduct->getUsedProductCollection()
                ->addAttributeToSelect('id');
                if(! empty($color))
                $attrColor = $_product->getResource()->getAttribute("sp_color");
                $colorId = $attrColor->usesSource() ? $attrColor->getSource()->getOptionId($color) : '';
                $simpleCollections->addAttributeToFilter('sp_color', $colorId);

                if(! empty($size))
                $attrSize = $_product->getResource()->getAttribute("sp_size");
                $sizeId = $attrSize->usesSource() ? $attrSize->getSource()->getOptionId($size) : '';
                $simpleCollections->addAttributeToFilter('sp_size', $sizeId);

                if(! empty($config))
                $attrConfig = $_product->getResource()->getAttribute("sp_config");
                $configId = $attrConfig->usesSource() ? $attrConfig->getSource()->getOptionId($config) : '';
                $simpleCollections->addAttributeToFilter('sp_config', $configId);

                $simpleCollections->addFilterByRequiredOptions();

                if($simpleCollections->count() == 1)
                $productId = $simpleCollections->getFirstItem()->getId();
                $result = $outputFlag ? true : $productId;

                else
                $result = false;



                return $result;

                return false;



                so sku can be adding via url querystring like this :



                SIMPLE PRODUCT



                Parameter:<br/>
                ~ sku<br/>
                ~ qty<br/>


                a. Add product with qty = 1



                domain/id/index.php/checkout/cart/add/sku/ABCD<br/>
                or<br/>
                domain/id/index.php/checkout/cart/add?sku=ABCD


                b. Add product with qty more than 1



                domain/id/index.php/checkout/cart/add/sku/ABCD/qty/3<br/>
                or<br/>
                domain/id/index.php/checkout/cart/add?sku=ABCD&qty=3<br/>

                CONFIGURABLE PRODUCT<br/>
                Parameter:<br/>
                ~ sku<br/>
                ~ color<br/>
                ~ size<br/>
                ~ option (ex: used by XYZ)<br/>
                ~ qty<br/>
                ~ __store (id or en)<br/>


                a. Add product with qty = 1



                domain/id/index.php/checkout/cart/add/sku/XYZ/color/merah tua/size/M/__store/id<br/>
                domain/id/index.php/checkout/cart/add/sku/XYZ/color/maroon/size/M/__store/en<br/>
                domain/id/index.php/checkout/cart/add/sku/XYZ/option/bilqis/__store/id<br/>
                or<br/>
                domain/id/index.php/checkout/cart/add?sku=XYZ&color=merah tua&size=M&__store=id<br/>
                domain/id/index.php/checkout/cart/add?sku=XYZ&color=maroon&size=M&__store=en<br/>
                domain/id/index.php/checkout/cart/add?sku=XYZ&option=bilqis&__store=id<br/>


                b. Add product with qty more than 1



                domain/id/index.php/checkout/cart/add/sku/XYZ/color/merah tua/size/M/qty/3/__store/id<br/>
                domain/id/index.php/checkout/cart/add/sku/XYZ/color/maroon/size/M/qty/3/__store/en<br/>
                domain/id/index.php/checkout/cart/add/sku/XYZ/option/bilqis/qty/3/__store/id<br/>
                or<br/>
                domain/id/index.php/checkout/cart/add?sku=XYZ&color=merah tua&size=M&qty=3&__store=id<br/>
                domain/id/index.php/checkout/cart/add?sku=XYZ&color=maroon&size=M&qty=3&__store=en<br/>
                domain/id/index.php/checkout/cart/add?sku=XYZ&option=bilqis&qty=3&__store=id






                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited 54 mins ago









                Teja Bhagavan Kollepara

                3,00641949




                3,00641949










                answered Nov 27 '14 at 7:39









                Andhi IrawanAndhi Irawan

                3771720




                3771720



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Magento Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f45132%2fadding-a-product-to-the-cart-via-querystring-using-sku%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Can not update quote_id field of “quote_item” table magento 2Magento 2.1 - We can't remove the item. (Shopping Cart doesnt allow us to remove items before becomes empty)Add value for custom quote item attribute using REST apiREST API endpoint v1/carts/cartId/items always returns error messageCorrect way to save entries to databaseHow to remove all associated quote objects of a customer completelyMagento 2 - Save value from custom input field to quote_itemGet quote_item data using quote id and product id filter in Magento 2How to set additional data to quote_item table from controller in Magento 2?What is the purpose of additional_data column in quote_item table in magento2Set Custom Price to Quote item magento2 from controller

                    Magento 2 disable Secret Key on URL's from terminal The Next CEO of Stack OverflowMagento 2 Shortcut/GUI tool to perform commandline tasks for windowsIn menu add configuration linkMagento oAuth : Generating access token and access secretMagento 2 security key issue in Third-Party API redirect URIPublic actions in admin controllersHow to Disable Cache in Custom WidgetURL Key not changing in Magento 2Product URL Key gets deleted when importing custom options - Magento 2Problem with reindex terminalMagento 2 - bin/magento Commands not working in Cpanel Terminal

                    Aasi (pallopeli) Navigointivalikko