Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Parent/Child Products


LeeFoster

Recommended Posts

Hi,

 

I am looking for an addon that will allow me to create parent and child products and allow stock levels to be set against them. An example of this is below

 

Parent product is HTISP01

Child Product 1 is HTISP01-425-87-P92

Child Product 2 is HTISP01-450-87-P92

Child Product 3 is HTISP01-450-110-P92

 

Parent product will always show as long as there is one child product in stock.

 

Child product will be selected via radio button.

 

Does anyone know of addon that does this?

 

Thanks

 

 

Child Product 1 is HTISP01-425-87-P92

Link to comment
Share on other sites

@@ArtcoInc It's a little more complicated than that.

 

The parent product is based on the design on the product, it then has various options - weight, flex, curve - I want to be able to track stock based on all attributes.

 

Weights might be 425, 450, 475

Flex might be 87, 105, 110

Curve might be p92, p88, p106

 

So something might be available in 425-105-P92 but not 425-87-P92

So something might be available in a certain weight and curve but not in a flex.

Link to comment
Share on other sites

The addon QTPro allows stock control on attributes, and there are others in the addon area, but whether they will do exactly as you require you will have to find out.

 

There are also some master products addons that allow one product to be sold with other items to make a package of parts, but whether they can control stock I have no idea.

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

This is the section of changes I am not able to do, if anyone is more familiar with it.


---------------------------------------------------------------------------
20.) - catalog/product_info.php
---------------------------------------------------------------------------

FIND:

  require(DIR_WS_INCLUDES . 'template_top.php');
  
ADD RIGHT AFTER IT:

// Master Products
  $master_status_query = tep_db_query("select products_id, products_master_status, products_master from " . TABLE_PRODUCTS . " where products_status = '1' and products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");
  $master_check = tep_db_fetch_array($master_status_query);


  if ($master_check['products_master_status'] > 0 || $master_check['products_master'] == 0) { // this modify!!
    echo tep_draw_form('buy_now_', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=add_slave', 'NONSSL'));
  } else {
    echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product'));
  }
// Master Products EOF


FIND:

    $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");

REPLACE WITH:

//Master Products
   // $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
    $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_master_status, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
//Master Products EOF


FIND:

<?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')). 'action=add_product', 'NONSSL'), 'post', 'class="form-horizontal" role="form"'); ?>

REPLACE WITH:

<?php //echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')). 'action=add_product', 'NONSSL'), 'post', 'class="form-horizontal" role="form"'); ?>

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...