ProductCart E-Commerce Solutions Homepage
Forum Home Forum Home > ProductCart > Customizing ProductCart
  New Posts New Posts RSS Feed - forcing a <br> on the name - SOLVED!
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

forcing a <br> on the name - SOLVED!

 Post Reply Post Reply
Author
Message
worldofrugs View Drop Down
Senior Member
Senior Member
Avatar

Joined: 24-April-2008
Location: United States
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote worldofrugs Quote  Post ReplyReply Direct Link To This Post Topic: forcing a <br> on the name - SOLVED!
    Posted: 22-April-2009 at 1:20pm
The names of our products are all build up the same. Without doing anything to the name, products now show up on the category/searchresults/home/showfeatured/etc.. as followed in the example products I created:
-------------------------


----------------------------------

As you can see it's not to nice to have the size cut in half...
I rather would like to see it as this:
----------------------------------

----------------------------

I can of cos. accomplish this with adding a <br> in the product name (before import), however this also will show up on the product detail pages, so not a great solution.
I was thinking....
Since you can do a "replace" function with ASP, I'm searching for where and how to add this...
Example I like to implement somewhere:
productname_value = replace(productname_value, "rug, ", "rug<br>"

This way on the pages where the thumbnails are shown, the name breaks nicely and on the detail pages it remains in 1 line on the top.
Any suggestions?

Thanks!

P.s.:
Using PC 3.12a  (Did not have time yet to upgrade)


Edited by worldofrugs - 22-April-2009 at 2:49pm
Back to Top
worldofrugs View Drop Down
Senior Member
Senior Member
Avatar

Joined: 24-April-2008
Location: United States
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote worldofrugs Quote  Post ReplyReply Direct Link To This Post Posted: 22-April-2009 at 2:48pm
Found the solution Clap

In pcShowProductH.asp around line 16 you will find:
<p class="pcShowProductName">
<a href="viewPrd.asp?idcategory=<%=pIdCategory%>&idproduct=
<%=pIdProduct%>" <%if scStoreUseToolTip="1" then%>
onmouseover="javascript:document.getPrd.idproduct.value='<%=pIdProduct%>';
sav_callxml='1'; return runXML1('prd_<%=pIdProduct%>');" onmouseout="javascript:
sav_callxml=''; hidetip();"<%end if%>><%=pDescription%></a>


I changed it to the following:
<p class="pcShowProductName">
<%pDescription2 = replace(pDescription, "rug, ", "rug<br>")%>
<a href="viewPrd.asp?idcategory=<%=pIdCategory%>&idproduct=
<%=pIdProduct%>" <%if scStoreUseToolTip="1" then%>
onmouseover="javascript:document.getPrd.idproduct.value='<%=pIdProduct%>';
sav_callxml='1'; return runXML1('prd_<%=pIdProduct%>');" onmouseout="javascript:
sav_callxml=''; hidetip();"<%end if%>><%=pDescription2%></a>


As you can see I renamed it to pDescription2 and put the statement on it. This way I prevent that the statement is applied in for example the little lists at the bottom: best sellers, etc.., that have to show up in 1 line (where pDescription is used as well!).

Note:
As for the other displays it just has to show 'normal / as-is', no modifications are made to the files:
pcShowProductL.asp
pcShowProductM.asp
pcShowProductP.asp


Edited by worldofrugs - 22-April-2009 at 3:13pm
Back to Top
BlackReefDesigns View Drop Down
Newbie
Newbie


Joined: 28-May-2008
Location: San Diego, CA
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote BlackReefDesigns Quote  Post ReplyReply Direct Link To This Post Posted: 22-April-2009 at 3:08pm
awesome!  Glad you got it worked out
Joe S.
BlackReef.net
Back to Top
worldofrugs View Drop Down
Senior Member
Senior Member
Avatar

Joined: 24-April-2008
Location: United States
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote worldofrugs Quote  Post ReplyReply Direct Link To This Post Posted: 22-April-2009 at 3:14pm
Thanks BlackReef!
Maybe someone else might want to do something similar and this could help them out Wink
Back to Top
patschraier View Drop Down
Newbie
Newbie


Joined: 29-May-2007
Location: United States
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote patschraier Quote  Post ReplyReply Direct Link To This Post Posted: 22-April-2009 at 3:34pm
I tried to solve that problem, too, with CSS but it moved everything left. Thanks.
Pat Schraier
www.patriciaschraier.com
Back to Top
worldofrugs View Drop Down
Senior Member
Senior Member
Avatar

Joined: 24-April-2008
Location: United States
Status: Offline
Points: 0
Post Options Post Options   Thanks (0) Thanks(0)   Quote worldofrugs Quote  Post ReplyReply Direct Link To This Post Posted: 22-April-2009 at 4:15pm
Hope it works as great for you as it did for me.. Good luck and let me know...
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.094 seconds.