| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Smarty Assign Problem | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Smarty Assign Problem
I'm editing the products.php file in the cart root directory and have been having some issues outputting variables and the like in the products list.
For testing, in products.php, I have put the folowing: PHP Code:
Right at the bottom, with the other smarty assigns, then in skin/common_files/customer/main/products_list.tpl, I have put the following: PHP Code:
Right next to where the price is displayed, but alas, nothing shows up. It does not output anywhere on the page at all. Am I doing something wrong? Can anyone suggest any solutions? I'd appreciate it. Regards, - Adam.
__________________
X-Cart Gold, version 4.4.2. |
|||||||
#2
|
|||||||||
|
|||||||||
Re: Smarty Assign Problem
You should make sure that you are editing the right template.
skin/common_files/customer/main/products_list.tpl The common_files are used if a skin has no specific template... e.g. fashion_mosaic_blue has its own template: skin/fashion_mosaic_blue/customer/main/products_list.tpl Thus the directory in green should be the active skin.
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
#3
|
|||||||
|
|||||||
Re: Smarty Assign Problem
Thank you for your response.
I am currently using the 3-column template, which has only a couple of files in its directory. I have edited the products_list.tpl before (to change the "Our Price" text to static text just for that page) and it worked fine, I have also used the {$product.productid} Smarty code in the same file to display the product's ID next to its name (merely as a test) and that has worked too. I am pretty sure I'm editing the correct file, is there any thing else that may be causing the problem? Kind Regards, - Adam.
__________________
X-Cart Gold, version 4.4.2. |
|||||||
#4
|
|||||||||
|
|||||||||
Re: Smarty Assign Problem
you may need to clear the cache - cleanup.php
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#5
|
|||||||
|
|||||||
Re: Smarty Assign Problem
I have done that once or twice, just did it again to make sure and it's still the same.
Seeing as the $foo variable is set in products.php, shouldn't I be able to see it in the debug window in Webmaster Mode, whether it's being echo'd or not? As I don't see it in there either. Regards, - Adam.
__________________
X-Cart Gold, version 4.4.2. |
|||||||
#6
|
|||||||||
|
|||||||||
Re: Smarty Assign Problem
Another possible reason is that the variable appears in the code fragment that is not logically "active" on that page.
Have you tried inserting it at the beginning or at the very end of the template?
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
#7
|
|||||||
|
|||||||
Re: Smarty Assign Problem
Thanks for your help, qualiteam. Greatly appreciated.
I have resolved this issue now and evrything seems to be in order.
__________________
X-Cart Gold, version 4.4.2. |
|||||||
#8
|
|||||||||
|
|||||||||
Re: Smarty Assign Problem
I'm glad you've found the solutions provided useful.
Thank you.
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
|
|||
X-Cart forums © 2001-2020
|