1
 $quote = $this->quoteFactory->create()->load($quote_id);
 $quote->setSubtotalWithDiscount(number_format((float)0, 4, '.', ''));
 $quote->setBaseSubtotalWithDiscount(number_format((float)0, 4, '.', ''));
 $quote->setGrandTotal(number_format((float)0, 4, '.', ''));
 $quote->setBaseGrandTotal(number_format((float)0, 4, '.', ''));
 if($quote->save())
 {
     echo 'Done';
 }

    It echos data but data is not inserting....
5
  • if you print $quote->getData() before save, do you see correct values?
    – LucScu
    Jul 27, 2018 at 9:00
  • yes i see updated values after printing and then when i fetch data again it showed the old one Jul 27, 2018 at 9:41
  • try with setData(attribute_name,value)
    – LucScu
    Jul 27, 2018 at 11:41
  • not working i just want to change my totals on some functionality how can i ? Jul 27, 2018 at 11:54
  • It's impossible, reinstall last m2 version 2.2.5
    – LucScu
    Jul 28, 2018 at 12:11

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.