Anock, like I said before this is a great mod.
I noticed that I have a lot of items in my accessories and the page scrolls down, so I wanted to put this in a 3 column format, so I changed the subaccessdiag.tpl file to show in 3 columns, below is my code.
The completed page you can see at
http://www.shisha.co.uk/shopcart/product.php?productid=16137&cat=265&page=1
Code:
{capture name=dialogacc}
{section name=product loop=$products}
{assign var="discount" value=0}
{ if %product.first% }
<table>
{/if}
{if $smarty.section.product.index is div by 3}
</tr><tr valign="top">
{/if}
<TD width="90" align="center" valign="top"> {if $active_modules.Special_Offers ne "" and $products[product].have_offers} {include file="modules/Special_Offers/customer/product_offer_thumb.tpl" product=$products[product]}
{$lng.lbl_see_details} {else} {* THUMBNAIL *} <A href="product.php?productid={$products[product].productid}&cat={$cat}&page={$navigation_page}{if $featured eq 'Y'}&featured{/if}">{include file="product_thumbnail.tpl" productid=$products[product].productid image_x=$config.Appearance.thumbnail_width product=$products[product].product tmbn_url=$products[product].tmbn_url}
{$lng.lbl_see_details}</A> {* NEW *} {* // 60 * 60 * 24 * 20 days in unix time = 1728000 *} {if ($products[product].add_date gt $smarty.now - 1728000) and ($products[product].add_date lt $smarty.now)} [img]{$ImagesDir}/mynew.gif[/img] {/if} {/if} {if $active_modules.Feature_Comparison ne '' && $products[product].fclassid > 0 && $printable ne 'Y'}
{include file="modules/Feature_Comparison/compare_checkbox.tpl" id=$products[product].productid} {/if} </TD>
<TD valign="top"> {* PRODUCT *}
<FONT class="ProductTitle">{$products[product].product}</FONT>
{* PRODUCT CODE SKU NUMBER*} {$lng.lbl_sku}: {$products[product].productcode} <FONT size="1">
{* DESCRIPTION *} {$products[product].descr|truncate:300:"...":true}
</FONT>
<HR size="1" noshade width="100%" align="left">
{if $products[product].product_type eq "C"} {include file="buttons/details.tpl" href="product.php?productid=`$products[product].productid`&cat=`$cat`&page=`$navigation_page`"} {else} {if $active_modules.Subscriptions ne "" and $products[product].catalogprice} {include file="modules/Subscriptions/subscription_info_inlist.tpl"} {else} {if $products[product].taxed_price ne 0} {if $products[product].list_price gt 0 and $products[product].taxed_price lt $products[product].list_price} {math equation="100-(price/lprice)*100" price=$products[product].taxed_price lprice=$products[product].list_price format="%3.0f" assign=discount} {if $discount gt 0} {* PRICE *} <FONT class="MarketPrice">{$lng.lbl_market_price}: <S> {include file="currency.tpl" value=$products[product].list_price} </S></FONT>
{/if} {/if} <FONT class="ProductPrice">{$lng.lbl_our_price}: {include file="currency.tpl" value=$products[product].taxed_price}</FONT><FONT class="ConvertedProductPrice">{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$products[product].taxed_price}</FONT>{if $discount gt 0}, {$lng.lbl_save_price} {$discount}%{/if} {if $products[product].taxes}
<TABLE border="0">
<TR>
<TD>[img]{$ImagesDir}/spacer.gif[/img]</TD>
<TD>{include file="customer/main/taxed_price.tpl" taxes=$products[product].taxes}
</TR>
</TABLE>
{/if} {if $active_modules.Special_Offers ne "" and $products[product].use_special_price ne ""} {include file="modules/Special_Offers/customer/product_special_price.tpl" product=$products[product]} {/if} {else} <FONT class="ProductPrice">{$lng.lbl_enter_your_price}</FONT> {/if} {/if} {if $usertype eq "C" and $config.Appearance.buynow_button_enabled eq "Y"} {include file="customer/main/buy_now.tpl" product=$products[product]} {/if} {/if} </TD>
{ if %product.last% }
</tr></table>
{/if}
{/section}
{/capture}
{include file="dialog.tpl" title="Accessories for $accprod" content=$smarty.capture.dialogacc extra="width=100%"}
All I did was to change the top part for the table and the bottom part:
Top Part:
Code:
{ if %product.first% }
<table>
{/if}
{if $smarty.section.product.index is div by 3}
</tr><tr valign="top">
{/if}
<TD width="90" align="center" valign="top">
Bottom Part:
Code:
</TD>
{ if %product.last% }
</tr></table>
{/if}
{/section}
{/capture}
{include file="dialog.tpl" title="Accessories for $accprod" content=$smarty.capture.dialogacc extra="width=100%"}
I use this change on a few of my templates to make it a 3 column view.
You can also change this to a 2 column view by changing the {if $smarty.section.product.index is div by 3} to {if $smarty.section.product.index is div by 2}