0

I am running CartThrob 2.2.5. I am trying to exempt a product type from shipping and tax. I found the setting in their documentation but it isn't working (http://cartthrob.com/docs/tags_detail/add_to_cart_form/index.html)

Here is the opening tag. Any ideas why it isn't working?

EDIT: Updated to include Stash tags.

{exp:stash:get_list 
    name="event_list"
    match='#{freebie_last}#' 
    against='this_categories_url' 
    limit='1'
}
    {exp:cartthrob:add_to_cart_form 
        class='form-horizontal' 
        entry_id="{this_entry_id}" 
        tax_exempt="yes"
        shipping_exempt="yes"
        return="wines/wine-cart"
    }               
        ....
    {/exp:cartthrob:add_to_cart_form}
{/exp:stash:get_list}
  • Where is {this_entry_id} coming from? Should this be {entry_id} instead? – Ian Apr 15 '13 at 21:16
  • Did you try upgrading to CT 2.2.9 already? – Christian Apr 16 '13 at 13:41
  • I'm having the same issue and have upgraded. Have you figured this out yet? – Mel Apr 29 '13 at 23:21
  • Ballyhoos answer is over a year old but the Cartthrob documentation has not been updated. So thank-you Ballyhoo because you saved me a lot of time. – Jeanne Pickering Feb 20 '15 at 14:09
0

Try changing entry_id="{this_entry_id}" to entry_id="{entry_id}".

If that still doesn't work then try it with {exp:cartthrob:add_to_cart} instead of {exp:cartthrob:add_to_cart_form}.

  • Sorry, I forgot to mention, I am using this inside Stash. The 'this_entry_id' is really the correct tag that I should be using. – Mike Zens Apr 15 '13 at 21:47
  • At first glance there's a lot of plugins in use on that section which may all have an effect. Especially when it comes to parse order. You're setting a Stash list matching a Freebie segment, passing another Stash variable into the Stash list within the CT add to cart form tag. Give it a try without Stash and Freebie first and just hard code the entry_id to test. Does that work? – Ian Apr 15 '13 at 22:16
  • I removed the plug-ins and still got the same issue. – Mike Zens Apr 15 '13 at 22:59
  • I would try and update to the latest version of CT (2.2.91) and then test again to see if that solves the issue. From your description it looks like more of a bug which may well have been squashed in the most recent updates. – Ian Apr 16 '13 at 16:55
  • Yea, that is kind of what I was thinking too. Thanks for the help. If the update doesn't fix it, I will contact their official support. – Mike Zens Apr 16 '13 at 17:07
2

I came across a similar issue with the 'add_to_cart' tag, and found the 'bug' was that the naming conventions for the parameters for those options were different to what was stated in the documentation to what was in the code.

The parameters should've been;

{exp:cartthrob:add_to_cart no_tax="yes" no_shipping="yes"}
  • Cartthrob build was v2.1.6

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.