Quote:
|
Originally Posted by shan
you can only loop arrays that have been queried from the database so make sure youve pulled the data first and assigned it to smarty
|
This is what i did.
I made a new lbl , called lbl_skincare and added this to category_modify.tpl
-----------------------------------------------------------------------------------
Quote:
<SELECT name="section">
<OPTION value="C"{if $current_category.section eq "C"} selected{/if}>{$lng.lbl_categories}</OPTION>
<OPTION value="M"{if $current_category.section eq "M"} selected{/if}>{$lng.lbl_manufacturers}</OPTION>
<OPTION value="S"{if $current_category.section eq "S"} selected{/if}>{$lng.lbl_skincare}</OPTION>
</SELECT>
|
-----------------------------------------------------------------------------------
As you can see the $current_category.section eq "S"} for the lbl_skincare
Then i added the skincare.tpl to home.tpl
-----------------------------------
Quote:
{include file="customer/menu_cart.tpl" }
{ include file="customer/categories.tpl" }
{ include file="customer/skincare.tpl" }
{/if}
|
-----------------------------------
Now in det admin backend under the link Products --> add new... i have now three categories where i can put my products =
categories
manufactures
skincare
so far so good
In my database inder xcart_categories the products that i have added to skincare are under section "S" Other products are under section "C" and section "M"
so i belive i have pulled the date to the database, but i dont know where i can add {section name=cat_num loop=$skincare_menu}
For my categories section the string is this:
Quote:
|
{section name=cat_num loop=$categorie_menu}
|
and the manufactures string is like this:
Quote:
|
{section name=cat_num loop=$man_menu}
|
Wich smarty are you talking about? I have checked all the smarty files, but i can not find the place to add $skincare_menu
smarty.php
Smarty.class.php
Smarty_Compiler.class.php
core.smarty_include_php
core.assign_smarty_interface.php
Where can i add $skincare_menu
Best regards,
gobligoo
xcart ver. 4.017