Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Sign in to follow this  

Product Groups / Sub Product Contribution

Recommended Posts

I'm looking for a contribution that will let me define products in my store as sub products, which can then be added to a main product.


I would like the main product info page to display the sub products, with the option of adding each of the sub products to the shopping cart. I would not like the sub products to be displayed in the product listings.


I am doing this because I need the products_model to be different on each of these sku's because of my order export module, but I want them to display on one product info page.


Does anyone know if a project like this exists? Would anyone be interested in assisting me?


I'm thinking the best way to do this would be to create a table called products_to_products...

/*Table structure for table `products_to_products` */

DROP TABLE IF EXISTS `products_to_products`;

CREATE TABLE `products_to_products` (
 `parent_products_id` int(11) NOT NULL,
 `child_products_id` int(11) NOT NULL,
 PRIMARY KEY  (`parent_products_id`,`child_products_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;


And then change all of the product queries to something like:

select p.products_id, pd.products_name, ptc.categories_id, ptp.parent_products_id FROM products p, products_description pd, products_to_categories ptc, products_to_products ptp WHERE p.products_id = pd.products_id AND pd.language_id = '1' AND p.products_id = ptc.products_id AND p.products_id != ptp.child_products_id;


It would then be pretty easy to pull up the sub products on the product info page, and display them with buy now links. I don't really know how the admin interface would work, but something using Ajax to add unlimited sub products would be great.


Can anyone suggest something different? Would this be the best approach in terms of performance?

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this