Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 VP-ASP 7.0 Questions
 Limiting # of features selected
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

bducolon
Starting Member

41 Posts

Posted - June 15 2014 :  15:27:45  Show Profile  Reply with Quote
I have knitted products for sale that someone can choose the colour of yarn that they want. One is a throw, that the purchaser mustthree colours in order to purchase. I tried the radio button configuration and made it mandatory to choose. I added the feature to the product three times, but the purchaser need only select one colour from one of the features to order. I can''t have this Is there a way to limit the number of features selected for a product when you have checkbox as an option so that only 3 colours can be chosen. The link to the product in question is https://www.drg-gdd.ca/shopdisplayproducts.asp?id=81&cat=%09Throws%09.

carfin
VP-CART Expert

United Kingdom
948 Posts

Posted - June 16 2014 :  04:37:33  Show Profile  Reply with Quote
Hi,
this code will display an error message if the customer does not choose 3 colours from your features checkbox list. It will apply to any product that has its features displayed as checkboxes.
First create a new language record LangUserThreeColours with your warning message eg Please choose 3 colours for this product. Save and reset your language.
Then open the file shopproductfeaturesprocess.asp and find the sub routine called sub ProcessCheckBox (at line 150 approx.)

Find these lines of code
 Featurecount = featurecount + 1
 end if
 next

and insert the following lines:
''********* 16.06.2014 CUSTOM check for 3 colour features selected
 If featurecount<>3 then
 ShopError GetLang("LangUserThreeColours")
 end if
''*********


Save, upload and test.

Regards,

Carrol
www.deanston-electrical.co.uk

Edited by - carfin on June 16 2014 04:38:09
Go to Top of Page

bducolon
Starting Member

41 Posts

Posted - June 16 2014 :  08:30:47  Show Profile  Reply with Quote
Thanks Carol, I''ll try that. I figured you were the one to help since you helped me before with the displaying the features in the columns.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000
0 Item(s)
$0.00