VP-ASP :: Shopping Cart Software

Shopping Cart Software Solutions for anywhere in the World

US/Canada(Toll Free): +1 888 587 2278
Europe/UK: +44 (020) 7193 9408
Australia/New Zealand: +61 3 9016 4497

VP-Cart StoreFront Customer Forum

Home | Profile | Register | Active Topics | Members | Search | FAQ
Save Password
Forgot your Password?

 All Forums
 VPCart Forum
 Problems and bugs
 Product Features
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

35 Posts

Posted - November 21 2006 :  15:16:51  Show Profile  Reply with Quote

There appears to be a minor problem with Product Features in the 6.09 release (Free Version). In the GetProductFeatures routine in the ShopProductFeatureProcess.asp file at around line 46, appears the following:

   'VP-ASP 6.09 - precautionary security fix
   if not isnumeric(featureid) then
	   shopclosedatabase featureconn
	   shoperror "Feature ID must be numeric"
   end if

Now if you setup your Product Feature as a DropDown, the first entry in the drop down will be "Select", so if the user doesn't select a value and click directly on the Order button, featureid will be "Select". Being "Select", of course it is not numeric and the code ends with the ShopError "Feature ID Must be numeric". But the code should continue down to the "VerifyRequired msg" statement so that the user gets a message stating that "Feature xxx is required!"

Either the code above needs to take into account the Select value or the Select value in the SelectList should be set to a specfic value. If you look at the code for the Select you will see <option value selected>... When value doesn't have a value it uses the text. Anyone know where this function is?


Starting Member

35 Posts

Posted - November 22 2006 :  10:09:35  Show Profile  Reply with Quote
What I did was to change the Select option element to force a value="" for the Select option and then changed the following line to:

if not isnumeric(featureid) and featureid <> "" then
end if

So now if featureid is not a number and has a value, a shoperror is displayed else it continues down through validation and if its required and is blank the correct message is displayed.

I found that there are many many instances where the attributes in a HTML tag are not quoted (i.e. <img border=0...>). Although, this is ok, it can cause problems. All attributes should always be quoted.
Go to Top of Page


4282 Posts

Posted - November 22 2006 :  12:54:23  Show Profile  Visit support's Homepage  Reply with Quote
Thanks for that. Appreciate you posting a fix!

We will look into this and add to our next release.


VP-ASP Support
Go to Top of Page

Starting Member

35 Posts

Posted - November 23 2006 :  06:47:17  Show Profile  Reply with Quote
Sorry I didn't add the fix to the select statement. In the GenerateDropDownList function in the file ShopProductFeatureGenerate.asp, change the line at around line #159 to (add what is in bold (value=''):

PrevOptionNum=lngFeatureNum           ' set prev=current
sSelect = ProdFeatureCaption & strFeatureCaption & ProdFeatureCaptionEnd 
sSelect = sSelect & "<select size='" & msize & "' name='" & Selectname & "'" & Multiple & ">"
sSelect = sSelect & "<option value=''  selected>" & getlang("langCommonSelect") & "</option>" 

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000