Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Product Groups / Sub Product Contribution


assembler

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?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...