Print Page | Close Window

forcing a <br> on the name - SOLVED!

Printed From: ProductCart E-Commerce Solutions
Category: ProductCart
Forum Name: Customizing ProductCart
Forum Description: Exchange messages with other users that are customizing ProductCart.
URL: https://forum.productcart.com/forum_posts.asp?TID=2671
Printed Date: 28-May-2024 at 3:31am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: forcing a <br> on the name - SOLVED!
Posted By: worldofrugs
Subject: forcing a <br> on the name - SOLVED!
Date 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)



Replies:
Posted By: worldofrugs
Date 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


Posted By: BlackReefDesigns
Date Posted: 22-April-2009 at 3:08pm
awesome!  Glad you got it worked out

-------------
Joe S.
BlackReef.net


Posted By: worldofrugs
Date 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


Posted By: patschraier
Date 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


Posted By: worldofrugs
Date 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...



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net