Jump to content



Latest News: (loading..)

- - - - -

Display a products categories infobox


This topic has been archived. This means that you cannot reply to this topic.
3 replies to this topic

#-19   EliteViper

EliteViper
  • Members
  • 11 posts

Posted 25 June 2011 - 06:07 PM

Hi everyone, I have an interesting question. I need to create a simple infobox in either the left or right column which will contain categories names. Its the opposite of the categories in the left column because it works backwards instead of forwards.

Basically if product #1 is in category1, category2, category4 and category6, when someone goes into the product_info.php page for products_id 1 the infobox should list all of the subcategories that contain this item, ONLY the final subcategories that contain this item, does anyone know how this might be accomplished?

Thanks

Steve

#-18   GemRock

GemRock
  • Members
  • 2,074 posts

Posted 26 June 2011 - 03:50 PM

itd be accomplishable, but why?
ken
commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).
over 20 years of computer programming experience.

#-17   EliteViper

EliteViper
  • Members
  • 11 posts

Posted 27 June 2011 - 02:17 PM

Well we sell ink and toner cartridges... there are obviously thousands of cartridges so what we are doing is making every printer model for example

"HP LaserJet M3035MFP"

as a category. Then the cartridges compatible with that printer will be put in as products inside that category.  However that cartridge will also be usable in a variety of other printers, so in order for a client to be able to see ALL the printers this cartridges will work in it will be linked to all the other categories of printers.  That is why I would need that category list to be displayed as an infobox in either the left or right column.  There will also be an infobox showing other cartridges that would fit in the printer so if you are on a yellow cartridge for a specific printer there will be a list of all the other colors and if there is a high yield version and everything that would fit into it.  It might sound bizarre but it is very necessary.

Thanks

#-16 ONLINE   kymation

kymation

    Believers

  • Community Sponsor
  • 6,698 posts

Posted 27 June 2011 - 05:35 PM

This should be easy. The products_to_categories database table contains all of the categories that a product appears in. Just join that table to the categories_description table on categories_id and pull the category names. Use an infobox from your version of osCommerce as a template to build your new infobox.

Regards
Jim
My Addons

Banners Box 2.3.x  Support
Categories Accordion Box 2.3.x  Support
Categories Images Box 2.2x  2.3.x  Support
Closest Shipper 2.2x  Support
Document Manager 2.2x  Support
Generic Box 2.3.x  Support
Get 1 Free 2.2x  Support
jQuery Banner Rotator 2.2x  2.3.x  Support
Modular Front Page 2.3.x  Support
Modular SEO Header Tags 2.3.x  Support
MVS 2.2x  Support
PDF Datasheet 2.3.x  Support
Price Updater 2.2x
Products Specifications 2.2x  2.3.x  Development Version  Support  Bugs/Suggestions
Request a Review 2.2x - 2.3.x  Support
Similar Products Box 2.2x
Specials Image Overlay 2.3x Support
Theme Switcher 2.3.x  Support