Hey Luke,
We have certain products that we don't want to sell to all the customers. For example: there is a phone brand we are not allowed to sell in NY but we can sell to all other states. I added a custom field in DSC_User which would be 1 if customer is allowed to buy product for this brand and it will be 0 if he is not.
I also added the code to check if the product belongs to this category or not.
I did all this in core project.
Only thing left is to throw an error, when customer tries to add this product to the cart, if he is not allowed to buy it.
I am not sure which part of the code to check this for. I want to throw the error before its even added to the cart.
I tried modifying Store/ItemAddedToCart.aspx but that didn't work.
Can you please help.
Thanks
-D
|