| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
$Smarty assign won't parse | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
$Smarty assign won't parse
Hi folks -
I have a simple sql query I want to run conditionally in my product.tpl [depending on which product is selected]. It accesses an added mysql table containing additional product info. I have written a small script, workshops.php, which I put in store/customer/, like this: Code:
The file mentioned in the last line, 'workshops.tpl', is in [skin1]/customer/main, and looks like this: Code:
Finally, I have an {if} statement in [skin1]/customer/main/product.tpl: Code:
The problem is, no matter how I try to configure it, products.tpl chokes at the line beginning '$smarty->assign...' when parsing workshops.php. It renders everything after the first '$smarty->' [ie from the word 'assign...' onward] in the browser as text, and the include of workshops.tpl doesn't happen. Any idea where I've gone wrong? All suggestions greatly appreciated! Cheers Les |
|||||||
#2
|
|||||||
|
|||||||
Hello friend,
I believe that you cannot include .php files in a smarty include statement. You will have to get around that it by requiring the file in product.php using Code:
Alter your if/else statement to fit .php style, or private message me with your if else statement and what you would like to do with it if you would like. (gramma alert! T_T)
__________________
Best Regards! Alan Search is my friend |
|||||||
|
|||
X-Cart forums © 2001-2020
|