9

Is it possible to specify different prices for products in Store depending on the member group logged in.

For example, on our EE/Store site (currently only selling Retail) our client wants now to sell to Trade and Retail requiring two different prices. We could specify two inventories but obviously these would then cause problems as we would have multiple products with the same SKU.

2 Answers 2

6

It is not something that is built into Store at the moment but there are 2 ways that you can implement the functionality depending on the complexity of your product data.

  • If your products are fairly simple and wont have modifiers effecting the price you can create the different price levels as modifiers per product then use a conditional in your template to preselect the proper modifier in a hidden field. The only downside to this is that the product modifier names would need to be the same so the in template conditionals worked without any problems.

  • The second option would be to create 2 channels for your products. Lets call the first channel "product_details" which would house all of your details about the product but would not contain a Store fieldtype. In the second channel lets call it "product_prices" you would want to create 3 fields a Store fieldtype, Playa, and a dropdown or select field that would allow you select which member group the entry would apply to. Then in your template you would list the items on the site using the product_details channel and would then need to have the playa field search for the related entries where you dropdown or select had a value of the currently logged in member.

Lastly if you are experienced with PHP you could easily write an extension that would be able to handle this. If you were to write an extension you would want to use the store_process_product_tax hook to modify the product based upon the users member group before it is presented to the user.

4
  • Justin, just curious now with Store 2 out are these still the recommended approaches for pricing based on member group? It looks like at the very least the store_process_product_tax extension hook is different.
    – Alex Kendrick
    Oct 29, 2013 at 4:04
  • Alex in Store 2 you would be able to use any of the Order Update hooks ( exp-resso.com/docs/extension_hooks.html#order_update_hooks ) with either the store_order_item_add_start or store_order_item_recalculate_start being the best for you. Oct 29, 2013 at 18:02
  • Thanks, Justin. I ended up using the Store 2 Promotions "Restrict to Member Groups" setting to achieve this, per Adrian's recommendation on Twitter. I created a sale (percentage discount) tied to the wholesale member group. Works perfectly!
    – Alex Kendrick
    Oct 30, 2013 at 14:53
  • Aww yes, if you are able to apply a blanket percentage rate across all your products that is definitely the way to go. Glad you were able to get it sorted out. Oct 30, 2013 at 17:36
3

I don't believe that exp:resso store can do this (or couldn't last time I checked). If the discount is standard you could set up a coupon code that will allow you to X% off a orders total.

If you're early on in development you may want to consider CartThrob as this functionality is included.

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.