| ||||||||||
| Shopping cart software Solutions for online shops and malls | ||||||||||
|
|
||||||||||
| X-Cart Home |
Apply seperate templates to products.... | |||
![]() |
|
||
|
|
Thread Tools | Search this Thread |
|
#1
|
|||||||
|
|||||||
|
Hi Folks
I have some products are not really for sale - but require the surfer to email for more details. Is there a way where I can get these products to be displayed using a different template than the product.tpl? If so - which files would I need to be looking at? Cheers Tye
__________________
Today is a beautiful day, grab it while you can and live it to the full Version 4.2.3 UNIX |
|||||||
|
#2
|
|||||||
|
|||||||
|
The template that displays the product details is skin1/customer/main/product.tpl
If you amend the code by adding by a conditional around the add to cart/price part along the lines of: {if $smarty.section.products.index eq 16} email me for details {else} the normal price display bits {/if} where 16 is the product id that you want to show the email detail for. If this is more than one product then change it to: {if ($smarty.section.products.index eq 16) or ($smarty.section.products.index eq 19)}
__________________
ex x-cart guru |
|||||||
|
#3
|
|||||||
|
|||||||
|
Hey funkydunk
Cheers for that - this smarty thing is very very good, I was expecting a long drawn out affair. I'm presuming that I can assign this variable to a full catagory, e.g. {if $smarty.section.catagory.index eq 16} email me for details {else} the normal price display bits {/if} If that is so - its getting even easier. Cheers
__________________
Today is a beautiful day, grab it while you can and live it to the full Version 4.2.3 UNIX |
|||||||
|
#4
|
|||||||
|
|||||||
|
even easier
{if $cat eq "whatever it is!"} the smarty.section bit refers to a loop that the templates do signalled by {section}{/section} smarty is our friend
__________________
ex x-cart guru |
|||||||
|
#5
|
|||||||
|
|||||||
|
Yup, we like smarty very much
thanks again
__________________
Today is a beautiful day, grab it while you can and live it to the full Version 4.2.3 UNIX |
|||||||
|
#6
|
|||||||
|
|||||||
|
How would this work if I have more than one catagory which needs update
e.g. Code:
Or can I do it like this:[code][code]if $cat eq "1", "2", "3"} email me for details {else} the normal price display bits {/if}[/code]
__________________
Today is a beautiful day, grab it while you can and live it to the full Version 4.2.3 UNIX |
|||||||
|
#7
|
|||||||
|
|||||||
|
In Answer to my own question
This is how it works with multiple categories {if $cat eq "1" or $cat eq "2" or $cat eq "3" or $cat eq "4"} email me for 1 details {else} email me for 2 details {/if} Hope this helps someone
__________________
Today is a beautiful day, grab it while you can and live it to the full Version 4.2.3 UNIX |
|||||||
|
|
|||
|
X-Cart forums © 2001-2020
|
|||