X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Third Party Add-Ons for X-Cart 4 (https://forum.x-cart.com/forumdisplay.php?f=45)
-   -   Firetank - Customers who bought this also bought... (https://forum.x-cart.com/showthread.php?t=39889)

Lingerieblowout 05-19-2008 09:18 AM

Firetank - Customers who bought this also bought...
 
Anyone have the code that will allow the Customers who bought this also bought... module from Firetank to display a loop 3 products across instead of a looping 1 product.

carpeperdiem 05-19-2008 09:31 AM

Re: Firetank - Customers who bought this also bought...
 
Try this -- I have it set for 4 products in the

$limit = 4;

setting in the mod

I am using a css class "listing1" and "listing2" to highlight/shade the table cell on hover.

This will make a horizontal table and fill it with products. image_y=100 -- fixes the image height at 100px.

Hope this helps

Jeremy


Code:

{if $also_bought_products|@count gt 0}
        {capture name=also_bought}
                <table align="center">
               
                        <tr>{section name=i loop=$also_bought_products}
                                <td align="center" class="listing1" onmouseover="this.className='listing2'" onmouseout="this.className='listing1'"><a href="product.php?productid={$also_bought_products[i].productid}" target="{$targetwin}">{include file="product_thumbnail.tpl" productid=$also_bought_products[i].productid image_y=100 product=$also_bought_products[i].product tmbn_url=$also_bought_products[i].tmbn_url}</a><br />
<div align="center">
<a href="product.php?productid={$also_bought_products[i].productid}" target="{$targetwin}">{$also_bought_products[i].product}</a></div></td>
<td><img src="{$ImagesDir}/spacer.gif" alt="" height="1" width="7" border="0" /></td>
                        {/section}</tr>
               
                </table><br />
        {/capture}
        {include file="dialog.tpl" title="Customers who bought this also bought..." content=$smarty.capture.also_bought extra="width=100%"}
{/if}


Lingerieblowout 05-19-2008 10:40 AM

Re: Firetank - Customers who bought this also bought...
 
Works like a charm if you dont want it to loop for more prducts.

Here what it looks like

https://www.lingerieblowout.com/bracli-double-pearl-thong-g-string-lingerie-pr-17451.html

carpeperdiem 05-19-2008 11:25 AM

Re: Firetank - Customers who bought this also bought...
 
It's always a pleasure to click on a link and see a pearl g-string as the sample item. :-)

there's a slight pixel shift on the hover... could it be the listing and listing2 css class?

.listing { border: 1px solid; padding: 7px; [snip]
.listing2 { padding: 7px; border: 1px solid #B18BA2; [snip]

although both have padding defined, could the fact that listing2 has a color defined for the border make a difference? It looks weird with the padding shift...

I noticed this in Firefox and Safari.

Lingerieblowout 05-19-2008 06:22 PM

Re: Firetank - Customers who bought this also bought...
 
LOL .. I removed the hover until i can figure it out. Your right it was driving my eyes crazy too looking at the padding shifting ....


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

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