• Welcome to KonaKart Community Forum. Please login or sign up.
 

What is the best option for restricting product purchase by user group and for d

Started by Sumatra, February 21, 2009, 02:32:04 am

Previous topic - Next topic

Sumatra

1. What is the best way in konakart to restrict some users from buying certain products?  
2. What is the best way to show one image for a product if the user is in one group, and show them another image for the product if the use is in separate group?

All users will be assumed to be restricted from buying certain products until they log in.  I have customized the LoginSubmit Action to query a separate database to determine if the user is enrolled in a company program.  If they are, then I set their status in that program in their session cookie.  I now need to use that program status to:

- Restrict users from adding a product to their shopping cart if they are not in the program.  (All non logged in users will be assumed to not be in the program.)
- Display restricted products with one image to enrolled users and a separate image to non-enrolled users.

I see that both AddtoCart actions check for product options, but these are options (set in the admin app) that a customer must select from before buying the product.  I guess I could use this option check to simply redirect the customer to a page that says they cannot buy the product unless they enroll in the program.  

I see that there are three filter product actions - one by manufacture, one by category, and one by tag.  This would work well if I only showed users the products that they can buy, but the company wants me to show all products to all customers.  

Thank you for your help.

trevor

Quote- Restrict users from adding a product to their shopping cart if they are not in the program.  (All non logged in users will be assumed to not be in the program.)

Take a look at AddToCartFromProdIdAction. You could put the "whether or not restricted" information in one of the product custom fields and use that together with the customer information to decide whether or not to add the product.

Quote- Display restricted products with one image to enrolled users and a separate image to non-enrolled users.
The product should have both images defined in two of the four image fields. In the Jsp at display time, you could pick out the correct one based on the customer information in the session.

Sumatra

Trevor,

Thank you for your answers!  Konakart is so rich in options that it is hard to figure out the best one to choose.