0

This question already has an answer here:

I'm trying to get a two tiered pricing structure into my store. Essentially I need every product to have two prices. There's the main price but there's also a secondary price that get's triggered if the customer has more than 14 products in their cart. I can't do an across the board discount, it has to be specific prices per product.

Say product one has a main price of $20 but a hidden secondary price of $15 and product two has a main price of $50 but a hidden secondary price of $30. This will be defined on the product itself. It's all arbitrary pricing set for every product.

I figured out how to set a rule where 14 products will trigger it but I can't work out how to add a secondary price to a product then activate that price.

marked as duplicate by Mołot, Bart, Free Radical, AjitS, Krishna Mohan Oct 24 '14 at 5:26

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    Please don't add a new "Edit" section. Actually edit the original question so it's becomes more comprehensible, if that's necessary. I disagree with the duplicates votes though as the other question is about multiple currencies, not multiple prices. – Letharion Oct 10 '14 at 14:03
1

Luckily you have figured the harder part, counting the 14 products on user's cart. Second part is easily done, and it's called 'dynamic price calculation' or similar terms if you would like to find further information on google.

  • Create a rule
  • Event: Calculating the sell price of a product
  • Condition 0: (which is very important) Entity is of bundle or Entity has field or else you wont see the second price field added to the product type. It's rules assertion internal stuff and is needed, but somehow it's name is confusing.
  • Condition 1: If there are 14 or more products in cart
  • Action: Set the unit price to a specific amount
  • The value you pass to the action above is simply the price value in the second field!

This page could be useful, Sell Price Calculation / The life of a Price Calculation

  • I'm not sure if this is the solution I'm going for. Say product one has a main price of $20 but a hidden secondary price of $15 and product two has a main price of $50 but a hidden secondary price of $30. This will be defined on the product itself. It's all arbitrary pricing set for every product. So I could be reading this wrong but is 'set the unit price to a specific amount' going to just change the order total to a specific amount. – Matt Coady Oct 6 '14 at 17:11
  • Yes setting each line-item price will affect the order total, but is'nt that what you need? pretty much seems like that... if I have ordered more than 14 products, then I have more than 14 line items in my cart. The initial value of each line item is set to original price field (by commerce itself, by default, as usual). BUT if this rule here triggers, changes each line-items price to the price of second field. If not, I guess you have to explain the workflow a little bit more :) – hkoosha Oct 6 '14 at 17:37
  • just for more clarification: It doesn't matter where the second price is defined for each product. the product itself seems a logical choice but it could be anywhere, a node, a user, a profile, an entity, a term... anywhere, but again for each product separately. You have decided to put this second/hidden/discount value in product itself. Did I get it right? – hkoosha Oct 6 '14 at 17:41

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