As with product-based customer pricing, you need to set the following in your shop configuration:
Xcustomerprices |
Setting this to Yes turns on customer-based pricing. |
Then you need to set up records in your customerprices table to tell VPCART about the discounts certain customers are entitled to. You can do this by going to Discount/Coupon Manager>Customer Discounts in your shop administration.
The customerprices table consists of just a few fields.
Customerid |
The customer number from the customers table. |
Categoryid |
If the customer should only get a discount on a specific category, enter the category ID here. |
catalogid |
If the customer should only get a discount on a specific product, enter the catalog ID here. |
discountpercent |
If the customer should receive a percentage off the price, this is the discount percentage. |
discountamount |
If the customer should receive a fixed amount off the price, this is the amount. |
After the customer has logged in, each time they view a product, VPCART looks up the customerprices table to check if they should receive a discount. If a discount is found,the price is adjusted before being displayed.
If you want to provide a storewide discount, set both the categoryid and catalogid to zero.