How to de-activate quote in Magento 2:

How to de-activate quote in Magento 2:

Following code snippet  will helpful to deactivate your quote in magento2.

is_activate column from quote table value is update to zero  then the quote will be deactivate.

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();

$quoteFactory =$objectManager->create('\Magento\Quote\Model\QuoteFactory');

$currentQuoteObj = $quoteFactory->create()->load($currentQuoteID);

$currentQuoteObj->setIsActive(false)->save();

 

The real government is the people who respect the word of the people
#Save Kathiramangalam

Leave a Reply