Hi,
First of all you need to create the "optional extras". These are simply product features with a price attached to the feature. For example these are the settings for one:
Feature Number 888898
Feature Caption Optional extras:
Feature Name ID Sensual Glide Glide Lube 80ml CH60100
Feature Our Price 3.00
Feature Type Checkbox
Multiple Yes
Required No
Default No
Other Fields UOT60100.jpg
Other Fields 1 7080
Other Fields 2 ID Sensual Glide Glide Lube 80ml CH60100
Other Fields is the image of the optional extra, Other Fields 1 is the catalogd of the product and Other Fields 2 is the name that is displayed to the user.
I have put in the name of the product in Other Fields so that I can alter the way it is displayed to the user.
I haven't used featureimage because I had problems with it and my solution was quicker and easier than trying to find out what was wrong.
Then you attach the feature to the product as if it were a standard feature.
Then in the shopproductfeaturesgenerate.asp file the GenerateButton sub (approximately line 190) becomes
Sub GenerateButton (myconn)
' generates either radio or checkbox
Dim LoopEnd, FeatureValue, images
Dim Multiname, valuename
loopend="False"
sSelect=""
dim checkname, setselected
setselected=""
images=""
' read features record and add to select statements
response.write "<br><table width='100%' cellspacing='7' cellpadding='2' class='dashed'><tr><td>" & ProdFeatureCaption & strFeatureCaption & ProdFeatureCaptionEnd
tempOption=""
valuename=fprefix & Prodindex & "Featurevalue" & fcount
checkname=fprefix & Prodindex & "Feature" & fcount
Do While LoopEnd="False"
GenerateFeaturename tempoption
Featurevalue=lngFeatureid
If strfeaturedefault<>0 then
setselected=" checked=""checked"" "
else
setselected=""
end if
If FeatureMultiSelection="YES" then
sselect="<a href=shopexd.asp?id=" & strfeatureother1 & "&bc=no target=_blank><img src=Images_Recommended/" & strfeatureother & " width=25 height=25 border=0 alt=""" & strfeatureother2 & """></a><input type=""checkbox""" & setselected & " name=""" & valuename & """ value=""" & featurevalue & """ />" & tempoption & " "
else
sselect="<input type=""radio""" & setselected & " name=""" & checkname & """ value=""" & featurevalue & """ />" & tempoption & " "
end if
addfeatureimage images
response.write sselect & "<br />"
sselect=""
FeatureRs.movenext
if Not FeatureRS.EOF then
GetOptionValues FeatureRS, myconn
else
LoopEnd="True"
end if
loop
sSelect= "</p>"
response.write sSelect & "</td></tr></table><br><br>"
If images<>"" then
WriteFeatureimages images
end if
If FeatureMultiSelection="YES" then
response.write "<input type=""hidden"" name=""" & checkname & """ value=" & Chr(34) & lngfeatureid & Chr(34) & " />"
end if
end sub
This puts a box around the option and sets the layout and alt text for the product.
In Sub GetOptionValues you then need to add the line
strfeatureother2=objrs("featuresother2")
which calls the Other Fields 2.
One important thing to remember is that if you have any other features with a radio button or checkbox they will also have the box around them. To get around this I made sure that all our other features did not appear as checkboxes or radio buttons.
Hope this helps.
Steve
www.clixgalore.co.uk/AffSelectProgram.aspx?AdvProgID=7911
www.temptationsdirect.co.uk