Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

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

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-02-2006, 10:21 AM
 
gobligoo gobligoo is offline
 

Member
  
Join Date: Sep 2005
Posts: 26
 

Default 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
__________________
X-cart 4.0.19 (Unix)
--==::wicked::==--
Reply With Quote
  #2  
Old 03-02-2006, 03:36 PM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

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
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #3  
Old 03-03-2006, 12:41 AM
 
gobligoo gobligoo is offline
 

Member
  
Join Date: Sep 2005
Posts: 26
 

Default

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
__________________
X-cart 4.0.19 (Unix)
--==::wicked::==--
Reply With Quote
  #4  
Old 03-08-2006, 07:41 AM
 
gobligoo gobligoo is offline
 

Member
  
Join Date: Sep 2005
Posts: 26
 

Default

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
__________________
X-cart 4.0.19 (Unix)
--==::wicked::==--
Reply With Quote
  #5  
Old 09-14-2006, 03:58 AM
 
justme justme is offline
 

Member
  
Join Date: Jul 2004
Location: Western New York State, USA
Posts: 28
 

Default 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
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 02:28 PM.

   

 
X-Cart forums © 2001-2020