Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Display Artist Name (sub-category) of Album (product) in Genre (Main Category)


Recommended Posts

MOD of this would be Greatly appreciated by many of us :) or even a hint...


Trying to give you as much information here as possible and hopefully not confuse because I think this should be one function to call from many pages... please let me know if I may provide more.

Anytime that a CD Title is show, the Band Name (Artist / Parent-Category / Sub-Category of Main) shows also - on any page that is viewed. (Especially from the Products page, but invoice, printable catalog, etc if possible)

Goals is to trace in reverse (maybe?) PRODUCT << PARENT CATEGORY << MAIN CATEGORY. My thought is this to be done by join statment of product id with parent category id (which is the sub-category under main-category)


Image of example for product listing where PARENT CATEGORY is actually SUB-CATEGORY of MAIN CATEGORY:



URL's of sites that do what I want:


Examples of showing ARTIST (parent category of product) of album TITLES (product)


This is a link showing both the ARTIST and the TITLE of the albums:


Same site after entering J Mac into Site Search (notice it shows every "product" with text 'mac' in it:


This link shows (on right of main and scroll down on left side 'SPECIALS' section) how ARTIST is called for every ALBUM:


Forum References that may help:


this suppose to put category in main text but did not quite work for me (maybe my mistake) http://www.oscommerce.com/forums/index.php?s=&...ndpost&p=118251 and same thread with SUBCATEGORY reference that $current_category_id works better than $cPath - http://www.oscommerce.com/forums/index.php?s=&...ndpost&p=118421 . Says edit for general.php and function grab for parent id

cpath reference? http://www.oscommerce.com/forums/index.php?s=&...indpost&p=89076

may help put parent category of a product in box? http://www.oscommerce.com/forums/index.php?s=&...ndpost&p=134194

a show sub-categories help: http://www.oscommerce.com/forums/index.php?s=&...ndpost&p=141213

$foo statement for /includes/modules/*.php pages?: http://www.oscommerce.com/forums/index.php?s=&...ndpost&p=149332



Pages I think would be involved:

  • index.php
  • /includes/header.php (if showing sub-category in heading)
  • /includes/boxes/categories.php (//add to or use for showing sub-category/parent catgeory name of a product? maybe function to grab)
  • /includes/boxes/specials.php (//to show sub-category/parent category name in specials?)
  • /includes/boxes/whats_new.php (//to show sub-category/parent category name)
  • /includes/classes/order.php (//to include the sub-category/parent-of-a-product in the order)
  • /includes/functions/database.php ?
  • /includes/functions/general.php (//put grab for parent category true for sub-categories? or use path to
  • category join with sub-category id? use path to products_to_category?)
  • /includes/functions/html_output.php (//session id?)
  • /includes/languages/english/index.php (//$category_depth ?)
  • /includes/languages/english/print_catalog.php (//MOD in use for listing products)
  • /includes/languages/english/prducts_new.php (***)
  • /includes/modules/new_products.php (//show parent category of new products in lists)
  • /includes/modules/print_catalog.php (//MOD to print products)
  • /includes/modules/product_listing.php (// add to $list_box_contents = array(); ?) and switch($column_list[$col])
  • /includes/modules/upcoming_product.php (// add to $expected_query = tep_db_query ?)



Using breadcrumb did not work because (also that breaks when looking up products by manufacture/label).


Using browse by category mod did not work because of needing to show sub-category that is parent of a product.


What do you think so fare? ANY suggestions are welcome and I will do my best to follow along. This mod would be amazing for those of us with products under sub-categories that need the sub-category text visible with every mention of the product.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...