PDA

View Full Version : Category Product List Layout: Changing Table Width?


loonatiksusa
07-29-08, 05:23 PM
In the category product list layout, i'm wondering where to change the table width so that the description will conform to that width and not jump out across the page. Below is the code: thanks

<table border=0 cellpadding=2 cellspacing=0>
<mvt:foreach iterator="product" array="products">
<mvt:if expr="pos1 EQ 1">
<tr><td nowrap>
<br>
<br>
<br>
</td></tr>
<tr><td align="left" valign="top" nowrap>
<mvt:elseif expr="pos1 MOD 1">
<td align="left" valign="top" nowrap>
<mvt:else>
<td align="left" valign="top" nowrap>
</mvt:if>
<table border=0 cellpadding=2 cellspacing=0>
<tr><td align="left" valign="top">
<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>
&nbsp;
</mvt:if>
</td><td align="left" valign="top" colspan=2>
<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;">&mvt:product:name;</a><br>
Code: <b>&mvt:product:code;</b><br>
Price: <b>&mvt:product:formatted_price;</b><br>
<mvt:if expr="l.settings:product:inv_active">
&mvt:product:inv_long;<br>
</mvt:if>
Quantity in Basket:
<mvt:if expr="l.settings:product:quantity EQ 0">
<i>none</i>
<mvt:else>
<b>&mvt:product:quantity;</b>
</mvt:if>
<br>
</mvt:item>
</td></tr>
<tr><td colspan=3>
<mvt:item name="fonts" param="body_font">
&mvt:product:descrip;
</mvt:item>
</td></tr>
<mvt:if expr="l.settings:product:inv_level NE 'out'">
<tr>
<td>&nbsp;</td>
<form method="post" action="&mvt:global:sessionurl;">
<td align="left" valign="top">
<mvt:item name="fonts" param="body_font">
<input type="hidden" name="Action" value="ADPR">
<input type="hidden" name="Screen" value="&mvte:global:Screen;">
<input type="hidden" name="Quantity" value=1>
<input type="hidden" name="Attributes" value="Yes">
<input type="hidden" name="Store_Code" value="&mvte:store:code;">
<input type="hidden" name="Offset" value="&mvte:global:Offset;">
<input type="hidden" name="Product_Code" value="&mvte:product:code;">
<input type="hidden" name="Current_Product_Code" value="&mvte:global:Product_Code;">
<input type="hidden" name="Category_Code" value="&mvte:global:Category_Code;">
<mvt:item name="buttons" param="Add1ToBasket" />
</mvt:item>
</td>
</form>
<td>&nbsp;</td>
</tr>
</mvt:if>
</table>
<mvt:if expr="pos1 MOD 1">
</td>
<mvt:else>
</td></tr>
<tr><td nowrap>
<br>
<br>
<br>
</td></tr>
</mvt:if>
</mvt:foreach>
</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>&nbsp;</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>&nbsp;</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>

Barrett
07-30-08, 05:20 AM
<tr><td colspan=3>
<mvt:item name="fonts" param="body_font">
&mvt:product:descrip;
</mvt:item>
</td></tr>
You'll need to figure out if this is correct in all your nested tables.

Easy way to do this is pasted the rendered page code into a visual editor to help you take it apart and figure out where the change needs to be made on the miva side.
You might even find you'd like to rebuild the whole thing possible without tables too.

Pete McNamara
07-30-08, 05:53 AM
You could try changing this:
<tr><td colspan=3>
<mvt:item name="fonts" param="body_font">
&mvt:product:descrip;
</mvt:item>
</td></tr>
to this:
<tr><td colspan=2>
<mvt:item name="fonts" param="body_font">
&mvt:product:descrip;
</mvt:item>
</td><td> </td></tr>