marty.net 1001 Postcards Love Love Love Meep Meep ZenZodiac DailyQuotation

YOU ARE HERE:
Wrapping Products in Sortorder with DIVs

HOME

CPSHOP|

|

|

EMAIL MARTY
  marty.net message board
  « Wrapping Products in Sortorder with DIVs »
Welcome, Guest. Please Login or Register.
12/11/17 at 15:12:32
Home Help Search Login Register
   marty.net message board
   About cpshop
   Customization Help
   Wrapping Products in Sortorder with DIVs
(Moderator: Marty)
Pages: 1 Reply Notify of replies Send the topic Print 
   Author  Topic: Wrapping Products in Sortorder with DIVs  (Read 291 times)
flippinsweetgear
Gold Dragon
****

Posts: 171



Go Scots!
   

WWW
Wrapping Products in Sortorder with DIVs
« on: 03/12/10 at 11:40:42 »
Reply with quote Modify message

I'm trying to implement some sort of hide/show div function to the product thumb pages.  I am basically trying to wrap groupings of product thumbs with div tags.

I've realized that every line in the sortorder.txt gets wrapped with <td> tags which won't let any simple or fancy show/hide div code I've found work.

I've had no luck with getting the following to work.



Code:
<script type="text/javascript">
<!--
  function toggle_visibility(id) {
     var e = document.getElementById(id);
     if(e.style.display == 'block')
        e.style.display = 'none';
     else
        e.style.display = 'block';
  }
//-->
</script>



<a href="#" onclick="toggle_visibility('foo');">Click here to toggle visibility of element #foo</a>
<div id="foo">This is foo</div>


with something like this in the sortorder file


Code:
#mensapparel
112
152
251
260
<a href="#" onclick="toggle_visibility('foo');">Click here to see this design on more shirts</a><div id="foo">
159
155
7
106
45
108
126
115
111
250
2
107
4
38
23
244
249
245
246
5
101
15
65
140
296
</div>


Is there some type of workaround that I'm missing to keep all of it in the same table?  I've tried grouping all of the products on one line like

Code:

Code:
1,2,3<href><div>4,5,6</div>


and it still won't work.  

I am trying to reduce the number of products on those pages to see if it will increase conversions.  I think with all of the products that CP now offers it is a bit overwhelming to a potential customer.  

UPDATE:  This thread was deleted when Marty's server crashed.  

Here is what the output html ends up looking like which the table tags ends up messing up the div and not allowing it to wrap the entire group of products I am trying to show/hide.


Code:
<tr><td colspan="4"><a href="#" onclick="toggle_visibility('foo');">Click here to see this design on more shirts</a><div id="foo"></td></tr>


same happens to close it

Code:
<tr><td colspan="4"></div></td></tr>


Any ideas?
Logged

Flippin Sweet Gear | Kids T-shirts | Big Lebowski Shirts
Pages: 1 Reply Notify of replies Send the topic Print 
Jump to:


marty.net message board (http://www.marty.net/cgi/marty/board/messageboard)

Powered by YaBB 1 Gold - Release (Yet Another Bulletin Board)
Copyright 2000-2001, X-Null. All Rights Reserved.