Hot answers tagged

60

I think you messed up some closing / opening tags and amount of them this code works: <referenceBlock name="checkout.cart.shipping"> <arguments> <argument name="jsLayout" xsi:type="array"> <item name="components" xsi:type="array"> <item name="block-summary" xsi:type="array"> ...


29

grand_total = current currency grand total base_grand_total = store base currency grand total


18

partial answer 1. Order in Backend does not fully affect rendering The totals are rendered by an "area". The grand total is in the area "footer". See template\checkout\cart\totals.phtml. Passing -1 to renderTotals() renders all areas. So you have to remove $this->renderTotals('footer'); and change$this->renderTotals(); to $this->renderTotals(-1); ...


9

Try $quote = Mage::getModel('checkout/session')->getQuote(); $quoteData= $quote->getData(); $grandTotal=$quoteData['grand_total']; OR print_r(Mage::helper('checkout')->getQuote()->getData());


8

The easier way to find out what template is used is to enable the template path hints. But here is the stacktrace you need to follow. Mage_Checkout_Block_Cart_Totals::renderTotals calls renderTotal for each total. This one calls _getTotalRenderer that works like this: if there is a block with the name $code_total_renderer in the page ($code is the code of ...


8

All of these solutions imply that you need to copy the abstract-total.js to your own theme, but this is not necessary. Even more so: it might introduce new problems as soon as a Magento update decides to update the original abstract-total.js. A better (more unobtrusive) solution to this is to make use of a RequireJs mixin. This way you can extend a ...


7

you had a common problem, some time we not get discount amount by default in magento, please go to this link i hope you will definitely got solution http://www.magentocommerce.com/boards/viewthread/269154/ you may also check this type of problem http://magento.ikantam.com/qa/how-add-discount-total-magento


6

To sum it up, order totals aren't stored on the order object the same way as on the quote object. The reason is that the result of the dynamic quote totals are stored in the order table. You're right in it being a bad thing to get the quote totals from the order, as things like credit memos affect order totals. The quote totals also has some extra ...


6

You can get the grand total by using this: $grandTotal = Mage::getModel('checkout/session')->getQuote()->getGrandTotal();


6

This helped me with a similar issue "We're working in a 1.9 & PHP 7; detected this issue with paypal suspect fraud (due the difference amount). All correct in front-end (apply taxes); but in checkout and calculation, Magento uses the grand total without taxes. Actual wrong order calculation: Product price without taxes + shipping with taxes = total ...


6

I also needed to get rid of the "Estimate Shipping costs and Tax" because of a conflict with a payment module. If your only objective is to not show the block, why not use CSS? This worked for me: .cart-container .cart-summary #block-shipping { display: none; } (Version: Magento 2.2.1) Edit: I tested the above on 2.3.3 and it also removed the carts ...


6

Update cart summary in ajax response has been solved, we need to call getTotalsAction() javascript function as i mentioned below code : demo.js define([ 'jquery', 'Magento_Checkout/js/action/get-totals' ], function ($, getTotalsAction) { "use strict"; $.ajax({ method: "post", url: ...


5

I find a solution. I hope this can help you. Find the row in your ui component js file where is write the item tag with name "component": <argument name="data" xsi:type="array"> <item name="js_config" xsi:type="array"> <item name="component" xsi:type="string">Magento_Ui/js/grid/provider</item> </item&...


5

Follow the step: how to check is checked or not when i click next button,so based on this I can add custom fee in order totals. --You need to js saveShippingInformation method by following way. Create a requirejs-config.js [Vendor/Module/view/frontend/requirejs-config.js] var config = { "map": { "*": { 'Magento_Checkout/js/model/...


4

So basically the following will applied for the base_ values and non base_ values according to this link as provided by Marius. Difference between Tax Amount and Base Tax Amount Example : base_xxx -----------> default store currency xxx ----------------> currency store currency


4

source How to add a Total row in a magento grid thanks to @mazeUz first you have override sales/grid.php then if you want to add total row then add below code class SSD_Uzkart_Block_Adminhtml_Uzkart_Grid extends Mage_Adminhtml_Block_Widget_Grid { protected $_countTotals = true; public function getTotals() { $totals = new ...


4

Need to comment code in layout file sales.xml (\app\design\frontend\YOUR_PACKAGE\YOUR_TEMPLATE\layout\sales.xml) <sales_email_order_items> <block type="sales/order_email_items" name="items" template="email/order/items.phtml"> <action method="addItemRender"><type>default</type><block>sales/...


4

If you have the order id: $order = Mage::getModel("sales/order")->load($orderId); // get order $order->getGrandTotal(); // get order total


4

you can managed this settign from admin Go to admin>System>Configuration>Sales>Tax>Shopping Cart Display Settings make Display Subtotal=Excluding Tax enter image description here you can managed tax display setting on cart page,from here : admin>System>Configuration>Sales>Tax>Shopping Cart Display Setting ==================...


4

I had a similar issue and this is the way i managed to get it working. You can override the following file app/code/Magento/Checkout/view/frontend/web/js/view/summary/abstract-total.js and update isFullMode function to return true instead of return stepNavigator.isProcessed('shipping'); isFullMode: function() { if (!this.getTotals()) {...


4

First of all, we can save the collect totals by using Checkout session: /** @var \Magento\Checkout\Model\Session $_checkoutSession */ $this->_checkoutSession->getQuote()->collectTotals()->save(); We need to create a controller to trigger the collect totals. When customer clicks the Payment radio button, we will make a request to this ...


4

The getters and setters are not added to the TotalsInterface itself. Instead they are generated in Magento\Quote\Api\Data\TotalsExtensionInterface (which you should find in var/generation) and you use it like this (for custom_attribute): $totals->getExtensionAttributes()->getCustomAttribute();


4

You can observe to the event sales_quote_address_collect_totals_after and achieve it. For this, you need to setup a module and configure an event. Let's say our module is MStack_Exchange. File : app\code\MStack\Exchange\etc\events.xml <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/...


4

1) For customer account: /V1/carts/mine/coupons/:couponCode I just explain how sale rules work for customer logged a) Set coupon: vendor/magento/module-quote/etc/webapi.xml <route url="/V1/carts/mine/coupons/:couponCode" method="PUT"> <service class="Magento\Quote\Api\CouponManagementInterface" method="set"/> <resources> ...


4

There are two changes required to display summary in shipping step. Override both files in your current theme. 1. change /Magento_Checkout/js/view/summary/abstract-total.js file define( [ 'uiComponent', 'Magento_Checkout/js/model/quote', 'Magento_Catalog/js/price-utils', 'Magento_Checkout/js/model/totals', '...


4

Please check these line in Mage_Sales_Block_Order_Totals: https://github.com/OpenMage/magento-mirror/blob/magento-1.9/app/code/core/Mage/Sales/Block/Order/Totals.php#L137-L143 getStrong() is just a magic getter method and its used to display "Grand Total" as bold text.


3

The customer group method would certainly be the cleanest, but if you are already using the groups for other purposes, you can do it programmatically as you suggest. You would be looking to set the tax_percent, tax_amount, and base_tax_amount on the quote item. If you do this by over-riding the tax total collector you can over-ride the percentage in: ...


3

I'd suggest going with another solution, the task to create this module is pretty big. The module touches a lot of area's that deal with price, exporting orders to account packages, credit memo's, shipments, invoices, transactional emails etc. The way I'd implement this is to add an extra fee to the shipping costs. If that isn't an option, go with a stock ...


3

If you want the discount to be applied in the totals you should use shopping cart price rules, not catalog price rules. It is possible to specify shopping cart price rules based on the products in the cart and also apply discounts only to certain products. Then the only problem left is to display original and discounted price on the product detail page ...


3

I've come across the same problem before. I know its an old question but in case somebody sees this, here is what helped me in the cases when I encountered this: Sometimes it might work just by adding more totals into the before/after nodes. However even if your totals are then ordered correctly, some other existing one might get ordered wrongly. The code ...


Only top voted, non community-wiki answers of a minimum length are eligible