AbanteCart Community

Shopping Cart Operations => Built-in Features => Topic started by: natdroid on November 20, 2019, 07:16:43 AM

Title: order total
Post by: natdroid on November 20, 2019, 07:16:43 AM
Can AbanteCart cart add a new subtotal to cart page for display only that does not affect the value of the invoice

Title: Re: order total
Post by: abolabo on November 21, 2019, 05:47:16 AM
teorethically it's possible. You should to create your own "order total" extension, that will have storefront model (you can look into public_html/storefront/model/total/handling.php for example  ).
This model must have method getTotal(). It returns an array that looks like as
Code: [Select]
$total_data[] = array(
                    'id'         => 'handling',
                    'title'      => $language->get('text_handling'),
                    'text'       => $this->currency->format($conf_hndl_fee),
                    'value'      => $conf_hndl_fee,
                    'sort_order' => $this->config->get('handling_sort_order'),
                    'total_type' => $this->config->get('handling_fee_total_type'),
So in your model you can set 'value' key as 0, but 'text' can be any text as you want.
Zero value  does not affect on subtotal and total amount of order.
You can try to change some existing model such as handling.php to check this approach.
If it work - create your own extention with your own custom total model