X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Make a new category.tpl file --> (skincare.tpl) (https://forum.x-cart.com/showthread.php?t=20276)

gobligoo 03-02-2006 10:21 AM

Make a new category.tpl file --> (skincare.tpl)
 
Hi

i really dont know that my subjekt was enough explained, but the thing is that im making a new menu. Today i have two menus: one that is called manufactures (on the left) and one categories (placed on the right). I need one third menu, lets call it skincare.

My problem is following:
{section name=cat_num loop=$categories_menu}

Where can i make a new loop=$categories_menu} It must be called loop=$skincare_menu}

I have made a new categories.tpl , called skincare.tpl

Actually i only need to know where i can add loop=$skincare_menu} Is this a database(mysql) thing ? what can i do, i only need to add one thing and then my cart is very good.

Sorry for bad english :(

best regards,

gobligoo

x-cart ver. 4.017

shan 03-02-2006 03:36 PM

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

gobligoo 03-03-2006 12:41 AM

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

gobligoo 03-08-2006 07:41 AM

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


Hi, me again :)

Im still not figuering this issue out. Where i can decide to make section name= and the loop=$ i dnont know. Is this related with the database? If so where can i add section name and loop name?

Please refer to above post regarding what i have done so far. A illustration below.

http://home.broadpark.no/~sihans/x-cart/skincare.gif

Regards,

gobligoo

X-cart ver. 4.0.18

justme 09-14-2006 03:58 AM

Re: Make a new category.tpl file --> (skincare.tpl)
 
If I understand what you're trying to do, you don't need to edit loops, etc.

Check out this EASY way to get multiple category sections:

http://forum.x-cart.com/showthread.php?t=20262&highlight=two+category+list s

(Skip down to my post to see code for third category section.)

justme


All times are GMT -8. The time now is 09:17 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.