| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Pictures in recommends.tpl for 3 column format | ||||
|
|
Thread Tools | Search this Thread |
#41
|
|||||||
|
|||||||
Re: Pictures in recommends.tpl for 3 column format
Tuan,
Thanks for your post #37. Worked great on 4.1.3!
__________________
X-Cart Pro 4.1.11 (Live) XRMA XAFF XAOM DSEFU Pro XGift Reg Firetank Feed Manager BCSE Shipping Calculator XcartMod Dynamic Images |
|||||||
#42
|
|||||||
|
|||||||
Re: Pictures in recommends.tpl for 3 column format
I am testing 4.1.3 right now. I am using the code on post #37 and was getting a smarty error when there were no bestsellers or related products (I have incorporated this mod into my related products). In order to fix the smarty error, I had to wrap some of the language in modules/Bestsellers/bestsellers.php in an if statement. I used the following code and it seemed to work.
Put this at the bottom of modules/Bestsellers/bestsellers.php Code:
Code:
__________________
X-Cart Pro 4.1.11 (Live) XRMA XAFF XAOM DSEFU Pro XGift Reg Firetank Feed Manager BCSE Shipping Calculator XcartMod Dynamic Images |
|||||||
#43
|
|||||||||
|
|||||||||
Re: Pictures in recommends.tpl for 3 column format
I took Balinor's "fix" and was nearly satisfied with the results. However, I moved the <a href> link higher in the code so that the user could click the figure as well as the text to go to the upsell product, and I inserted a <br> to force the text to the following line: Here's my modified code that seems to work fine in 4.0.19:
{* $Id: related_products.tpl,v 1.7.6.1 2004/12/06 svowl Exp $ *} {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="250" 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> <span class="ProductTitle">{ $product_links[cat_num].product|escape}</span> </a></td> { if %cat_num.last% } </tr></table> {/if} {/section} {/capture} {include file="dialog.tpl" title=$lng.lbl_related_products content=$smarty.capture.dialog extra="width=100%"} {else} {capture name=dialog} No related products. {/capture} {include file="dialog.tpl" title=$lng.lbl_related_products content=$smarty.capture.dialog extra="width=100%"} {/if} Cheers, Susan |
|||||||||
#44
|
|||||||
|
|||||||
Re: Pictures in recommends.tpl for 3 column format
Quote:
Where did you find this original set of code? I have searched but cannot find it. I want to add prices and pictures but for only 1 column.
__________________
Using 4.4.0 |
|||||||
#45
|
|||||||
|
|||||||
Re: Pictures in recommends.tpl for 3 column format
skin1/modules/Recommended_Products/recommends.tpl
This is workign on 4.3.1 {* $Id: recommends.tpl,v 1.9 2006/03/21 07:17:18 svowl Exp $ *} {if $recommends} {capture name=recommends} {assign var="tmp" value="0"} {section name=num loop=$recommends} {if $recommends[num].productid}{assign var="tmp" value="1"}{/if} {/section} {section name=num loop=$recommends} { if %num.first% } <table border=1 cellspacing=5 width=100%> {/if} {if $smarty.section.num.index is div by 3} </tr><tr valign="top"> {/if} <td width="250" align="center"> {include file="product_thumbnail.tpl" productid=$recommends[num].productid image_x=100 product=$recommends[num].product tmbn_url=$recommends[num].tmbn_url} <a href="product.php?productid={ $recommends[num].productid }"{if $config.Modules.upselling_new_window eq 'Y'} target="_blank"{/if}> <BR> <span class="ProductTitle">{ $recommends[num].product|escape}</span><br> </a></td> { if %num.last% } </tr></table> {/if} {/section} {/capture} {include file="dialog.tpl" title=$lng.lbl_recommends content=$smarty.capture.recommends extra='width="100%"'} {else} {capture name=dialog} No related products. {/capture} {include file="dialog.tpl" title=$lng.lbl_recommends content=$smarty.capture.recommends extra='width="100%"'} {/if} |
|||||||
#46
|
|||||||
|
|||||||
Re: Pictures in recommends.tpl for 3 column format
Cankus,
Did you mean 4.1.3? Has anyone tested it in 4.1.6? Also, can this be used for the Related Products? I don't use the recommended products because they are random. I only use the related products that are chosen to appear on the product page (upselling links) and I really need to add columns there. If this code does not work, does any one know where I can find the right one? Thanks!
__________________
Vera B 4.4.5 CFLSystems.com mods, Kosmos eBay Integration, Feed Manager Pro, custom mods, BCSEngineering Mods, CDSEO PRO Hosting by EWDHosting - The best home for your x-cart. |
|||||||
#47
|
|||||||
|
|||||||
Re: Pictures in recommends.tpl for 3 column format
This code for related products and working on 4.3.1
File : skin1/modules/Upselling_Products/related_products.tpl {* $Id: recommends.tpl,v 1.9 2006/03/21 07:17:18 svowl Exp $ *} {if $recommends} {capture name=recommends} {assign var="tmp" value="0"} {section name=num loop=$product_links} {if $$product_links[num].productid}{assign var="tmp" value="1"}{/if} {/section} {section name=num loop=$product_links} { if %num.first% } <table border=0 cellspacing=5 width=100%> {/if} {if $smarty.section.num.index is div by 3} </tr><tr valign="top"> {/if} <td width="250" align="center"> {include file="product_thumbnail.tpl" productid=$product_links[num].productid image_x=100 product=$product_links[num].product tmbn_url=$product_links[num].tmbn_url} <a href="product.php?productid={ $product_links[num].productid }"{if $config.Modules.upselling_new_window eq 'Y'} target="_blank"{/if}> <BR> <span class="ProductTitle">{ $product_links[num].product|escape}</span><br> </a></td> { if %num.last% } </tr></table> {/if} {/section} {/capture} {include file="dialog.tpl" title=$lng.lbl_related_products content=$smarty.capture.recommends extra='width="100%"'} {else} {capture name=dialog} No related products. {/capture} {include file="dialog.tpl" title=$lng.lbl_related_products content=$smarty.capture.recommends extra='width="100%"'} {/if} |
|||||||
#48
|
|||||||||
|
|||||||||
Re: Pictures in recommends.tpl for 3 column format
Thank you for the code, works great!
Mark
__________________
X-Cart 4.2.2 / PHP 5.2.9 / Webserver Apache 2.0.63 (FreeBSD) / MySQL 5.0.77 http://www.hemmaplanet.eu |
|||||||||
#49
|
|||||||||
|
|||||||||
Re: Pictures in recommends.tpl for 3 column format
Sorry if this has been covered already but is it possible to just show related products from the same category of the page it is on?
__________________
Installs: X-Cart 4.1.x - 4.4.x ∙∙ MySQL version: 5.0.45 ∙∙ Apache version: 2.2.8 (Unix) ∙∙ PHP version: 5.25 X-Cart add-ons: all ∙∙ Mods: A lot; too many ∙∙ Skin templates: Many ∙∙ Experience: Somewhere beyond newbie ----------------------------------------------------------------------------------------------------------------------------------------- Looking for the best dutch language pack? 4.1.x - 4.6.x compatibel, native speaker translation! More info |
|||||||||
#50
|
|||||||||
|
|||||||||
Re: Pictures in recommends.tpl for 3 column format
This mod is great... I just installed it on 4.1.6 and looks great.
Thanks!!
__________________
eCommerce - Strategy / Design / Development / Marketing / Maintenance Call within Australia: Phone: 1300 648 274 | Mobile: 0417 241 950 Call outside Australia: +61 417 241 950 | Email: results@mitash.com | Skype: mitashau | Web: www.mitash.com |
|||||||||
|
|||
X-Cart forums © 2001-2020
|