Magento 2 Add to cart API covert quote












1















I am creating Add to cart API and is working fine with logged-in customer but I have following query:



Query:- Suppose as a guest I have added product to cart and now I am login then how to convert guest quote to customer quote.










share|improve this question





























    1















    I am creating Add to cart API and is working fine with logged-in customer but I have following query:



    Query:- Suppose as a guest I have added product to cart and now I am login then how to convert guest quote to customer quote.










    share|improve this question



























      1












      1








      1


      0






      I am creating Add to cart API and is working fine with logged-in customer but I have following query:



      Query:- Suppose as a guest I have added product to cart and now I am login then how to convert guest quote to customer quote.










      share|improve this question
















      I am creating Add to cart API and is working fine with logged-in customer but I have following query:



      Query:- Suppose as a guest I have added product to cart and now I am login then how to convert guest quote to customer quote.







      magento2






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Oct 29 '18 at 14:13









      Shashank Kumrawat

      1,3081343




      1,3081343










      asked Oct 29 '18 at 14:10









      Niranjan GondaliyaNiranjan Gondaliya

      1589




      1589






















          1 Answer
          1






          active

          oldest

          votes


















          0














          You need to create a new merge cart API for this.



          webapi.xml



          <routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">
          <route url="/V1/mergeGuestCart" method="POST">
          <service class="WebbyTroopsMergeGuestCartApiMergeGuestCartInterface" method="mergeCart"/>
          <resources>
          <resource ref="self" />
          </resources>
          <data>
          <parameter name="customerId" force="true">%customer_id%</parameter>
          </data>
          </route>
          </routes>


          MergeCartInterface.php



          namespace WebbyTroopsMergeGuestCartApi;

          /**
          * Interface MergeGuestCartInterface
          * @package WebbyTroopsMergeGuestCartApi
          */
          interface MergeGuestCartInterface
          {

          /**
          * Merge guest cart to logged in customer cart
          *
          * @param string $guestQuoteId
          * @param int $customerId
          * @return bool
          */
          public function mergeCart($guestQuoteId, $customerId);
          }


          di.xml



          <?xml version="1.0"?>
          <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
          <preference for="WebbyTroopsMergeGuestCartApiMergeGuestCartInterface" type="WebbyTroopsMergeGuestCartModelMergeGuestCart" />
          </config>


          MergeCart.php



          namespace WebbyTroopsMergeGuestCartModel;

          use MagentoQuoteModelQuoteIdMaskFactory;
          use MagentoFrameworkExceptionCouldNotSaveException;
          use MagentoQuoteApiCartRepositoryInterface;
          use MagentoQuoteModelQuoteFactory;
          use MagentoQuoteModelQuoteRepositorySaveHandler;
          class MergeGuestCart implements WebbyTroopsMergeGuestCartApiMergeGuestCartInterface
          {
          public function __construct(
          CartRepositoryInterface $quoteRepository,
          QuoteIdMaskFactory $quoteIdMaskFactory,
          QuoteFactory $quoteFactory,
          SaveHandler $saveHandler
          ) {
          $this->quoteRepository = $quoteRepository;
          $this->quoteIdMaskFactory = $quoteIdMaskFactory;
          $this->quoteFactory=$quoteFactory;
          $this->saveHandler = $saveHandler;
          }

          /**
          * {@inheritdoc}
          */
          public function mergeCart($guestQuoteId, $customerId){
          $quoteIdMask = $this->quoteIdMaskFactory->create()->load($guestQuoteId, 'masked_id');
          $guestQuote= $this->quoteRepository->get($quoteIdMask->getQuoteId());
          $quote= $this->quoteFactory->create()->loadByCustomer($customerId);

          if($quote->merge($guestQuote)){
          try{
          $this->saveHandler->save($quote);
          $quote->collectTotals();
          return true;
          }catch(Exception $e){
          throw new CouldNotSaveException(__($e->getMessage()));
          }
          }else{
          return false;
          }
          }


          }



          Once you add product to guest cart you will get quote mask id otherwise you can get this from quote_id_mast. You can test this in any REST client like postman. Request payload will be like



          {
          "guest_quote_id" : "z7sMMVNXpEFFOGXM9A6zt5RijsM39dKE"
          }


          with endpoint(POST) as



          http://magento/rest/V1/mergeGuestCart


          Make sure you are sending customer token in header. Let me know if need further help.






          share|improve this answer


























          • thanks for update, is there any default magenro 2 API to merge guest quote with customer quote ?

            – Niranjan Gondaliya
            Oct 30 '18 at 4:48











          • there is no default API for merge cart

            – Ramkishan Suthar
            Oct 30 '18 at 4:51













          • Did it work for you? if yes then please accept this answer. it'll help others

            – Ramkishan Suthar
            Oct 30 '18 at 8:57













          • I am implementing i will accept answer once it complete and working.

            – Niranjan Gondaliya
            Oct 30 '18 at 9:06













          • SaveHandler is not work with API, bcoz SaveHandler is using Session.

            – Niranjan Gondaliya
            Oct 30 '18 at 10:10











          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%2f248287%2fmagento-2-add-to-cart-api-covert-quote%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          You need to create a new merge cart API for this.



          webapi.xml



          <routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">
          <route url="/V1/mergeGuestCart" method="POST">
          <service class="WebbyTroopsMergeGuestCartApiMergeGuestCartInterface" method="mergeCart"/>
          <resources>
          <resource ref="self" />
          </resources>
          <data>
          <parameter name="customerId" force="true">%customer_id%</parameter>
          </data>
          </route>
          </routes>


          MergeCartInterface.php



          namespace WebbyTroopsMergeGuestCartApi;

          /**
          * Interface MergeGuestCartInterface
          * @package WebbyTroopsMergeGuestCartApi
          */
          interface MergeGuestCartInterface
          {

          /**
          * Merge guest cart to logged in customer cart
          *
          * @param string $guestQuoteId
          * @param int $customerId
          * @return bool
          */
          public function mergeCart($guestQuoteId, $customerId);
          }


          di.xml



          <?xml version="1.0"?>
          <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
          <preference for="WebbyTroopsMergeGuestCartApiMergeGuestCartInterface" type="WebbyTroopsMergeGuestCartModelMergeGuestCart" />
          </config>


          MergeCart.php



          namespace WebbyTroopsMergeGuestCartModel;

          use MagentoQuoteModelQuoteIdMaskFactory;
          use MagentoFrameworkExceptionCouldNotSaveException;
          use MagentoQuoteApiCartRepositoryInterface;
          use MagentoQuoteModelQuoteFactory;
          use MagentoQuoteModelQuoteRepositorySaveHandler;
          class MergeGuestCart implements WebbyTroopsMergeGuestCartApiMergeGuestCartInterface
          {
          public function __construct(
          CartRepositoryInterface $quoteRepository,
          QuoteIdMaskFactory $quoteIdMaskFactory,
          QuoteFactory $quoteFactory,
          SaveHandler $saveHandler
          ) {
          $this->quoteRepository = $quoteRepository;
          $this->quoteIdMaskFactory = $quoteIdMaskFactory;
          $this->quoteFactory=$quoteFactory;
          $this->saveHandler = $saveHandler;
          }

          /**
          * {@inheritdoc}
          */
          public function mergeCart($guestQuoteId, $customerId){
          $quoteIdMask = $this->quoteIdMaskFactory->create()->load($guestQuoteId, 'masked_id');
          $guestQuote= $this->quoteRepository->get($quoteIdMask->getQuoteId());
          $quote= $this->quoteFactory->create()->loadByCustomer($customerId);

          if($quote->merge($guestQuote)){
          try{
          $this->saveHandler->save($quote);
          $quote->collectTotals();
          return true;
          }catch(Exception $e){
          throw new CouldNotSaveException(__($e->getMessage()));
          }
          }else{
          return false;
          }
          }


          }



          Once you add product to guest cart you will get quote mask id otherwise you can get this from quote_id_mast. You can test this in any REST client like postman. Request payload will be like



          {
          "guest_quote_id" : "z7sMMVNXpEFFOGXM9A6zt5RijsM39dKE"
          }


          with endpoint(POST) as



          http://magento/rest/V1/mergeGuestCart


          Make sure you are sending customer token in header. Let me know if need further help.






          share|improve this answer


























          • thanks for update, is there any default magenro 2 API to merge guest quote with customer quote ?

            – Niranjan Gondaliya
            Oct 30 '18 at 4:48











          • there is no default API for merge cart

            – Ramkishan Suthar
            Oct 30 '18 at 4:51













          • Did it work for you? if yes then please accept this answer. it'll help others

            – Ramkishan Suthar
            Oct 30 '18 at 8:57













          • I am implementing i will accept answer once it complete and working.

            – Niranjan Gondaliya
            Oct 30 '18 at 9:06













          • SaveHandler is not work with API, bcoz SaveHandler is using Session.

            – Niranjan Gondaliya
            Oct 30 '18 at 10:10
















          0














          You need to create a new merge cart API for this.



          webapi.xml



          <routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">
          <route url="/V1/mergeGuestCart" method="POST">
          <service class="WebbyTroopsMergeGuestCartApiMergeGuestCartInterface" method="mergeCart"/>
          <resources>
          <resource ref="self" />
          </resources>
          <data>
          <parameter name="customerId" force="true">%customer_id%</parameter>
          </data>
          </route>
          </routes>


          MergeCartInterface.php



          namespace WebbyTroopsMergeGuestCartApi;

          /**
          * Interface MergeGuestCartInterface
          * @package WebbyTroopsMergeGuestCartApi
          */
          interface MergeGuestCartInterface
          {

          /**
          * Merge guest cart to logged in customer cart
          *
          * @param string $guestQuoteId
          * @param int $customerId
          * @return bool
          */
          public function mergeCart($guestQuoteId, $customerId);
          }


          di.xml



          <?xml version="1.0"?>
          <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
          <preference for="WebbyTroopsMergeGuestCartApiMergeGuestCartInterface" type="WebbyTroopsMergeGuestCartModelMergeGuestCart" />
          </config>


          MergeCart.php



          namespace WebbyTroopsMergeGuestCartModel;

          use MagentoQuoteModelQuoteIdMaskFactory;
          use MagentoFrameworkExceptionCouldNotSaveException;
          use MagentoQuoteApiCartRepositoryInterface;
          use MagentoQuoteModelQuoteFactory;
          use MagentoQuoteModelQuoteRepositorySaveHandler;
          class MergeGuestCart implements WebbyTroopsMergeGuestCartApiMergeGuestCartInterface
          {
          public function __construct(
          CartRepositoryInterface $quoteRepository,
          QuoteIdMaskFactory $quoteIdMaskFactory,
          QuoteFactory $quoteFactory,
          SaveHandler $saveHandler
          ) {
          $this->quoteRepository = $quoteRepository;
          $this->quoteIdMaskFactory = $quoteIdMaskFactory;
          $this->quoteFactory=$quoteFactory;
          $this->saveHandler = $saveHandler;
          }

          /**
          * {@inheritdoc}
          */
          public function mergeCart($guestQuoteId, $customerId){
          $quoteIdMask = $this->quoteIdMaskFactory->create()->load($guestQuoteId, 'masked_id');
          $guestQuote= $this->quoteRepository->get($quoteIdMask->getQuoteId());
          $quote= $this->quoteFactory->create()->loadByCustomer($customerId);

          if($quote->merge($guestQuote)){
          try{
          $this->saveHandler->save($quote);
          $quote->collectTotals();
          return true;
          }catch(Exception $e){
          throw new CouldNotSaveException(__($e->getMessage()));
          }
          }else{
          return false;
          }
          }


          }



          Once you add product to guest cart you will get quote mask id otherwise you can get this from quote_id_mast. You can test this in any REST client like postman. Request payload will be like



          {
          "guest_quote_id" : "z7sMMVNXpEFFOGXM9A6zt5RijsM39dKE"
          }


          with endpoint(POST) as



          http://magento/rest/V1/mergeGuestCart


          Make sure you are sending customer token in header. Let me know if need further help.






          share|improve this answer


























          • thanks for update, is there any default magenro 2 API to merge guest quote with customer quote ?

            – Niranjan Gondaliya
            Oct 30 '18 at 4:48











          • there is no default API for merge cart

            – Ramkishan Suthar
            Oct 30 '18 at 4:51













          • Did it work for you? if yes then please accept this answer. it'll help others

            – Ramkishan Suthar
            Oct 30 '18 at 8:57













          • I am implementing i will accept answer once it complete and working.

            – Niranjan Gondaliya
            Oct 30 '18 at 9:06













          • SaveHandler is not work with API, bcoz SaveHandler is using Session.

            – Niranjan Gondaliya
            Oct 30 '18 at 10:10














          0












          0








          0







          You need to create a new merge cart API for this.



          webapi.xml



          <routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">
          <route url="/V1/mergeGuestCart" method="POST">
          <service class="WebbyTroopsMergeGuestCartApiMergeGuestCartInterface" method="mergeCart"/>
          <resources>
          <resource ref="self" />
          </resources>
          <data>
          <parameter name="customerId" force="true">%customer_id%</parameter>
          </data>
          </route>
          </routes>


          MergeCartInterface.php



          namespace WebbyTroopsMergeGuestCartApi;

          /**
          * Interface MergeGuestCartInterface
          * @package WebbyTroopsMergeGuestCartApi
          */
          interface MergeGuestCartInterface
          {

          /**
          * Merge guest cart to logged in customer cart
          *
          * @param string $guestQuoteId
          * @param int $customerId
          * @return bool
          */
          public function mergeCart($guestQuoteId, $customerId);
          }


          di.xml



          <?xml version="1.0"?>
          <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
          <preference for="WebbyTroopsMergeGuestCartApiMergeGuestCartInterface" type="WebbyTroopsMergeGuestCartModelMergeGuestCart" />
          </config>


          MergeCart.php



          namespace WebbyTroopsMergeGuestCartModel;

          use MagentoQuoteModelQuoteIdMaskFactory;
          use MagentoFrameworkExceptionCouldNotSaveException;
          use MagentoQuoteApiCartRepositoryInterface;
          use MagentoQuoteModelQuoteFactory;
          use MagentoQuoteModelQuoteRepositorySaveHandler;
          class MergeGuestCart implements WebbyTroopsMergeGuestCartApiMergeGuestCartInterface
          {
          public function __construct(
          CartRepositoryInterface $quoteRepository,
          QuoteIdMaskFactory $quoteIdMaskFactory,
          QuoteFactory $quoteFactory,
          SaveHandler $saveHandler
          ) {
          $this->quoteRepository = $quoteRepository;
          $this->quoteIdMaskFactory = $quoteIdMaskFactory;
          $this->quoteFactory=$quoteFactory;
          $this->saveHandler = $saveHandler;
          }

          /**
          * {@inheritdoc}
          */
          public function mergeCart($guestQuoteId, $customerId){
          $quoteIdMask = $this->quoteIdMaskFactory->create()->load($guestQuoteId, 'masked_id');
          $guestQuote= $this->quoteRepository->get($quoteIdMask->getQuoteId());
          $quote= $this->quoteFactory->create()->loadByCustomer($customerId);

          if($quote->merge($guestQuote)){
          try{
          $this->saveHandler->save($quote);
          $quote->collectTotals();
          return true;
          }catch(Exception $e){
          throw new CouldNotSaveException(__($e->getMessage()));
          }
          }else{
          return false;
          }
          }


          }



          Once you add product to guest cart you will get quote mask id otherwise you can get this from quote_id_mast. You can test this in any REST client like postman. Request payload will be like



          {
          "guest_quote_id" : "z7sMMVNXpEFFOGXM9A6zt5RijsM39dKE"
          }


          with endpoint(POST) as



          http://magento/rest/V1/mergeGuestCart


          Make sure you are sending customer token in header. Let me know if need further help.






          share|improve this answer















          You need to create a new merge cart API for this.



          webapi.xml



          <routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">
          <route url="/V1/mergeGuestCart" method="POST">
          <service class="WebbyTroopsMergeGuestCartApiMergeGuestCartInterface" method="mergeCart"/>
          <resources>
          <resource ref="self" />
          </resources>
          <data>
          <parameter name="customerId" force="true">%customer_id%</parameter>
          </data>
          </route>
          </routes>


          MergeCartInterface.php



          namespace WebbyTroopsMergeGuestCartApi;

          /**
          * Interface MergeGuestCartInterface
          * @package WebbyTroopsMergeGuestCartApi
          */
          interface MergeGuestCartInterface
          {

          /**
          * Merge guest cart to logged in customer cart
          *
          * @param string $guestQuoteId
          * @param int $customerId
          * @return bool
          */
          public function mergeCart($guestQuoteId, $customerId);
          }


          di.xml



          <?xml version="1.0"?>
          <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
          <preference for="WebbyTroopsMergeGuestCartApiMergeGuestCartInterface" type="WebbyTroopsMergeGuestCartModelMergeGuestCart" />
          </config>


          MergeCart.php



          namespace WebbyTroopsMergeGuestCartModel;

          use MagentoQuoteModelQuoteIdMaskFactory;
          use MagentoFrameworkExceptionCouldNotSaveException;
          use MagentoQuoteApiCartRepositoryInterface;
          use MagentoQuoteModelQuoteFactory;
          use MagentoQuoteModelQuoteRepositorySaveHandler;
          class MergeGuestCart implements WebbyTroopsMergeGuestCartApiMergeGuestCartInterface
          {
          public function __construct(
          CartRepositoryInterface $quoteRepository,
          QuoteIdMaskFactory $quoteIdMaskFactory,
          QuoteFactory $quoteFactory,
          SaveHandler $saveHandler
          ) {
          $this->quoteRepository = $quoteRepository;
          $this->quoteIdMaskFactory = $quoteIdMaskFactory;
          $this->quoteFactory=$quoteFactory;
          $this->saveHandler = $saveHandler;
          }

          /**
          * {@inheritdoc}
          */
          public function mergeCart($guestQuoteId, $customerId){
          $quoteIdMask = $this->quoteIdMaskFactory->create()->load($guestQuoteId, 'masked_id');
          $guestQuote= $this->quoteRepository->get($quoteIdMask->getQuoteId());
          $quote= $this->quoteFactory->create()->loadByCustomer($customerId);

          if($quote->merge($guestQuote)){
          try{
          $this->saveHandler->save($quote);
          $quote->collectTotals();
          return true;
          }catch(Exception $e){
          throw new CouldNotSaveException(__($e->getMessage()));
          }
          }else{
          return false;
          }
          }


          }



          Once you add product to guest cart you will get quote mask id otherwise you can get this from quote_id_mast. You can test this in any REST client like postman. Request payload will be like



          {
          "guest_quote_id" : "z7sMMVNXpEFFOGXM9A6zt5RijsM39dKE"
          }


          with endpoint(POST) as



          http://magento/rest/V1/mergeGuestCart


          Make sure you are sending customer token in header. Let me know if need further help.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 2 mins ago

























          answered Oct 30 '18 at 4:06









          Ramkishan SutharRamkishan Suthar

          2,19221133




          2,19221133













          • thanks for update, is there any default magenro 2 API to merge guest quote with customer quote ?

            – Niranjan Gondaliya
            Oct 30 '18 at 4:48











          • there is no default API for merge cart

            – Ramkishan Suthar
            Oct 30 '18 at 4:51













          • Did it work for you? if yes then please accept this answer. it'll help others

            – Ramkishan Suthar
            Oct 30 '18 at 8:57













          • I am implementing i will accept answer once it complete and working.

            – Niranjan Gondaliya
            Oct 30 '18 at 9:06













          • SaveHandler is not work with API, bcoz SaveHandler is using Session.

            – Niranjan Gondaliya
            Oct 30 '18 at 10:10



















          • thanks for update, is there any default magenro 2 API to merge guest quote with customer quote ?

            – Niranjan Gondaliya
            Oct 30 '18 at 4:48











          • there is no default API for merge cart

            – Ramkishan Suthar
            Oct 30 '18 at 4:51













          • Did it work for you? if yes then please accept this answer. it'll help others

            – Ramkishan Suthar
            Oct 30 '18 at 8:57













          • I am implementing i will accept answer once it complete and working.

            – Niranjan Gondaliya
            Oct 30 '18 at 9:06













          • SaveHandler is not work with API, bcoz SaveHandler is using Session.

            – Niranjan Gondaliya
            Oct 30 '18 at 10:10

















          thanks for update, is there any default magenro 2 API to merge guest quote with customer quote ?

          – Niranjan Gondaliya
          Oct 30 '18 at 4:48





          thanks for update, is there any default magenro 2 API to merge guest quote with customer quote ?

          – Niranjan Gondaliya
          Oct 30 '18 at 4:48













          there is no default API for merge cart

          – Ramkishan Suthar
          Oct 30 '18 at 4:51







          there is no default API for merge cart

          – Ramkishan Suthar
          Oct 30 '18 at 4:51















          Did it work for you? if yes then please accept this answer. it'll help others

          – Ramkishan Suthar
          Oct 30 '18 at 8:57







          Did it work for you? if yes then please accept this answer. it'll help others

          – Ramkishan Suthar
          Oct 30 '18 at 8:57















          I am implementing i will accept answer once it complete and working.

          – Niranjan Gondaliya
          Oct 30 '18 at 9:06







          I am implementing i will accept answer once it complete and working.

          – Niranjan Gondaliya
          Oct 30 '18 at 9:06















          SaveHandler is not work with API, bcoz SaveHandler is using Session.

          – Niranjan Gondaliya
          Oct 30 '18 at 10:10





          SaveHandler is not work with API, bcoz SaveHandler is using Session.

          – Niranjan Gondaliya
          Oct 30 '18 at 10:10


















          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%2f248287%2fmagento-2-add-to-cart-api-covert-quote%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

          What other Star Trek series did the main TNG cast show up in?

          Berlina muro

          Berlina aerponto