Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Oct 2016
    Location
    Belgium
    Posts
    8
    Plugin Contributions
    0

    Default Buy one get one free, tax calculation problem

    Dear members,

    I encounter a problem after installing the plugin 'Buy one get one free'
    I installed it in a testversion of my online store and the problem is that the tax rate isn't calculating correctly.
    When the products you want to sell f.e. buy 4 get 1 for free, the program calculates 4 times the price, then it substracts 1 time the price. Ok so far
    But then comes the tax calculation. And here it calculates the tax on the subtotal ( 4 * price).

    Click image for larger version. 

Name:	Untitled.png 
Views:	48 
Size:	5.4 KB 
ID:	16730

    See this example.
    Anyone knows how to adjust this?

    Many thanks.

    Koen

  2. #2
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    957
    Plugin Contributions
    1

    Default Re: Buy one get one free

    on the admin -> modules -> order-totals -> ot_bogo is the configuration for this module. there is a tax_class there. is that set to the same tax class as for your products?

    it seems that this should be a configuration that is not correct for the module.

    good luck!
    feel free to donate money to carl or to the Zen-Cart Team

  3. #3
    Join Date
    Oct 2016
    Location
    Belgium
    Posts
    8
    Plugin Contributions
    0

    Default Re: Buy one get one free

    Maybe I have another plugin installed. I couldn't adjust the tax rate. Only sort order.

  4. #4
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    957
    Plugin Contributions
    1

    Default Re: Buy one get one free

    i'm not sure why that is not there. you need to check the value of:

    MODULE_ORDER_TOTAL_BOGO_TAX_CLASS

    you can also get there with this URL:

    https://yoursite.com/YOUR_ADMIN/configuration.php?gID=6

    although there are quite of few other values there, that you do not want to alter.

    you want to find that configuration value and ensure that its tax class is set to the same tax class as your products.

    in addition, it looks like if you have NOT logged in, it will not deduct the tax from the discount. there needs to be a customer_id in the SESSION else it will not subtract the discount.

    i have not installed this module, from the code that is what it looks like; and it looks like it should work.

    good luck!
    feel free to donate money to carl or to the Zen-Cart Team

  5. #5
    Join Date
    Jan 2004
    Posts
    64,748
    Blog Entries
    6
    Plugin Contributions
    214

    Default Re: Buy one get one free

    Quote Originally Posted by carlwhat View Post
    you need to check the value of:

    MODULE_ORDER_TOTAL_BOGO_TAX_CLASS

    you can also get there with this URL:

    https://yoursite.com/YOUR_ADMIN/configuration.php?gID=6
    It's a lot simpler and safer to use the Admin->Tools->Developers Tool Kit and just paste MODULE_ORDER_TOTAL_BOGO_TAX_CLASS into the first input field.
    .

    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.

  6. #6
    Join Date
    Oct 2016
    Location
    Belgium
    Posts
    8
    Plugin Contributions
    0

    Default Re: Buy one get one free

    Hello to you all and thanks for replying on my problem.

    This value isn't there yet: MODULE_ORDER_TOTAL_BOGO_TAX_CLASS. But there are two plugins available on the zen cart website for 'BOGO'
    One called Buy1get1free. In this one you can enter how many articles you want to sell and how many the costumer get's for free at the bottom of the article adjustment page. This is the plugin I'm using at this moment because is easy to use, but it's without the tax rate .
    The other plugin, I think the one carlwhat is referring is the one called BOGO and here you can enter tax rates in the admin -> Modules -> order total but here I have to give on entire category and not only one product and that's a bit of a gap for me I think.
    What I'm trying to do is to change the code of the plugin I'm using that the value of the discount is the value tax included. So then you get subtotal - discount ( tax included ) + shipping + tax ( from subtotal) = total price.

  7. #7
    Join Date
    Oct 2016
    Location
    Belgium
    Posts
    8
    Plugin Contributions
    0

    Default Re: Buy one get one free

    Maybe just for explaining even more:

    Click image for larger version. 

Name:	article.jpg 
Views:	24 
Size:	7.6 KB 
ID:	16732

    Click image for larger version. 

Name:	discount.jpg 
Views:	25 
Size:	15.7 KB 
ID:	16733

  8. #8
    Join Date
    Jan 2004
    Posts
    64,748
    Blog Entries
    6
    Plugin Contributions
    214

    Default Re: Buy one get one free, tax calculation problem

    I'm not familiar with the module you're using.
    But it might be worth reading here: http://www.thatsoftwareguy.com/zenca...o_bonanza.html ... several of his Zen Cart plugins are also in the Zen Cart downloads area and have support threads here on these forums.
    .

    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.

  9. #9
    Join Date
    Oct 2016
    Location
    Belgium
    Posts
    8
    Plugin Contributions
    0

    Default Re: Buy one get one free, tax calculation problem

    if($_SESSION['cost_minimize_agg'] > 0){
    $this->output[] = array('title' => $this->title . ':',
    'text' => '-' . $currencies->format($_SESSION['cost_minimize_agg']+$order->info['tax'], true, $order->info['currency'], $order->info['currency_value']),
    'value' => $_SESSION['cost_minimize_agg']);

    This is what I have added in the code and here lies the solution for my problem I think.
    Just that now the free articles are have the entire tax extra and not for just the amount of articles that are free.
    Anyone knows a solution to that?

  10. #10
    Join Date
    Oct 2016
    Location
    Belgium
    Posts
    8
    Plugin Contributions
    0

    Default Re: Buy one get one free, tax calculation problem

    Problem solved
    Afterward you always would hit your one head.

    'text' => '-' . $currencies->format($_SESSION['cost_minimize_agg']+($_SESSION['cost_minimize_agg']*0.06), true, $order->info['currency'], $order->info['currency_value']),
    'value' => $_SESSION['cost_minimize_agg']);

    In my case there is a tax rate off 6% for all my products (for now...)
    So I have added this amount of tax 'manually'.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v151 % off on a whole order at checkout and buy one get one free option
    By webmiss in forum General Questions
    Replies: 3
    Last Post: 18 Sep 2013, 05:43 PM
  2. Buy One get One Free Add on question
    By stxmona in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 10 May 2012, 10:53 PM
  3. Buy One Get One Free Module - Help Please
    By integrity_designs in forum General Questions
    Replies: 2
    Last Post: 20 Jan 2011, 01:29 AM
  4. Is It Possible To Offer Buy One Get One Free On Zen Cart
    By UrbanGod in forum Managing Customers and Orders
    Replies: 6
    Last Post: 5 Sep 2009, 02:27 PM
  5. Big chooser Buy one Get one Free help
    By Andy_GS in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 13 Jan 2009, 12:40 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR