neurotoxic Posted November 2, 2005 Posted November 2, 2005 Background info: we're breeding small animals and also selling pet products. My problem is this: I'd like to have my animals listed seperately from the other products (because, after all, animals are not "products")... I'm trying to separate all my products in two main categories: ANIMALS and PRODUCTS. My idea was this: duplicate the includes/boxes/categories.php file. The first one would list products and categories in PRODUCTS and the second one would list the pets that are in the ANIMALS category. Each copy of categories.php would have to list subcategories in its respective category, but not the other, ie it would not start at the root category but either in ANIMALS or PRODUCTS. From there, I will be making a static page that will have the ANIMALS box appear, while the rest of the store would list the products in PRODUCTS as usual. I'm not sure if it's clear, but if anyone could give me a hand, I'm not sure how to tell categories.php to look only in PRODUCTS and, say, categories_animals.php to list only what's in the ANIMALS category.... Thank you!
MoisesZaragoza Posted November 2, 2005 Posted November 2, 2005 Ok what you want to do is actually very easy. You log in to your admin panel and you go to Catalog Then you click on the ?NEW CATEGORY? Button and name one Pets and the other one products. When you have the Categories Created You will see a folder Icon you click o that icon and add your products. at the end of the day the code will be good
neurotoxic Posted November 2, 2005 Author Posted November 2, 2005 When you have the Categories Created You will see a folder Icon you click o that icon and add your products. You have misunderstood me. I know how to create categories and add products. I'm trying to have a new box, identical to includes/boxes/categories.php that will list one of the two "root" categories (Animals and Products), while categories.php will list the other. Then I will call this new box in a static page called, for example, animals.php in the /catalog folder while index.php will show the original categories.php. I am trying to do this without having to create a seperate table in the database.
♥Monika in Germany Posted November 2, 2005 Posted November 2, 2005 You have misunderstood me. I know how to create categories and add products. I'm trying to have a new box, identical to includes/boxes/categories.php that will list one of the two "root" categories (Animals and Products), while categories.php will list the other. Then I will call this new box in a static page called, for example, animals.php in the /catalog folder while index.php will show the original categories.php. I am trying to do this without having to create a seperate table in the database. why do you need to create a static page for the animals? I do not understand. :-) Monika addicted to writing code ... can't get enough of databases either, LOL! my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum Interactive Media Award July 2007 ~ category E-Commerce my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...
neurotoxic Posted November 2, 2005 Author Posted November 2, 2005 why do you need to create a static page for the animals? I do not understand. To have a different left_column.php appear, which will include my alternate box in which only the 2nd "root" category will appear (phew!) I'm aware it isn't exactly the proper way to do things but I'm just hacking the code a bit to fit some particular needs. I guess a better idea would be to have index.php itself call a different box with some if/else if situations, but I'm a bit short on time and, frankly, I don't quite have all the knowledge I should yet. :-"
Recommended Posts
Archived
This topic is now archived and is closed to further replies.