| ||||||||||
| Shopping cart software Solutions for online shops and malls | ||||||||||
|
|
||||||||||
| X-Cart Home |
Assigning Variable - !!! Solved thanks to Funky! | |||
![]() |
|
||
|
|
Thread Tools | Search this Thread |
|
#1
|
|||||||
|
|||||||
|
I'm trying to assign the sku# to the variable $id.
Here is my code: Code:
Here is the code to display it: Code:
I'm adding this code to product.tpl This works successfully on an older version of x-cart, but as I test it on the newest version of x-cart the {$id} comes up as blank. Has somthing changed? Anyone got any ideas on how to make this work with the newest version of x-cart? Thanks in Advance! John7 |
|||||||
|
#2
|
|||||||
|
|||||||
|
try $product.productcode instead
that'll work
__________________
ex x-cart guru |
|||||||
|
#3
|
|||||||
|
|||||||
|
Nope tried that already.
When I use that instead it says Array.productcode as the results. |
|||||||
|
#4
|
|||||||
|
|||||||
|
{assign var="id" value=$product.productcode}
{$id} works for me on 3.4.4 in product.tpl
__________________
ex x-cart guru |
|||||||
|
#5
|
|||||||
|
|||||||
|
just spotted the difference - the ""
__________________
ex x-cart guru |
|||||||
|
#6
|
|||||||
|
|||||||
|
It works!!!
It was the " " all along. It seemed so hard, but was so simple. Thanks once again Funydunk! John7 |
|||||||
|
#7
|
|||||||
|
|||||||
|
__________________
ex x-cart guru |
|||||||
|
|
|||
|
X-Cart forums © 2001-2020
|
|||