Author Topic: order total  (Read 91 times)

Offline natdroid

  • Full Member
  • ***
  • Posts: 102
  • Karma: +31/-2
    • View Profile
    • Contact
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
https://ipfs-sec.stackexchange.cloudflare-ipfs.com/magento/A/question/203571.html

help

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 1783
  • Karma: +248/-11
  • 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