In above image showing product price KWD0.245
but Summary section Subtotal showing KWD0.250 (Automatic roundup)
, how to avoid subtotal automatic roundup. I want to show subtotal as KWD0.245
.
Thank You
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityIn above image showing product price KWD0.245
but Summary section Subtotal showing KWD0.250 (Automatic roundup)
, how to avoid subtotal automatic roundup. I want to show subtotal as KWD0.245
.
Thank You
you can use plugin for that
Create di.xml at app/code/Vendor/Module/etc/di.xml
then here you can override this core class Magento\Quote\Model\Quote
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Magento\Quote\Model\Quote">
<plugin name="CustomQuote" type="Vendor\Module\Model\Quote" sortOrder="1" />
</type>
</config>
then you can create your plugin class and override the magento method responsible for collecting total amount
<?php
namespace Vendor\Module\Model;
class Quote
{
public function beforeCollectTotals() {
//your logic here
}
}