Results 1 to 7 of 7

Hybrid View

  1. #1
    Join Date
    Oct 2004
    Location
    Southport, UK
    Posts
    4,244
    Plugin Contributions
    20

    Default Changing the sub-total wording depending on tax

    At present, I have the sub-total text say "Sub-total (including VAT @17.5%)"; the client has now expanded his options so that tax is sometimes NOT applied.

    What I want to do is to change that sub-total text depending on whether tax is "on" or "off".

    It seems to me that the logical place to do it is to insert a conditional statement in the function ot_subtotal in includes/modules/order_total/ot_subtotal.php to change the value of MODULE_ORDER_TOTAL_SUBTOTAL_TITLE so my question is - what is the variable for tax on/off?
    Development Manager @ JSWeb Ltd - suppliers of Applepay/Googlepay for Zencart
    20 years with Zencart !

  2. #2
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Changing the sub-total wording depending on tax

    Quote Originally Posted by Ryk View Post
    the client has now expanded his options so that tax is sometimes NOT applied.

    ...

    my question is - what is the variable for tax on/off?
    What is the criteria for tax being "sometimes NOT applied" ?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Oct 2004
    Location
    Southport, UK
    Posts
    4,244
    Plugin Contributions
    20

    Default Re: Changing the sub-total wording depending on tax

    Shipping destination by country
    Development Manager @ JSWeb Ltd - suppliers of Applepay/Googlepay for Zencart
    20 years with Zencart !

  4. #4
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Changing the sub-total wording depending on tax

    I gather your client is using "tax included in prices" via the admin switch.
    Thus, prices always show with tax already included.

    But, if the buyer's country matches a certain zone the "tax included" amount is zero because tax is not relevant.
    And you're only wanting to change the display text if that tax amount is zero ?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Oct 2004
    Location
    Southport, UK
    Posts
    4,244
    Plugin Contributions
    20

    Default Re: Changing the sub-total wording depending on tax

    Yep, that's it.
    Development Manager @ JSWeb Ltd - suppliers of Applepay/Googlepay for Zencart
    20 years with Zencart !

  6. #6
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Changing the sub-total wording depending on tax

    /includes/modules/order_total/ot_subtotal.php
    line 38 says this:
    Code:
          $this->output[] = array('title' => $this->title . ':',
    change it to this:
    Code:
          $this->output[] = array('title' => $this->title . ($order->info['tax'] == 0 ? '' : TEXT_TAX_INCLUDED_MESSAGE) . ':',
    and add a language define to your extra-definitions folder saying this:
    Code:
    define('TEXT_TAX_INCLUDED_MESSAGE', '(including VAT @17.5%)');
    And use the default name for the subtotal text (ie: "Subtotal").
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #7
    Join Date
    Oct 2004
    Location
    Southport, UK
    Posts
    4,244
    Plugin Contributions
    20

    Default Re: Changing the sub-total wording depending on tax

    Excellent - many thanks.
    Development Manager @ JSWeb Ltd - suppliers of Applepay/Googlepay for Zencart
    20 years with Zencart !

 

 

Similar Threads

  1. Can't control wording for sub-total in admin
    By DavidGGG in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 11 May 2011, 05:19 PM
  2. Free shipping needed on the sub total not (as it currently is)the total
    By imageriot in forum Built-in Shipping and Payment Modules
    Replies: 4
    Last Post: 21 Feb 2008, 05:43 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg