Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

How to change Recommendslist?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #1  
Old 07-25-2003, 07:39 PM
 
MOC MOC is offline
 

Senior Member
  
Join Date: Oct 2002
Posts: 171
 

Default How to change Recommendslist?

Hi,

i wanna change the recommends to something like products.tpl. Just without buy buttons.

I want that the recommends will display a thumbnail, the name of the product and the price.

What i have to change? Can somebody help me?

Thanks
Saskia
Reply With Quote
  #2  
Old 08-04-2003, 01:07 PM
 
slimmedia slimmedia is offline
 

Member
  
Join Date: May 2003
Posts: 23
 

Default

We do something like this. The recommends list is on the right and has thumbnails.

Check it out:
http://www.demolaystore.com/customer/product.php?productid=36&cat=21&page=1

Here's how it works (may vary depending upon your version of x-cart):

Code:
<CENTER> {section name=num loop=$recommends} <A HREF="product.php?productid={$recommends[num].productid}&cat={$cat}">{include file="product_thumbnail.tpl" productid=$recommends[num].productid image_x=$config.Appearance.thumbnail_width product=$recommends[num].product tmbn_url=$products[product].tmbn_url} <font class="ProductTitle">{$recommends[num].product}</FONT> {/section} </CENTER>

You can make the change in 'skin1/modules/recommends.tpl' but I created a new template in the same directory called 'menu_recommends.tpl'.

Then I added the following code to the right hand VertMenuBox area.
Code:
{if $main eq "product"} {include file="modules/Recommended_Products/menu_recommends.tpl" } {/if}

And I commented out the call to recommends.tpl in 'skin1/customer/main/product.tpl'.
Reply With Quote
  #3  
Old 08-04-2003, 10:01 PM
 
jeeya jeeya is offline
 

X-Adept
  
Join Date: May 2003
Location: USA
Posts: 807
 

Default .

It's just I wanted but I want it horizontally, I don't want it vertical becasue I am not going to put that in side menu.

What would be the code for, modules/Recommended_Products/recommends.tpl

so it can show horizontally instead of vertical

Thanks
Reply With Quote
  #4  
Old 08-04-2003, 10:50 PM
 
jeeya jeeya is offline
 

X-Adept
  
Join Date: May 2003
Location: USA
Posts: 807
 

Default .

forgot, I mean I want them all in one row and also want to include dialog box.

Thanks
Reply With Quote
  #5  
Old 08-05-2003, 07:28 AM
 
slimmedia slimmedia is offline
 

Member
  
Join Date: May 2003
Posts: 23
 

Default

Again, it may need a little bit of tweaking depending upon your version of x-cart, but something like this should work:

In 'modules/Recommended_Products/recommends.tpl' replace the lines from {section} to {/section} with:
Code:
<TABLE BORDER="0" WIDTH="100%"><TR> {section name=num loop=$recommends} <TD VALIGN="TOP" WIDTH=33%> <A HREF="product.php?productid={$recommends[num].productid}&cat={$cat}">{include file="product_thumbnail.tpl" productid=$recommends[num].productid image_x=$config.Appearance.thumbnail_width product=$recommends[num].product tmbn_url=$products[product].tmbn_url} <font class="ProductTitle">{$recommends[num].product}</FONT></TD> {/section} </TR></TABLE>

For version 3.4.3, the whole file would look like this:

Code:
{if $recommends} {capture name=recommends} <TABLE BORDER="0" WIDTH="100%"><TR> {section name=num loop=$recommends} <TD VALIGN="TOP" WIDTH=33%> <A HREF="product.php?productid={$recommends[num].productid}&cat={$cat}">{include file="product_thumbnail.tpl" productid=$recommends[num].productid image_x=$config.Appearance.thumbnail_width product=$recommends[num].product tmbn_url=$products[product].tmbn_url} <font class="ProductTitle">{$recommends[num].product}</FONT></TD> {/section} </TR></TABLE> {/capture} {include file="dialog.tpl" title=$lng.lbl_recommends content=$smarty.capture.recommends extra="width=100%"} {/if}
Reply With Quote
  #6  
Old 08-05-2003, 02:14 PM
 
jeeya jeeya is offline
 

X-Adept
  
Join Date: May 2003
Location: USA
Posts: 807
 

Default .

Thanks it worked great.
Reply With Quote
  #7  
Old 08-05-2003, 02:17 PM
  adpboss's Avatar 
adpboss adpboss is offline
 

X-Man
  
Join Date: Feb 2003
Location: Ontario, Canada
Posts: 2,389
 

Default

Slick code and nice result!

I may just add something like this to my new store. Seems like menu space is always at a premium though.
Reply With Quote
  #8  
Old 08-05-2003, 02:19 PM
 
jeeya jeeya is offline
 

X-Adept
  
Join Date: May 2003
Location: USA
Posts: 807
 

Default .

I have image size set up 85 for other product dislpay, is there a way to make image smaller just for recommended products,

here is my code-

{* $Id: recommends.tpl,v 1.3 2003/03/05 08:19:11 svowl Exp $ *}
{if $recommends}
{capture name=recommends}
{section name=num loop=$recommends}
<TABLE BORDER="0" WIDTH="100%"><TR>
{section name=num loop=$recommends}
<TD ALIGN="TOP" WIDTH=5%>
<p align="center">
<A HREF="product.php?productid={$recommends[num].productid}&cat={$cat}">{include file="product_thumbnail.tpl" productid=$recommends[num].productid image_x=$config.Appearance.thumbnail_width product=$recommends[num].product tmbn_url=$products[product].tmbn_url}

<font class="ProductTitle">{$recommends[num].product}</FONT></TD>
{/section}
</TR></TABLE>
{/section}
{/capture}
{include file="dialog.tpl" title=$lng.lbl_recommends content=$smarty.capture.recommends extra="width=100%"}
{/if}


this codes is working good in version 3.4.0
Reply With Quote
  #9  
Old 08-06-2003, 06:20 AM
 
slimmedia slimmedia is offline
 

Member
  
Join Date: May 2003
Posts: 23
 

Default

Sure, replace:

Code:
image_x=$config.Appearance.thumbnail_width

with:

Code:
image_x=50

Instead of 50, you could use any width you'd like.
Reply With Quote
  #10  
Old 08-06-2003, 07:57 PM
 
jeeya jeeya is offline
 

X-Adept
  
Join Date: May 2003
Location: USA
Posts: 807
 

Default .

Worked fine.

thanks
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 02:30 AM.

   

 
X-Cart forums © 2001-2020