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-ASP Shopping Cart Customer Forum

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

 All Forums
 VPCart Forum
 Customization
 Image array from ''pother''
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

robarsalon
Starting Member

USA
21 Posts

Posted - September 05 2006 :  16:15:24  Show Profile  Visit robarsalon's Homepage  Reply with Quote
I use "pother3" to store features, it contains inline values "1B,4,16" for example and they are displayed in a dropdown (commas automatically separate list values).

What I need to do is look up 'pother3' values and display a list of JPEGs adding

"images/color_swatches/<%optionValueHere%>.jpg"

resulting in 

"images/color_swatches/1B.jpg" <br> 
"images/color_swatches/4.jpg" <br>
"images/color_swatches/16.jpg" <br>

and so on, in short - to display an image somewhere below, as long as it's name is mentioned in the dropdown (pother3 of that product).

Any help is very much appreciated.


this is needed for color swatches, but since every product has 20 different features, and feature set differs from one another per product, the built in feature is not working for this purpose.

jubjub
VP-ASP New User

110 Posts

Posted - September 05 2006 :  23:17:52  Show Profile  Reply with Quote
The file that creates the drop downlist when you use the selectlist option is shopproductfeaturesgenerate.asp. Modify Sub GenerateSelectList to include the images. For me, the code is
for i = 0 to parraycount
sSelect = sSelect & "<option>" & Parray(i) & "</option>"
next
sSelect= sSelect & "</select></p>"
addfeatureimage images
If images<>"" Then
writefeatureimages images
end if
Response.write sSelect

Replace those lines to
for i = 0 to parraycount
sSelect = sSelect & "<option>" & Parray(i) & "</option>"
images = images & "<img src=""images/color_swatches/" & Parray(i) & ".jpg"" style=""vertical-align:middle"">" & Parray(i)& "<br>"
next
sSelect= sSelect & "</select></p>"
Response.write sSelect
If images<>"" Then
writefeatureimages images
end if

The directory reference to the images are hardcoded though, but hope at least it helps somewhat.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000