Forums / General Questions / Question about linking Categories with other categories

Question about linking Categories with other categories

Views: 936

Results 1 to 5 of 5
3 Apr 2014, 9:05 AM
#1
aperfecthost avatar

aperfecthost

New Zenner

Join Date:
May 2005
Location:
Rockwood, Tennessee, United States
Posts:
97
Plugin Contributions:
0

Question about linking Categories with other categories

I know how to copy products from one category to another. However, my customer wants a few sub-categories of one main category to show as another sub-category of another category. It is a florist and many of their categories/sub-categories cross-over.

Here is the specifics.
cPath=67 (Live Plants, with 3 subcategories) should be able to be linked as a sub-category of cPath=5 (Funerals/Sympathy, with 3 sub + HOPEFULLY cpath=67 and cPath=73 as mentioned below)

ALSO

cPath=73 (Gifts, with 5 subcategories) should also be linked as a sub-category of cPath=5

How can I make that happen?

The website I am working on is: http://paisleyposey.com
I am using a plug-in for the categories. (CSS Flyout Menu) Therefore, the regular tpl_categories.php is not the file I need to modify.
I believe it is either the MYTEMPLATE/sideboxes/tpl_categories.css.php file OR the includes/sideboxes/MYTEMPLATE/categories_css.php
which I am showing below.

Even if you're not POSITIVE on how to do this, please suggest something!

<?php // // +----------------------------------------------------------------------+ // |zen-cart Open Source E-commerce | // +----------------------------------------------------------------------+ // | Copyright (c) 2003 The zen-cart developers | // | | // | <http://www.zen-cart.com/index.php> | // | | // | Portions Copyright (c) 2003 osCommerce | // +----------------------------------------------------------------------+ // | This source file is subject to version 2.0 of the GPL license, | // | that is bundled with this package in the file LICENSE, and is | // | available through the world-wide-web at the following url: | // | <http://www.zen-cart.com/license/2_0.txt>. | // | If you did not receive a copy of the zen-cart license and are unable | // | to obtain it through the world-wide-web, please send a note to | // | [email protected] so we can mail you a copy immediately. | // +----------------------------------------------------------------------+ // $Id: tpl_categories_css.php 2004/06/23 00:00:00 DrByteZen Exp $ // $content = ""; $content .= '<div id="nav-cat">'; $content .= $menulist; // see the modules/sideboxes/YOURTEMPLATE/categories_css.php for this if (SHOW_CATEGORIES_BOX_SPECIALS == 'true' or SHOW_CATEGORIES_BOX_PRODUCTS_ALL == 'true'){ $content .= ''; // insert a blank line/box in the menu if (SHOW_CATEGORIES_BOX_SPECIALS == 'true') { $content .= '<ul class="level1"><li><a href="' . zen_href_link(FILENAME_SPECIALS) . '">' . CATEGORIES_BOX_HEADING_SPECIALS . '</a></li></ul>'; } if (SHOW_CATEGORIES_BOX_PRODUCTS_NEW == 'true') { $content .= '<ul class="level1"><li><a href="' . zen_href_link(FILENAME_PRODUCTS_NEW) . '">' . CATEGORIES_BOX_HEADING_WHATS_NEW . '</a></li></ul>'; } if (SHOW_CATEGORIES_BOX_FEATURED_PRODUCTS == 'true') { $show_this = $db->Execute("select products_id from " . TABLE_FEATURED . " where status= 1 limit 1"); if ($show_this->RecordCount() > 0) { $content .= '<ul class="level1"><li><a href="' . zen_href_link(FILENAME_FEATURED_PRODUCTS) . '">' . CATEGORIES_BOX_HEADING_FEATURED_PRODUCTS . '</a></li></ul>'; } } if (SHOW_CATEGORIES_BOX_PRODUCTS_ALL == 'true') { $content .= '<ul class="level1"><li><a href="' . zen_href_link(FILENAME_PRODUCTS_ALL) . '">' . CATEGORIES_BOX_HEADING_PRODUCTS_ALL . '</a></li></ul>'; } } $content .= '</div>'; // May want to add ............onfocus="this.blur()"...... to each A HREF to get rid of the dotted-box around links when they're clicked. // just parse the $content string and insert it into each A HREF tag ?> <?php // // +----------------------------------------------------------------------+ // |zen-cart Open Source E-commerce | // +----------------------------------------------------------------------+ // | Copyright (c) 2003 The zen-cart developers | // | | // | <http://www.zen-cart.com/index.php> | // | | // | Portions Copyright (c) 2003 osCommerce | // +----------------------------------------------------------------------+ // | This source file is subject to version 2.0 of the GPL license, | // | that is bundled with this package in the file LICENSE, and is | // | available through the world-wide-web at the following url: | // | <http://www.zen-cart.com/license/2_0.txt>. | // | If you did not receive a copy of the zen-cart license and are unable | // | to obtain it through the world-wide-web, please send a note to | // | [email protected] so we can mail you a copy immediately. | // +----------------------------------------------------------------------+ // $Id: categories_css.php 2004/06/23 00:00:00 DrByteZen Exp $ // // load the UL-generator class and produce the menu list dynamically from there require_once (DIR_WS_CLASSES . 'categories_ul_generator.php'); $zen_CategoriesUL = new zen_categories_ul_generator; $menulist = $zen_CategoriesUL->buildTree(true); require($template->get_template_dir('tpl_categories_css.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_categories_css.php'); $title = BOX_HEADING_CATEGORIES; $left_corner = false; $right_corner = false; $right_arrow = false; $title_link = false; require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default); ?>
3 Apr 2014, 12:38 PM
#2
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,109
Plugin Contributions:
56

Re: Question about linking Categories with other categories

For each product to be linked to another category, use your admin's Catalog->Categories/Products and click the "Copy to" button associated with that product. When the "Copy to" submenu is shown, click the "Multiple Categories Link Manager" button and follow the instructions from there.

3 Apr 2014, 2:27 PM
#3
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Question about linking Categories with other categories

And to address your literal question, there is no way without significant alteration of the Zen Cart categories structure to link subcategories with multiple top categories. You need to do it by copy/linking the subcat's products into a new subcat in the second top category. The new subcat can have the same name as the original subcat.

3 Apr 2014, 4:17 PM
#4
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: Question about linking Categories with other categories

I was just going to post something similar to Glenn's suggestion. You'll have to create subcategories with the same name under the other top level categories and link the products from one subcategory to the other.

Mary Ellen
I came; I saw; I Zenned
Taking over the world... one website at a time
Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

Holzheimer
Fan Odyssey

3 Apr 2014, 7:42 PM
#5
aperfecthost avatar

aperfecthost

New Zenner

Join Date:
May 2005
Location:
Rockwood, Tennessee, United States
Posts:
97
Plugin Contributions:
0

Re: Question about linking Categories with other categories

That's what I was "afraid" of. Oh well... thank you for the replies!