AbanteCart Community

AbanteCart Development => Customization help => Topic started by: hus2020 on April 07, 2017, 11:08:19 PM

Title: Show Total Price instead of Per Unit Price in Order Summary
Post by: hus2020 on April 07, 2017, 11:08:19 PM
In the final checkout phase, there is an order summary displayed in top right. By default, it displays the quantity, and the per unit  price of the product. Instead of such, I want to display the total price = per unit price x no of quantity.

For example below, I am ordering 3x Apron with per unit price at 20, so the total must show 60 and not 20.
For Vest, I am ordering 2x, per unit cost is 32, so the total must show 64 and not 32.

(http://i64.tinypic.com/20ivpqw.png)

How do I do this change. Please anyone guide me. Thank you.
Title: Re: Show Total Price instead of Per Unit Price in Order Summary
Post by: abolabo on April 10, 2017, 04:52:35 AM
1. open file /public_html/storefront/controller/blocks/order_summary.php
2. go to line #86
3. replace
Code: [Select]
'price'      => $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax'))),with
Code: [Select]
'price'      => $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax'))*$result['quantity']),
Title: Re: Show Total Price instead of Per Unit Price in Order Summary
Post by: hus2020 on April 10, 2017, 08:46:30 AM
You're a life savior man. Thank you so much.

I just have one more pending issue, on the post below. Would really appreciate your input/guidance in this matter.

http://forum.abantecart.com/index.php/topic,5450.msg23889.html#msg23889 (http://forum.abantecart.com/index.php/topic,5450.msg23889.html#msg23889)

1. open file /public_html/storefront/controller/blocks/order_summary.php
2. go to line #86
3. replace
Code: [Select]
'price'      => $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax'))),with
Code: [Select]
'price'      => $this->currency->format($this->tax->calculate($result['price'], $result['tax_class_id'], $this->config->get('config_tax'))*$result['quantity']),