How to have options for a product have different prices depending on the group?

I have some options for a product like color red and blue, how do I set different prices for different groups? Say, wholesalers get red for 2 less… or something…



EDIT: Damn it, seems like there is no easy way: [url]http://forum.cs-cart.com/showthread.php?t=16854[/url]

The only work around is to have a product for each group with visibility set to that group that carries its own options with prices for that particular group…



What a mess I will have, more products than I have to… slower cart… More confusing price updates…

Well, I thought about it. I can quickly mod so only certain options would be seen with specific group level. Thus, I can keep same number of items, no need to have a different item for each price group. Then I’ll just create different options for different price groups and add ALL options for all price levels to the item. The specific price groups will see out of all options only those that were marked for that group.



The only logical problem is when a user shops with “GUEST” level and then logs in… The cart would hide his guest options but price would still reflect them (until that item is removed from the cart)…



I don’t see good fix. Is there a function that can clean the cart?

Ok, I did it. Now we have one product but multiple product options for it and only those that fit a particular price group will show up. Down side is, cart has to be emptied upon login…

interesting, all manual product detail in cart one by one or done with code?





JOhn

[quote name=‘johnbol1’]interesting, all manual product detail in cart one by one or done with code?





JOhn[/QUOTE]



Pardon?

Hi TexasGuy,



I read your postings several times, but I cannot understand how you realized to get options for different user groups - if this is really what you were trying to achieve?



I need that feature urgently - currently I have to set up a second product if one of the options should only be available for one of the user groups.



Example:

100g bag of tea for all customers

1kg bag of the same tea only for wholesaler customers

[quote name=‘TexasGuy’]Well, I thought about it. I can quickly mod so only certain options would be seen with specific group level…[/quote]



Do you mind posting your code to do this? I imagine you added a selector for user groups on the options page in admin, and added a field to the product_options table for this? Or did you hard code your options?



If you added admin functionality, why didn’t you add a user group selector in the variants section so that each variant will show or not depending on the group it is assigned to?



In any case, options for user groups is definitely needed. I would appreciate knowing how to implement a solution if you have one.

Well, it was not easy to. Though later I had some use PM me that he had CS-Cart people modify his cart to implement the same, he wanted to share, I believe not free. Since I already coded my thing, it made no sense to me to jump on the wagon. If you want, I will PM his screen name to you.



About my modification, I went my own way, maybe not the best one but works. I am not sure how my implementation will fit your needs, it has its shortcomings.