Author |
Topic |
|
xcraft
Starting Member
Hong Kong
3 Posts |
Posted - October 21 2011 : 07:29:52
|
Hi, as in many shops, the left column shows our main product categories. But standard, this is only just text.
We want the category picture to be always visible in the left column, like a fixed column wide picture.
Catergory1 [picture] Category2 [picture] Category3 etc
I searched whole VPASP but can't find a "how to".
Is this possible at all?
Tnx in advance for any feedback.
Sportdietshop.com |
|
diegomilito
VP-CART Expert
Argentina
779 Posts |
Posted - October 22 2011 : 00:34:09
|
edit file shopproductsubs.asp
and please find this line :
name = catrs("catdescription")
and then after you locate that code, under that code, you place this new code :
dim catimagename catimagename = catrs("catimage")
Also, please find this lines :
if hasSubcategory = "" then mylink = "<a href=""shopdisplayproducts.asp?id=" & cid & "&cat=" & Server.URLEncode(replace(name,"&","&")) & addwebsesslink & """>" & name & "</a>" else mylink = "<a href=""shopDisplayCategories.asp?id=" & cid & "&cat=" & Server.URLEncode(replace(name,"&","&")) & addwebsesslink & """>" & name & "...</a>" end if
please make a modification of the code i mentioned above and please replace with the code i mentioned below instead:
if hasSubcategory = "" then mylink = "<a href=""shopdisplayproducts.asp?id=" & cid & "&cat=" & Server.URLEncode(replace(name,"&","&")) & addwebsesslink & """>" & name & "<BR><img src=""" & catimagename & """></a>" else mylink = "<a href=""shopDisplayCategories.asp?id=" & cid & "&cat=" & Server.URLEncode(replace(name,"&","&")) & addwebsesslink & """>" & name & "...<BR><img src=""" & catimagename & """></a>" end if
I have this in my site and it works very well so far....
Chaoo... Diego |
|
|
xcraft
Starting Member
Hong Kong
3 Posts |
Posted - October 22 2011 : 06:01:26
|
Wow, many thanks, that was fast! Was expecting an answer in the line of "just check the pictures switch to ON", but this is rather more advanced stuff.
Couldn't have found this out myself, so out of respect for your black-belt VPASP knowledge I just did a honorary kata, right here in the office, and shouted out "Ush!" real loud.
Enjoy the weekend!
|
|
|
diegomilito
VP-CART Expert
Argentina
779 Posts |
Posted - October 28 2011 : 04:59:20
|
lol that is fun xcraft! someday we will play a real karate!
Enjoy weekend too. |
|
|
|
Topic |
|