please take a look at this string:
I want to take the variable {$category.category_id} and put it into PHP variable called $id
how can it be done?
(becuase the unique template CS cart using, I don’t realy know how to do it)
And one more thing that contact to this problem:
when I push on botton “catalog” in store front, I see all the catories that I have - name of the category and photo. I also want to add description of every category.
For that I add new culomn, name “category_dec” in table “cscart_category_descriptions”.
The file that pull data from the database is “categories_multicolumns”.
what I need to write in this file so cs-cart system will show me the data in culomn “category_dec”?
Thanks in advance,
Roi
Emmm, is there anyone here that understand the CS-cart code?
Try this, not sure if it’ll work.
{assign var=id value=$category.category_id} [COLOR="Red"]<<-- assign variable in Smarty[/COLOR]
{php}
$id = $this->get_template_vars('id');
$id_var = SOME_FUNCTION($id); [COLOR="red"]<<-- manipulate variable in PHP[/COLOR]
$this->assign('id_var', $id_var);
{/php}
{$id_var} [COLOR="red"]<<-- Use result back in Smarty tpl[/COLOR]
Thank!
but do I need all of this just to put Smarty variables into PHP variables?
What exactly are you trying to do?
Like in here: [url]http://75.127.114.162/~deadseac/dead...p?mode=catalog[/url]
I want to add decsription under every category’s name.
for that I open new column (named “category_dec”) in table “cscart_category_descriptions”. now I want the data in every cell to be print on screen.
P.S - the number under category’s name in the ID number of every category. instead the data from “category_id” column, I want to print the data from “category_dec” column (which I add by myself)
And b.t.w - what is it “SOME_FUNCTION” that you wrote before?
OK, it’s working
Thanks Charlie!
The link doesn’t work.
[quote]
And b.t.w - what is it “SOME_FUNCTION” that you wrote before?
[/quote]
That’s just an example.