Please help us to make AbanteCart Ideal Open Source Ecommerce Solution for everyone.

Support AbanteCart eCommerce

Author Topic: order total  (Read 2014 times)

Offline natdroid

  • Full Member
  • ***
  • Posts: 106
  • Karma: +35/-2
    • View Profile
order total
« 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


Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2006
  • Karma: +309/-12
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: order total
« Reply #1 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
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens


Powered by SMFPacks Social Login Mod