How to add custom shipping amount in cart grand total?
Hi @Ashish_k_php,
Can you show us an example of what you're trying to add and how that it could be different from what Magento is showing you right now?
We get shipping amount based on product weight(kg) and shipping address like country name, and postcode and shipping amount is $50.
Cart grand total is $2560.5.
Now how can we add this shipping $50 in the grand total $2560.5?
Is that possible from cart controller?
Something like this?
I guess 2560.50 is the subtotal, not the grand total. Am I right?
I guess 2560.50 is the subtotal, not the grand total. Am I right?
NO, NOT RIGHT.
$2560.50 is the grand total of the cart page.
Hi @Ashish_k_php,
So basically you want to add that shipping cost to the grand total (after the grand total is calculated)?
Yes, right.
Ok, and in that case, if the grand total was $2560.50, and the new/extra shipping cost is $50; the final/real grand total should be: $2610.50.
That's the final grand total you want to have?
@Damian Culotta wrote:Ok, and in that case, if the grand total was $2560.50, and the new/extra shipping cost is $50; the final/real grand total should be: $2610.50.
That's the final grand total you want to have?
Yes, Grand Total => $2560.50 + $50 = $2610.50
Could we agree that there is something different with the concept?
I mean, Grand total is the complete number after everything has been added up.
What you've mentioned is subtotal (which is the total of one set of numbers to which other numbers will be added).
Also, you will need to define the shipping method (and cost) to move forward to the grand total. The shipping is calculated before the grand total.
I guess you will need to affect several steps in order to get the calculation works in that way. Changing this at the Cart Controller won't affect the Grand Total but the Subtotal.