X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Variant image in minicart (https://forum.x-cart.com/showthread.php?t=67821)

websupport 09-24-2013 11:39 AM

Variant image in minicart
 
Okay I need the variant image to show in the minicart instead of the default image. Here is the code I have right now:


<li{interline index=$smarty.foreach.products.index total=$list_length}>
<div class="minicart-item">
<table>
<tr>
<td>
<a href="{$xcart_web_dir}/product.php?productid={$product.productid}"><img src="{$xcart_web_dir}/{$product.image_path}" style="width: 70px;"></a>
</td>
<td style="padding-left: 5px;">
<table>
<tr>
<td style="width: 200px; border-bottom: 1px solid #c4c4c4;">
<a href="{$xcart_web_dir}/product.php?productid={$product.productid}" class="minicart-lnk" style="text-decoration: none; text-transform: uppercase; line-height: 10px; color: #9e9e9e; font-size: 11px; font-family: minion pro;">{$product.product}</a>
<br />

{if $active_modules.Product_Configurator and $product.product_type eq "C"}
{assign var="price" value=$product.pconf_display_price}
{else}
{assign var="price" value=$product.display_price}
{/if}

<div class="price-row" style="margin-top: 0px; padding-bottom: 5px;">
{*
{if $active_modules.Egoods and $product.distribution}

<span class="quantity" style="color: #9e9e9e;">
1
<input type="hidden" name="productindexes[{$product.cartid}]" value="1" />
</span>

{else}

<input type="text" name="productindexes[{$product.cartid}]" value="{$product.amount}" class="quantity" />
{/if}
x
<span class="price" style="color: #9e9e9e;">{currency value=$price}</span>
= *}
<span class="total" style="color: #9e9e9e;">{multi x=$price y=$product.amount assign=unformatted}{currency value=$unformatted}</span>



</div>
</td>
<td style="vertical-align: top; padding-left: 5px;">
<a href="{$xcart_web_dir}/cart.php?mode=delete&amp;productindex={$product.ca rtid}" class="delete" title="{$lng.lbl_delete_item|escape}"><img src="{$ImagesDir}/spacer.gif" alt="" /></a>
</td>
</tr>
<tr>
<td style="padding-top: 5px;">
<ul>
{foreach from=$product.product_options item=option}
<li style="border-top: none; padding: 0px; text-transform: uppercase; color: #9e9e9e;">{$option.class}: {$option.option_name}</li>
{/foreach}
<li style="border-top: none; padding: 0px; text-transform: uppercase; color: #9e9e9e;">Quantity: {$product.amount}</li>
</ul>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</li>


All times are GMT -8. The time now is 01:03 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.