View Full Version : instructions on displaying multiple columns on category Pages
TripleB
07-15-06, 07:13 AM
Please provide some more detailed instructions on displaying multiple columns on category Pages. I can get the code changes from the 4/14/06 posting to work if I don?t show the thumbnails (which are 1.5?x1.5?). But if I set it to show the thumbnails it reverts to one column again, and the are squeezed a little closer together. I have verified that the code changes are still in effect and accurate.
What am I doing wrong?
Bruce - PhosphorMedia
07-15-06, 08:54 AM
No idea of what the 4/14/6 posting was...what are you using for the "Category Product List Layout" code, it should be something similar to:
<mvt:if expr="l.settings:product_count EQ 0">
<mvt:exit />
</mvt:if>
<table border=0 cellpadding=2 cellspacing=0 width=500>
<tr><td colspan="3" align="center">
<br>
</td></tr>
<tr>
<mvt:foreach iterator="product" array="products">
<td align="center" valign="bottom">
<mvt:if expr="NOT ISNULL l.settings:product:thumbnail">
<a href="&mvt:global:sessionurl;Screen=PROD&Store_Code=&mvta:store:code;&Product_Code=&mvta:product:code;&Category_Code=&mvta:category:code;"><img src="&mvte:product:thumbnail;" border=0></a>
<mvt:else>
</mvt:if>
<br>
<mvt:item name="fonts" param="body_font">
<a href="&mvt:global:sessionurl;Screen=PROD&Store_Code=&mvta:store:code;&Product_Code=&mvta:product:code;&Category_Code=&mvta:category:code;"><u>&mvt:product:name;</u></a><br>
&mvt:product:formatted_price;
</mvt:item>
</td>
<mvt:if expr = "(pos1 MOD 3 ) EQ 0">
</tr><tr><td colspan=3><HR width="100%" color=#cccccc SIZE=1></td></tr>
<tr>
</mvt:if>
</mvt:foreach>
</tr>
</table>
<mvt:if expr="g.Offset OR g.NextOffset">
<br>
<table border=0 width="90%" align="center">
<tr>
<mvt:if expr="g.Offset EQ 0">
<td> </td>
<mvt:else>
<td align="left">
<mvt:item name="fonts" param="body_font">
<form method="post" action="&mvt:global:sessionurl;">
<input type="hidden" name="Screen" value="&mvte:global:Screen;">
<input type="hidden" name="Store_Code" value="&mvte:global:Store_Code;">
<input type="hidden" name="Category_Code" value="&mvte:global:Category_Code;">
<input type="hidden" name="Product_Code" value="&mvte:global:Product_Code;">
<input type="hidden" name="Search" value="&mvte:global:Search;">
<input type="hidden" name="Offset" value="&mvte:global:PrevOffset;">
<mvt:item name="buttons" param="Previous" />
</form>
</mvt:item>
</td>
</mvt:if>
<mvt:if expr="g.NextOffset EQ 0">
<td> </td>
<mvt:else>
<td align="right">
<mvt:item name="fonts" param="body_font">
<form method="post" action="&mvt:global:sessionurl;">
<input type="hidden" name="Screen" value="&mvte:global:Screen;">
<input type="hidden" name="Store_Code" value="&mvte:global:Store_Code;">
<input type="hidden" name="Category_Code" value="&mvte:global:Category_Code;">
<input type="hidden" name="Product_Code" value="&mvte:global:Product_Code;">
<input type="hidden" name="Search" value="&mvte:global:Search;">
<input type="hidden" name="Offset" value="&mvte:global:NextOffset;">
<mvt:item name="buttons" param="Next" />
</form>
</mvt:item>
</td>
</mvt:if>
</tr>
</table>
</mvt:if>
aarcmedia
07-22-06, 04:55 PM
Hey bruce. I just noticed an error in this code (or what appears to be an error). I've incorporated this on one of our clients websites and it appears it is causing it to display all of the products in the category correctly, but it adds some at the bottom. Meaning it's repeating some products. So in short, in the instance I'm looking at now, it's showing all of the products in a given category and then it's repeating the first one at the bottom. On another site I used this code on it did the same thing, but repeated more than one at times.
Bruce - PhosphorMedia
07-22-06, 06:35 PM
Hmmm, don't see how...look at the Category Template and make sure you just have one line reading...
<mvt:item name="product_list" />
aarcmedia
07-22-06, 07:34 PM
Yep, just one. I've tried implementing this code on 2 different sites and in both instances it repeated products in different ways. Not sure why. I guess I could be doing something wrong, but there are definately only one instance of the product list in the template. Besides, it's not listing all of the products 2 times, just 1 or 2. It's wierd.
aarcmedia
07-22-06, 07:37 PM
Bruce, I apologize for wasting your time. I see now that the client had gone in and created additional products and he just repeated one that was all ready entered. I overlooked it because I wasn't aware that he had done it and it seemed "too obvious".
Bruce - PhosphorMedia
07-22-06, 07:46 PM
Yea, that was my next guess...the two sites had me thrown there for a while.<G>
Vic - WolfPaw Computers
07-22-06, 11:37 PM
Ockham's Razor (William of Ockham c. 1285–1347 (http://en.wikipedia.org/wiki/William_of_Ockham))
entia non sunt multiplicanda praeter necessitatem,
which translates to:
entities should not be multiplied beyond necessity.
Or, in more general terms...
one should not increase, beyond what is necessary, the number of entities required to explain anything
:D
Hence, too obvious is often exactly the answer. We tend to try to make it more difficult though :)
Bruce, I apologize for wasting your time. I see now that the client had gone in and created additional products and he just repeated one that was all ready entered. I overlooked it because I wasn't aware that he had done it and it seemed "too obvious".
vBulletin® v3.7.4, Copyright ©2000-2008, Jelsoft Enterprises Ltd.