Apply discounts programmatically
  • We have a scenario where we need to have multiple different classes of user, with different discounts applied for different classes. One class gets tax included in the price, while another gets a percentage discount. Since only the admins can assign these classes to users, I was thinking we could use v:store:user:tags to make distinctions. But is there a way to apply discounts programmatically based on the user's tag?

  • 4 Answers sorted by
  • I think the answer may be here:

    but I find the discount_class explanation confusing.

  • It sounds like what you want to do is use the tag to render a different add to cart button (and perhaps associated price info) based on the user's tags. I have to run right now, but what I'd experiment with is creating 2 add_to_cart's -- 1 for each type of user and for now just swap them out manually. Then we can work on helping you get each user to see the right one.

  • I think I have the write logic setup for discounts, except that this:

    <v:debug />

    is returning a blank space for tags, so I'm not having much luck in pinpointing the tags for a v:if statement

  • I can help you with this -- email me.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

In this Discussion