| ||||||||||
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 |
#11
|
|||||||
|
|||||||
Ok, managed to pull the icon in, split it up into a 3 column layout and it looks great. Only problem is, if there is only one upselling link, the other two columns show the 'image not available' icon. What I suppose I need is a function to tell X-Cart to not display anything in the extra columns if there are only one or two items. A little help? Here's what I have for code:
Code:
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#12
|
|||||||
|
|||||||
It's because you are telling it to loop 3 times...
Code:
|
|||||||
#13
|
|||||||
|
|||||||
Yep. What I need is an {if} statement in there that tells it to not display anything if there is only 1 or 2 products. Anyone care to help me out with that? I don't know Smarty well enough yet to come up with anything.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#14
|
|||||||||
|
|||||||||
You need to count the number of results in the loop.
Look for a thread in Custom Mods by 27stars and about subcategory display. You can use a similar method to accomplish what you want to do. or look at skin1/customer/main/productS.tpl |
|||||||||
#15
|
|||||||
|
|||||||
Solution here: http://forum.x-cart.com/viewtopic.php?t=14995
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#16
|
|||||||
|
|||||||
I really like this mod but do have one question, how would I make this mod display a 3x3 table with 9 recommended products instead of just the 3? Thanks in advance.
__________________
4.1.9 (Linux) Live Store www.thecrackedbook.com Find used books and out of print books. |
|||||||
#17
|
|||||||
|
|||||||
The original 3 column recommends code works fine in V4 (my version anyway), but it looks a bit clumsy as is because it squashes the item title against left hand side. It's easily fixed, here's the original code:
Code:
Just modify the first part to this: Code:
et voila, just by changing the table width to 200 the title stretches all the way under the thumbnail.
__________________
X-Cart V 4.0.18 |
|||||||
#18
|
|||||||
|
|||||||
Quote:
Yes, this would be very nice. I have managed to squeeze in 4 columns across but would like another one or two more rows of it. Had a go at doing it myself, but with no success. The mod works great on 4.0.13 btw.
__________________
X-Cart 5.3.5.4 |
|||||||
#19
|
|||||||
|
|||||||
Did anyone figure out the IF statement to make a loop count and if EQ then add a
So if loop = 6 and 3 are written a would come before the 4th one.
__________________
http://www.lingerieblowout.com Version 4.1.10 http://www.topnichewebsites.com Version 4.4.5 Michael |
|||||||
#20
|
|||||||
|
|||||||
This is how I tried to do it but still make 1 row of six instead of 2 rows of 3
{* $Id: recommends.tpl,v 1.3 2004/03/01 16:26:00 salsabeel Exp $ *} {if $recommends} {capture name=recommends} {assign var="col" value="0"} {assign var="numCols" value="3"} <table border=0 width=100%> <tr> {section name=num loop=6} {if $col == $numCols} </tr><tr>{assign var="col" value="0"} {/if} <td width=200 align=center valign=top> {$recommends[num].product}</font> </td> {assign var="col" value="`$col+1`"} {/section} </tr> </table> {/capture} {include file="dialog.tpl" title=$lng.lbl_recommends content=$smarty.capture.recommends extra="width=100%"}{/if}
__________________
http://www.lingerieblowout.com Version 4.1.10 http://www.topnichewebsites.com Version 4.4.5 Michael |
|||||||
|
|||
X-Cart forums © 2001-2020
|