X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   3 column layout with thumbnail for Related Products (https://forum.x-cart.com/showthread.php?t=10773)

balinor 09-16-2006 02:36 PM

Re: 3 column layout with thumbnail for Related Products
 
Upselling is actually what you want...Recommended is random

peggyr 09-16-2006 02:42 PM

Re: 3 column layout with thumbnail for Related Products
 
Ok.. then how do I get the 'upselling' related products to appear in the Shopping cart, when customer orders 'Product A', and I want them to consider buying Product B or C? I have the upselling links option module enabled and, I see the related items in the 'product description', but they are at the bottom (after email to a friend, and larger image.... so, may never get seen.). Is there a way to have these also appear in the shopping cart during checkout? Thanks

balinor 09-16-2006 02:48 PM

Re: 3 column layout with thumbnail for Related Products
 
Ah sorry, doesn't work in the cart by default, no :(

carpeperdiem 09-16-2006 04:46 PM

Re: 3 column layout with thumbnail for Related Products
 
Quote:

Originally Posted by peggyr
Ok.. then how do I get the 'upselling' related products to appear in the Shopping cart, when customer orders 'Product A', and I want them to consider buying Product B or C? I have the upselling links option module enabled and, I see the related items in the 'product description', but they are at the bottom (after email to a friend, and larger image.... so, may never get seen.). Is there a way to have these also appear in the shopping cart during checkout? Thanks


You want/need/must buy WebsiteCM's ez-Upsell.

There are very few mods that I consider a must-have, and this is one of them...

If you are using 4.1, it even parses your variant thumbnail images...

If upselling your customer is important to you, this will be the best $40 you ever spend.

PS -- of course, you can customize the look of ez-Upsell as displayed... if you want to see mine in action, PM me... i'll give you a URL.

Best,

Jeremy

brucew 09-17-2006 12:34 PM

Re: 3 column layout with thumbnail for Related Products
 
Anyone know how to add an "add to cart" and show price with this mod? It's pretty cool so far.

Audiolines 10-19-2006 02:15 PM

Re: 3 column layout with thumbnail for Related Products
 
ok, so i used balinor's code from the beginning of this post, and it works great in firefox, but in IE, my thumbnail images arent coming up for the related products. it seems to be creating the following:
img src=image.php.....

while my product thumbnail code is
img src=http://www.audiolines.com/image.php

why is my url not coming up for the related products?

balinor 11-14-2006 09:57 AM

Re: 3 column layout with thumbnail for Related Products
 
For anyone who wants this to work for 4.0.18, here's the code to use:

Code:

{if $product_links ne ""}
{capture name=dialog}
{assign var="tmp" value="0"}

{section name=cat_num loop=$product_links}
{if $product_links[cat_num].productid}{assign var="tmp" value="1"}{/if}
{/section}
{section name=cat_num loop=$product_links}
{ if %cat_num.first% }
<table border="0" cellspacing="5" width="100%">
{/if}

  {if $smarty.section.cat_num.index is div by 3}
    </tr><tr valign="top">
  {/if}

<TD width="33%" align="center">
<A href="product.php?productid={ $product_links[cat_num].productid }"{if $config.Modules.upselling_new_window eq 'Y'} target="_blank"{/if}>
{include file="product_thumbnail.tpl" productid=$product_links[cat_num].productid image_x=$config.Appearance.thumbnail_width product=$product_links[cat_num].product tmbn_url=$product_links[cat_num].tmbn_url}<br>
{ $product_links[cat_num].product}
</A>
</TD>
{ if %cat_num.last% }
</tr></table><br>
{/if}
{/section}
{/capture}
{include file="dialog.tpl" title="You may also like..." content=$smarty.capture.dialog extra="width=100%"}
{/if}


It is set for 3 columns, but you can change that by changing the number 3 to whatever you want, and also change the percentage for the width of the table cell (currently set to 33%).

pnm 11-25-2006 03:18 AM

Re: 3 column layout with thumbnail for Related Products
 
Balinor,

Great mod, makes the site look so much more professional.

Is there away to have "Our price" and "Add to cart" with each related product, this would complete this mod.

pnm 11-29-2006 01:09 AM

Re: 3 column layout with thumbnail for Related Products
 
Balinor,

Is the Add to Cart button too hard to incorporate in this mod?

Sisom 02-18-2007 04:01 PM

Re: 3 column layout with thumbnail for Related Products
 
To add the price (including VAT) I used this to replace /modules/Upselling_Products/related_products.tpl:

{if $product_links ne ""}
{capture name=dialog}
{assign var="tmp" value="0"}

{section name=cat_num loop=$product_links}
{if $product_links[cat_num].productid}{assign var="tmp" value="1"}{/if}
{/section}
{section name=cat_num loop=$product_links}
{ if %cat_num.first% }
<table border="0" cellspacing="0" width="100%">
{/if}

{if $smarty.section.cat_num.index is div by 3}
</tr><tr>
<tr>
<td><img src="{$ImagesDir}/spacer.gif" width="400" height="10"></td>
</tr>
<tr valign="top">
{/if}

<td width="33%" align="center">
<a style="text-decoration: none;" href="product.php?productid={ $product_links[cat_num].productid }"{if $config.Modules.upselling_new_window eq 'Y'} target="_blank"{/if}>
{include file="product_thumbnail.tpl" productid=$product_links[cat_num].productid image_x=$config.Appearance.thumbnail_width product=$product_links[cat_num].product tmbn_url=$product_links[cat_num].tmbn_url}</a>
<br>

<a href="product.php?productid={ $product_links[cat_num].productid }"{if $config.Modules.upselling_new_window eq 'Y'} target="_blank"{/if}>
<b>{ $product_links[cat_num].product}</b>
</a>
<br>

<font class="ProductPrice">{include file="currency.tpl" value=$product_links[cat_num].taxed_price}</font>
{if $product.taxes}<font class="ProductPriceVat">
{include file="customer/main/taxed_price.tpl"
taxes=$product.taxes}</font>
{/if}


</td>
{ if %cat_num.last% }
</tr></table>
{/if}
{/section}
{/capture}
{include file="dialog.tpl" title="Recommended products" content=$smarty.capture.dialog extra="width=100%"}
{/if}



I had to add:
<a style="text-decoration: none;"
to the <A HREF> tag for the image, because the original code enclosed both the image and the product name in the same tag, and with my CSS A:hover is set to 'text-decoration: underline;', so the image showed an underline whenever you moused over it, which looked odd.

My CSS for the selectors I used above is:

.ProductPrice {
COLOR: #bc0000;
FONT-WEIGHT: bold;
FONT-SIZE: 16px;
FONT-FAMILY: Arial, Verdana, Helvetica, Sans-serif;
}
.ProductPriceVat {
COLOR: #bc0000;
FONT-WEIGHT: bold;
FONT-SIZE: 11px;
FONT-FAMILY: Arial, Verdana, Helvetica, Sans-serif;
}


All times are GMT -8. The time now is 12:16 AM.

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