Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Hybrid View

  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:	134 
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
    2,682
    Plugin Contributions
    9

    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!
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  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
    2,682
    Plugin Contributions
    9

    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!
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  5. #5
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    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
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    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.

  8. #8
    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?

  9. #9
    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'.

  10. #10
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

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

    On the surface that appears to address what is seen, but when charged, is the correct amount "taken"? I'm also not familiar with the plugin, but the above code change appears to only address one output characteristic and wouldn't want you to be surprised to be charged more than displayed.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 
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