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

Pictures in recommends.tpl for 3 column format

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #21  
Old 05-14-2005, 02:53 PM
  MythNReality's Avatar 
MythNReality MythNReality is offline
 

X-Adept
  
Join Date: Mar 2005
Location: S. Cali
Posts: 403
 

Default

Quote:
Originally Posted by balinor
Hugs to Balinor, that's was exactly what I was looking for \
__________________
_____________
Capture Your Mini-Me Look!

- X-CART Gold (Current Version) V4.6
- Reboot
- CDSEO
Reply With Quote
  #22  
Old 07-16-2005, 08:44 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Just a little update on this thread. Here's the code for 4.x that breaks the display up into rows of 3, allowing as many recommended products as you want (as set in General Settings/Modules Options). Just change the thumbnail width as you would like (in pixels). You can also adjust the number of columns by changing the width of the td and the 'div by x' where x is the number of columns:

Code:
{if $recommends} {capture name=recommends} {section name=num loop=$recommends} { if %num.first% } <table border=0 width=100%>{/if} { if %num.index% is div by 3}<tr>{/if} <td width="33%" align="center" valign="top"> <a href=product.php?productid={$recommends[num].productid}&cat={$cat}&page={$navigation_page}>{include file="product_thumbnail.tpl" productid=$recommends[num].productid image_x=100 product=$recommends[num].product tmbn_url=$recommends[num].tmbn_url} <SPAN class="ItemsList">{$recommends[num].product}</SPAN> </td> { if %num.last% }</tr> </table>{/if} {/section} {/capture} {include file="dialog.tpl" title=$lng.lbl_recommends content=$smarty.capture.recommends extra="width=100%"} {/if}
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #23  
Old 07-16-2005, 10:37 AM
 
Lingerieblowout Lingerieblowout is offline
 

X-Adept
  
Join Date: Sep 2003
Location: Annapolis, MD
Posts: 415
 

Default

Thanks balinor....

His last post also works in XC 3.4.6

Michael
__________________
http://www.lingerieblowout.com
Version 4.1.10

http://www.topnichewebsites.com
Version 4.4.5

Michael
Reply With Quote
  #24  
Old 07-16-2005, 10:41 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Yea, code hasn't changed much in these templates since way back when
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #25  
Old 07-27-2005, 06:11 PM
  Bling's Avatar 
Bling Bling is offline
 

Senior Member
  
Join Date: Apr 2005
Posts: 162
 

Default

Hey there Balinor...I just tried this with 13 and it doesnt seem to do anything. I have hooters url app installed and I noticed he has some code in there. Have you tried this app with any of your customers with his url app?

This is exactly what the doctor ordered...pictures with the recomended products.

Thanks,
Bling
__________________
Thanks...Bling

4.4.2
Reply With Quote
  #26  
Old 02-25-2006, 02:12 AM
 
Lionel Lionel is offline
 

Senior Member
  
Join Date: Dec 2005
Posts: 199
 

Default

Balinor, you code works perfect, thanks. However, the thumb_url value is not passed

Code:
tmbn_url=$recommends[num].tmbn_url


Please how can I build that array in recommends.php?

Thanks.
__________________
X-Cart Gold 4.0.17 [unix]
X-Cart Gold 4.0.18 [unix]
Reply With Quote
  #27  
Old 02-25-2006, 05:52 AM
 
Lionel Lionel is offline
 

Senior Member
  
Join Date: Dec 2005
Posts: 199
 

Default

I figured it out and am posting the soution in case someone else wants it.
(that's to use with TelaFirma's mod)

in recommends.php

after
Code:
if(!empty($products_id)) { foreach($products_id as $p) { $query_ids[] = $p['productid'];

simply put
Code:
$rec_thumb_url[]=func_get_thumbnail_url($p['productid']);
then at the bottom pass it on to smarty
Code:
$smarty->assign("rec_thumb_url",$rec_thumb_url);

finally in recommends.tpl

Code:
tmbn_url=$rec_thumb_url[num] id="product_thumbnail"

Now the images that we are able to display in recommends thanks to Balinor can take advantage of that most recommended mod of TelaFirma.
__________________
X-Cart Gold 4.0.17 [unix]
X-Cart Gold 4.0.18 [unix]
Reply With Quote
  #28  
Old 02-25-2006, 08:15 AM
 
Lionel Lionel is offline
 

Senior Member
  
Join Date: Dec 2005
Posts: 199
 

Default

ermm, the solution is not so good. It pulls the thumbs randomly too and does not match them with title.

Balinor, help?
__________________
X-Cart Gold 4.0.17 [unix]
X-Cart Gold 4.0.18 [unix]
Reply With Quote
  #29  
Old 07-06-2006, 04:32 PM
 
Audiolines Audiolines is offline
 

Senior Member
  
Join Date: Mar 2006
Posts: 102
 

Default

ok, i love this code, but it want to display my prices along with my recommended products... i cant figure out the code to display that, as prices are stored in a seperate table
__________________
version 4.0.17
Reply With Quote
  #30  
Old 07-29-2006, 08:26 PM
 
ecommerce ecommerce is offline
 

eXpert
  
Join Date: Jul 2006
Posts: 267
 

Default

I kinda got lost with this mod.

Do i need to buy a mod or add on?

Whats the code and where do i put it?

I just want below the tabbed aread,

3 columns to list 3 products.

for each product i want to show
1. thumb pic
2. title of item
3. price

1 and 2 are cliackable so they go to the product page.\
im using 4.0.18
__________________
X-Cart 4.0.18 DBest
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 12:11 AM.

   

 
X-Cart forums © 2001-2020