Duplicate current quote with new ID on Magento 2Magento 2.1: Invoke urlBuilder->getUrl() in a controller in a custom modulemain.CRITICAL: Plugin class doesn't existSet custom price of product when adding to cart code not workingMagento 2: How to override newsletter Subscriber modelMagento 2: Add a product to the cart programmaticallyMagento offline custom Payment method with drop down listMagento 2 Create dynamic array From different Model Collection to use in multi select in gridAdd configure product in Cart using Magento 2 API facing an issueMagento 2: I Want to add multiple product using checkboxMagento 2.3 Can't view module's front end page output?

Did I make a mistake by ccing email to boss to others?

Asserting that Atheism and Theism are both faith based positions

Put the phone down / Put down the phone

Calculate Pi using Monte Carlo

How to test the sharpness of a knife?

Would this string work as string?

How would a solely written language work mechanically

PTIJ: Which Dr. Seuss books should one obtain?

Why does the frost depth increase when the surface temperature warms up?

Center page as a whole without centering each element individually

What is it called when someone votes for an option that's not their first choice?

Do people actually use the word "kaputt" in conversation?

Is this saw blade faulty?

How can a new country break out from a developed country without war?

Would a primitive species be able to learn English from reading books alone?

How do I lift the insulation blower into the attic?

If the Dominion rule using their Jem'Hadar troops, why is their life expectancy so low?

Pre-Employment Background Check With Consent For Future Checks

Can you take a "free object interaction" while incapacitated?

Unfrosted light bulb

How do you say "Trust your struggle." in French?

Should I warn a new PhD Student?

How do you justify more code being written by following clean code practices?

Sort with assumptions



Duplicate current quote with new ID on Magento 2


Magento 2.1: Invoke urlBuilder->getUrl() in a controller in a custom modulemain.CRITICAL: Plugin class doesn't existSet custom price of product when adding to cart code not workingMagento 2: How to override newsletter Subscriber modelMagento 2: Add a product to the cart programmaticallyMagento offline custom Payment method with drop down listMagento 2 Create dynamic array From different Model Collection to use in multi select in gridAdd configure product in Cart using Magento 2 API facing an issueMagento 2: I Want to add multiple product using checkboxMagento 2.3 Can't view module's front end page output?













1















Is there a way to somehow take the existing quote and create a new one identical to it but with a new ID?



This is what I currently have:



Updated following suggestions from @Vishwas:



use MagentoFrameworkAppActionContext;
use MagentoFrameworkControllerResultFactory;
use MagentoStoreModelStoreManagerInterface;
use MagentoQuoteModelQuoteRepository;
use MagentoFrameworkMailTemplateTransportBuilder;
use MagentoFrameworkTranslateInlineStateInterface;
use MagentoCheckoutModelCart;
use MagentoCatalogModelProductFactory;

class ShareCart extends MagentoFrameworkAppActionAction

protected $resultFactory;
protected $storeManager;
protected $quoteFactory;
protected $transportBuilder;
protected $stateInterface;
protected $cart;
protected $productFactory;

public function __construct(
Context $context,
ResultFactory $resultFactory,
StoreManagerInterface $storeManager,
QuoteRepository $quoteFactory,
TransportBuilder $transportBuilder,
StateInterface $stateInterface,
Cart $cart,
ProductFactory $productFactory
)
$this->resultFactory = $resultFactory;
$this->storeManager = $storeManager;
$this->quoteFactory = $quoteFactory;
$this->transportBuilder = $transportBuilder;
$this->stateInterface = $stateInterface;
$this->cart = $cart;
$this->productFactory = $productFactory;

parent::__construct($context);

public function execute()

try

$post = (array) $this->getRequest()->getPost();

$id = $this->cart->getQuote()->getId();

if ($id > 0)
$quote = $this->quoteFactory->get($id);
$items = $quote->getAllVisibleItems();

foreach ($items as $item)
$productId = $item->getProductId();
$_product = $this->productFactory->create()->load($productId);

$options = $item->getProduct()->getTypeInstance(true)->getOrderOptions($item->getProduct());

$info = $options['info_buyRequest'];
$request1 = new MagentoFrameworkDataObject();
$request1->setData($info);

$this->cart->addProduct($_product, $request1);

$this->cart->save();

// Retrieve form data
$email = $post['basketshare-email'];
$message = $post['basketshare-message'];

$from_name = "";

catch (Exception $e)
$this->messageManager->addError(__($e->getMessage()));













share|improve this question









New contributor




Variax is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • what have you tried so far? show us some code

    – Philipp Sander
    18 hours ago















1















Is there a way to somehow take the existing quote and create a new one identical to it but with a new ID?



This is what I currently have:



Updated following suggestions from @Vishwas:



use MagentoFrameworkAppActionContext;
use MagentoFrameworkControllerResultFactory;
use MagentoStoreModelStoreManagerInterface;
use MagentoQuoteModelQuoteRepository;
use MagentoFrameworkMailTemplateTransportBuilder;
use MagentoFrameworkTranslateInlineStateInterface;
use MagentoCheckoutModelCart;
use MagentoCatalogModelProductFactory;

class ShareCart extends MagentoFrameworkAppActionAction

protected $resultFactory;
protected $storeManager;
protected $quoteFactory;
protected $transportBuilder;
protected $stateInterface;
protected $cart;
protected $productFactory;

public function __construct(
Context $context,
ResultFactory $resultFactory,
StoreManagerInterface $storeManager,
QuoteRepository $quoteFactory,
TransportBuilder $transportBuilder,
StateInterface $stateInterface,
Cart $cart,
ProductFactory $productFactory
)
$this->resultFactory = $resultFactory;
$this->storeManager = $storeManager;
$this->quoteFactory = $quoteFactory;
$this->transportBuilder = $transportBuilder;
$this->stateInterface = $stateInterface;
$this->cart = $cart;
$this->productFactory = $productFactory;

parent::__construct($context);

public function execute()

try

$post = (array) $this->getRequest()->getPost();

$id = $this->cart->getQuote()->getId();

if ($id > 0)
$quote = $this->quoteFactory->get($id);
$items = $quote->getAllVisibleItems();

foreach ($items as $item)
$productId = $item->getProductId();
$_product = $this->productFactory->create()->load($productId);

$options = $item->getProduct()->getTypeInstance(true)->getOrderOptions($item->getProduct());

$info = $options['info_buyRequest'];
$request1 = new MagentoFrameworkDataObject();
$request1->setData($info);

$this->cart->addProduct($_product, $request1);

$this->cart->save();

// Retrieve form data
$email = $post['basketshare-email'];
$message = $post['basketshare-message'];

$from_name = "";

catch (Exception $e)
$this->messageManager->addError(__($e->getMessage()));













share|improve this question









New contributor




Variax is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • what have you tried so far? show us some code

    – Philipp Sander
    18 hours ago













1












1








1








Is there a way to somehow take the existing quote and create a new one identical to it but with a new ID?



This is what I currently have:



Updated following suggestions from @Vishwas:



use MagentoFrameworkAppActionContext;
use MagentoFrameworkControllerResultFactory;
use MagentoStoreModelStoreManagerInterface;
use MagentoQuoteModelQuoteRepository;
use MagentoFrameworkMailTemplateTransportBuilder;
use MagentoFrameworkTranslateInlineStateInterface;
use MagentoCheckoutModelCart;
use MagentoCatalogModelProductFactory;

class ShareCart extends MagentoFrameworkAppActionAction

protected $resultFactory;
protected $storeManager;
protected $quoteFactory;
protected $transportBuilder;
protected $stateInterface;
protected $cart;
protected $productFactory;

public function __construct(
Context $context,
ResultFactory $resultFactory,
StoreManagerInterface $storeManager,
QuoteRepository $quoteFactory,
TransportBuilder $transportBuilder,
StateInterface $stateInterface,
Cart $cart,
ProductFactory $productFactory
)
$this->resultFactory = $resultFactory;
$this->storeManager = $storeManager;
$this->quoteFactory = $quoteFactory;
$this->transportBuilder = $transportBuilder;
$this->stateInterface = $stateInterface;
$this->cart = $cart;
$this->productFactory = $productFactory;

parent::__construct($context);

public function execute()

try

$post = (array) $this->getRequest()->getPost();

$id = $this->cart->getQuote()->getId();

if ($id > 0)
$quote = $this->quoteFactory->get($id);
$items = $quote->getAllVisibleItems();

foreach ($items as $item)
$productId = $item->getProductId();
$_product = $this->productFactory->create()->load($productId);

$options = $item->getProduct()->getTypeInstance(true)->getOrderOptions($item->getProduct());

$info = $options['info_buyRequest'];
$request1 = new MagentoFrameworkDataObject();
$request1->setData($info);

$this->cart->addProduct($_product, $request1);

$this->cart->save();

// Retrieve form data
$email = $post['basketshare-email'];
$message = $post['basketshare-message'];

$from_name = "";

catch (Exception $e)
$this->messageManager->addError(__($e->getMessage()));













share|improve this question









New contributor




Variax is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












Is there a way to somehow take the existing quote and create a new one identical to it but with a new ID?



This is what I currently have:



Updated following suggestions from @Vishwas:



use MagentoFrameworkAppActionContext;
use MagentoFrameworkControllerResultFactory;
use MagentoStoreModelStoreManagerInterface;
use MagentoQuoteModelQuoteRepository;
use MagentoFrameworkMailTemplateTransportBuilder;
use MagentoFrameworkTranslateInlineStateInterface;
use MagentoCheckoutModelCart;
use MagentoCatalogModelProductFactory;

class ShareCart extends MagentoFrameworkAppActionAction

protected $resultFactory;
protected $storeManager;
protected $quoteFactory;
protected $transportBuilder;
protected $stateInterface;
protected $cart;
protected $productFactory;

public function __construct(
Context $context,
ResultFactory $resultFactory,
StoreManagerInterface $storeManager,
QuoteRepository $quoteFactory,
TransportBuilder $transportBuilder,
StateInterface $stateInterface,
Cart $cart,
ProductFactory $productFactory
)
$this->resultFactory = $resultFactory;
$this->storeManager = $storeManager;
$this->quoteFactory = $quoteFactory;
$this->transportBuilder = $transportBuilder;
$this->stateInterface = $stateInterface;
$this->cart = $cart;
$this->productFactory = $productFactory;

parent::__construct($context);

public function execute()

try

$post = (array) $this->getRequest()->getPost();

$id = $this->cart->getQuote()->getId();

if ($id > 0)
$quote = $this->quoteFactory->get($id);
$items = $quote->getAllVisibleItems();

foreach ($items as $item)
$productId = $item->getProductId();
$_product = $this->productFactory->create()->load($productId);

$options = $item->getProduct()->getTypeInstance(true)->getOrderOptions($item->getProduct());

$info = $options['info_buyRequest'];
$request1 = new MagentoFrameworkDataObject();
$request1->setData($info);

$this->cart->addProduct($_product, $request1);

$this->cart->save();

// Retrieve form data
$email = $post['basketshare-email'];
$message = $post['basketshare-message'];

$from_name = "";

catch (Exception $e)
$this->messageManager->addError(__($e->getMessage()));










magento2 quote






share|improve this question









New contributor




Variax is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Variax is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 1 hour ago









Teja Bhagavan Kollepara

3,00641949




3,00641949






New contributor




Variax is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 18 hours ago









VariaxVariax

62




62




New contributor




Variax is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Variax is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Variax is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • what have you tried so far? show us some code

    – Philipp Sander
    18 hours ago

















  • what have you tried so far? show us some code

    – Philipp Sander
    18 hours ago
















what have you tried so far? show us some code

– Philipp Sander
18 hours ago





what have you tried so far? show us some code

– Philipp Sander
18 hours ago










1 Answer
1






active

oldest

votes


















0














All you need to do is to paste below code in controller action that you are executing for copying quote and copy one quote with all product items into another.



<?php
use MagentoFrameworkAppActionContext;
use MagentoFrameworkViewResultPageFactory;
use MagentoQuoteModelQuoteFactory;
use MagentoCheckoutModelCart;
use MagentoCatalogModelProductFactory;
class Copyquote extends MagentoFrameworkAppActionAction

protected $_resultPageFactory;
protected $quoteFactory;
protected $formKey;
protected $cart;
protected $product;
public function __construct(
Context $context,
PageFactory $resultPageFactory,
QuoteFactory $quoteFactory,
Cart $cart,
ProductFactory $product
)
$this->_resultPageFactory = $resultPageFactory;
$this->quoteFactory = $quoteFactory;
$this->cart = $cart;
$this->product = $product;
parent::__construct($context);

public function execute()

try

$id = 'YOUR QUOTE ID';
if ($id > 0)
$quote = $this->quoteFactory->create()->load($id);
$items = $quote->getAllVisibleItems();

foreach ($items as $item)
$productId = $item->getProductId();
$_product = $this->product->create()->load($productId);

$options = $item->getProduct()->getTypeInstance(true)->getOrderOptions($item->getProduct());

$info = $options['info_buyRequest'];
$request1 = new MagentoFrameworkDataObject();
$request1->setData($info);

$this->cart->addProduct($_product, $request1);

$this->cart->save();

catch (Exception $e)
$this->messageManager->addError(__($e->getMessage()));





Now you can use or customize this code according to your need of copying one quote to another one in your Magento store






share|improve this answer























  • Thank you @Vishwas, I'll give that a try :)

    – Variax
    17 hours ago












  • Building on top of this, do you know which would be the best way to get it to save the quote with a new ID please, so that it's a new quote but has it's own ID?

    – Variax
    17 hours ago











  • it should automatically create new quote when adding products to cart , you can get current quote sequence from sequence profile table for your current store and build upon it

    – Vishwas Bhatnagar
    17 hours ago











  • Hm, no it doesn't seem to create a new quote if I add products to the cart and update.

    – Variax
    17 hours ago










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
);



);






Variax is a new contributor. Be nice, and check out our Code of Conduct.









draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f266502%2fduplicate-current-quote-with-new-id-on-magento-2%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














All you need to do is to paste below code in controller action that you are executing for copying quote and copy one quote with all product items into another.



<?php
use MagentoFrameworkAppActionContext;
use MagentoFrameworkViewResultPageFactory;
use MagentoQuoteModelQuoteFactory;
use MagentoCheckoutModelCart;
use MagentoCatalogModelProductFactory;
class Copyquote extends MagentoFrameworkAppActionAction

protected $_resultPageFactory;
protected $quoteFactory;
protected $formKey;
protected $cart;
protected $product;
public function __construct(
Context $context,
PageFactory $resultPageFactory,
QuoteFactory $quoteFactory,
Cart $cart,
ProductFactory $product
)
$this->_resultPageFactory = $resultPageFactory;
$this->quoteFactory = $quoteFactory;
$this->cart = $cart;
$this->product = $product;
parent::__construct($context);

public function execute()

try

$id = 'YOUR QUOTE ID';
if ($id > 0)
$quote = $this->quoteFactory->create()->load($id);
$items = $quote->getAllVisibleItems();

foreach ($items as $item)
$productId = $item->getProductId();
$_product = $this->product->create()->load($productId);

$options = $item->getProduct()->getTypeInstance(true)->getOrderOptions($item->getProduct());

$info = $options['info_buyRequest'];
$request1 = new MagentoFrameworkDataObject();
$request1->setData($info);

$this->cart->addProduct($_product, $request1);

$this->cart->save();

catch (Exception $e)
$this->messageManager->addError(__($e->getMessage()));





Now you can use or customize this code according to your need of copying one quote to another one in your Magento store






share|improve this answer























  • Thank you @Vishwas, I'll give that a try :)

    – Variax
    17 hours ago












  • Building on top of this, do you know which would be the best way to get it to save the quote with a new ID please, so that it's a new quote but has it's own ID?

    – Variax
    17 hours ago











  • it should automatically create new quote when adding products to cart , you can get current quote sequence from sequence profile table for your current store and build upon it

    – Vishwas Bhatnagar
    17 hours ago











  • Hm, no it doesn't seem to create a new quote if I add products to the cart and update.

    – Variax
    17 hours ago















0














All you need to do is to paste below code in controller action that you are executing for copying quote and copy one quote with all product items into another.



<?php
use MagentoFrameworkAppActionContext;
use MagentoFrameworkViewResultPageFactory;
use MagentoQuoteModelQuoteFactory;
use MagentoCheckoutModelCart;
use MagentoCatalogModelProductFactory;
class Copyquote extends MagentoFrameworkAppActionAction

protected $_resultPageFactory;
protected $quoteFactory;
protected $formKey;
protected $cart;
protected $product;
public function __construct(
Context $context,
PageFactory $resultPageFactory,
QuoteFactory $quoteFactory,
Cart $cart,
ProductFactory $product
)
$this->_resultPageFactory = $resultPageFactory;
$this->quoteFactory = $quoteFactory;
$this->cart = $cart;
$this->product = $product;
parent::__construct($context);

public function execute()

try

$id = 'YOUR QUOTE ID';
if ($id > 0)
$quote = $this->quoteFactory->create()->load($id);
$items = $quote->getAllVisibleItems();

foreach ($items as $item)
$productId = $item->getProductId();
$_product = $this->product->create()->load($productId);

$options = $item->getProduct()->getTypeInstance(true)->getOrderOptions($item->getProduct());

$info = $options['info_buyRequest'];
$request1 = new MagentoFrameworkDataObject();
$request1->setData($info);

$this->cart->addProduct($_product, $request1);

$this->cart->save();

catch (Exception $e)
$this->messageManager->addError(__($e->getMessage()));





Now you can use or customize this code according to your need of copying one quote to another one in your Magento store






share|improve this answer























  • Thank you @Vishwas, I'll give that a try :)

    – Variax
    17 hours ago












  • Building on top of this, do you know which would be the best way to get it to save the quote with a new ID please, so that it's a new quote but has it's own ID?

    – Variax
    17 hours ago











  • it should automatically create new quote when adding products to cart , you can get current quote sequence from sequence profile table for your current store and build upon it

    – Vishwas Bhatnagar
    17 hours ago











  • Hm, no it doesn't seem to create a new quote if I add products to the cart and update.

    – Variax
    17 hours ago













0












0








0







All you need to do is to paste below code in controller action that you are executing for copying quote and copy one quote with all product items into another.



<?php
use MagentoFrameworkAppActionContext;
use MagentoFrameworkViewResultPageFactory;
use MagentoQuoteModelQuoteFactory;
use MagentoCheckoutModelCart;
use MagentoCatalogModelProductFactory;
class Copyquote extends MagentoFrameworkAppActionAction

protected $_resultPageFactory;
protected $quoteFactory;
protected $formKey;
protected $cart;
protected $product;
public function __construct(
Context $context,
PageFactory $resultPageFactory,
QuoteFactory $quoteFactory,
Cart $cart,
ProductFactory $product
)
$this->_resultPageFactory = $resultPageFactory;
$this->quoteFactory = $quoteFactory;
$this->cart = $cart;
$this->product = $product;
parent::__construct($context);

public function execute()

try

$id = 'YOUR QUOTE ID';
if ($id > 0)
$quote = $this->quoteFactory->create()->load($id);
$items = $quote->getAllVisibleItems();

foreach ($items as $item)
$productId = $item->getProductId();
$_product = $this->product->create()->load($productId);

$options = $item->getProduct()->getTypeInstance(true)->getOrderOptions($item->getProduct());

$info = $options['info_buyRequest'];
$request1 = new MagentoFrameworkDataObject();
$request1->setData($info);

$this->cart->addProduct($_product, $request1);

$this->cart->save();

catch (Exception $e)
$this->messageManager->addError(__($e->getMessage()));





Now you can use or customize this code according to your need of copying one quote to another one in your Magento store






share|improve this answer













All you need to do is to paste below code in controller action that you are executing for copying quote and copy one quote with all product items into another.



<?php
use MagentoFrameworkAppActionContext;
use MagentoFrameworkViewResultPageFactory;
use MagentoQuoteModelQuoteFactory;
use MagentoCheckoutModelCart;
use MagentoCatalogModelProductFactory;
class Copyquote extends MagentoFrameworkAppActionAction

protected $_resultPageFactory;
protected $quoteFactory;
protected $formKey;
protected $cart;
protected $product;
public function __construct(
Context $context,
PageFactory $resultPageFactory,
QuoteFactory $quoteFactory,
Cart $cart,
ProductFactory $product
)
$this->_resultPageFactory = $resultPageFactory;
$this->quoteFactory = $quoteFactory;
$this->cart = $cart;
$this->product = $product;
parent::__construct($context);

public function execute()

try

$id = 'YOUR QUOTE ID';
if ($id > 0)
$quote = $this->quoteFactory->create()->load($id);
$items = $quote->getAllVisibleItems();

foreach ($items as $item)
$productId = $item->getProductId();
$_product = $this->product->create()->load($productId);

$options = $item->getProduct()->getTypeInstance(true)->getOrderOptions($item->getProduct());

$info = $options['info_buyRequest'];
$request1 = new MagentoFrameworkDataObject();
$request1->setData($info);

$this->cart->addProduct($_product, $request1);

$this->cart->save();

catch (Exception $e)
$this->messageManager->addError(__($e->getMessage()));





Now you can use or customize this code according to your need of copying one quote to another one in your Magento store







share|improve this answer












share|improve this answer



share|improve this answer










answered 18 hours ago









Vishwas BhatnagarVishwas Bhatnagar

2,91122045




2,91122045












  • Thank you @Vishwas, I'll give that a try :)

    – Variax
    17 hours ago












  • Building on top of this, do you know which would be the best way to get it to save the quote with a new ID please, so that it's a new quote but has it's own ID?

    – Variax
    17 hours ago











  • it should automatically create new quote when adding products to cart , you can get current quote sequence from sequence profile table for your current store and build upon it

    – Vishwas Bhatnagar
    17 hours ago











  • Hm, no it doesn't seem to create a new quote if I add products to the cart and update.

    – Variax
    17 hours ago

















  • Thank you @Vishwas, I'll give that a try :)

    – Variax
    17 hours ago












  • Building on top of this, do you know which would be the best way to get it to save the quote with a new ID please, so that it's a new quote but has it's own ID?

    – Variax
    17 hours ago











  • it should automatically create new quote when adding products to cart , you can get current quote sequence from sequence profile table for your current store and build upon it

    – Vishwas Bhatnagar
    17 hours ago











  • Hm, no it doesn't seem to create a new quote if I add products to the cart and update.

    – Variax
    17 hours ago
















Thank you @Vishwas, I'll give that a try :)

– Variax
17 hours ago






Thank you @Vishwas, I'll give that a try :)

– Variax
17 hours ago














Building on top of this, do you know which would be the best way to get it to save the quote with a new ID please, so that it's a new quote but has it's own ID?

– Variax
17 hours ago





Building on top of this, do you know which would be the best way to get it to save the quote with a new ID please, so that it's a new quote but has it's own ID?

– Variax
17 hours ago













it should automatically create new quote when adding products to cart , you can get current quote sequence from sequence profile table for your current store and build upon it

– Vishwas Bhatnagar
17 hours ago





it should automatically create new quote when adding products to cart , you can get current quote sequence from sequence profile table for your current store and build upon it

– Vishwas Bhatnagar
17 hours ago













Hm, no it doesn't seem to create a new quote if I add products to the cart and update.

– Variax
17 hours ago





Hm, no it doesn't seem to create a new quote if I add products to the cart and update.

– Variax
17 hours ago










Variax is a new contributor. Be nice, and check out our Code of Conduct.









draft saved

draft discarded


















Variax is a new contributor. Be nice, and check out our Code of Conduct.












Variax is a new contributor. Be nice, and check out our Code of Conduct.











Variax is a new contributor. Be nice, and check out our Code of Conduct.














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%2f266502%2fduplicate-current-quote-with-new-id-on-magento-2%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

Sum ergo cogito? 1 nng

三茅街道4182Guuntc Dn precexpngmageondP