tgely Posted November 22, 2011 Share Posted November 22, 2011 Hi, i get stuck. If a customer puts a slave into the shopping cart, the master is added too. I can´t find out how to stop this. If a slave is selected, only the slave should be put into the shopping cart. Has anyone a tip for me? Thanks a lot Hi, look at backwards in this forum Quote osCommerce based shop owner with minimal design and focused on background works. When the less is more.Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store. Link to comment Share on other sites More sharing options...
univer Posted November 23, 2011 Share Posted November 23, 2011 @ gergely Posted 25 September 2011, 09:34 univer, on 24 September 2011, 21:34, said: i forgot to mention that i'm stucked while merging the file catalog/product_info.php here are the two files, who can do this? I'm trying since days without any succes Hi, We need to do new module for it. As soon as possible I will do it in extras. The tab page navigation not fix yet. Did you solve this problem already? Thank you. Quote Link to comment Share on other sites More sharing options...
diro5 Posted November 24, 2011 Share Posted November 24, 2011 Hi Gergely, thank you for your answer. I didn´t understand the solution given above, for me it seemed there is some information missing. But i found the point in my shop. This change in my application_top helped: case 'add_product' : if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) { $attributes = isset($HTTP_POST_VARS['id']) ? $HTTP_POST_VARS['id'] : ''; $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $attributes)), $attributes); // original: $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $attributes))+1, $attributes); Thank You Quote Link to comment Share on other sites More sharing options...
tgely Posted November 27, 2011 Share Posted November 27, 2011 Did you solve this problem already? Thank you. I am rebuilding an rc2.2a shop now. As soon as finish I will take it. Quote osCommerce based shop owner with minimal design and focused on background works. When the less is more.Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store. Link to comment Share on other sites More sharing options...
arlocalles Posted December 4, 2011 Share Posted December 4, 2011 Hi George I would like to ask you something about the Master/Slave contribution that you made for OSCommerce. It's a little difficult for me since it works but it doesn't let me add products with Downloadable attributes to the shopping cart when they are converted to Master products. But they CAN actually be added to the shopping cart when they are NOT master products. I'd really appreciate your help on this. This is a link of the site: http://voxpopulibooks.com/product_info.php?cPath=136&products_id=197 This is the master product which cannot be added to the cart as a downloadable product. And this one http://voxpopulibooks.com/product_info.php?cPath=136&products_id=181 is an example of a product which CAN be added to the shopping cart with Downloadable attributes. So in other words, all products with downloadable attributes (mp3 in this case) can actually be added to the shopping cart with the Download description or attribute EXCEPT when they are made into Master products, because after adding them to the cart, they don't keep the Download attribute. Quote Link to comment Share on other sites More sharing options...
arlocalles Posted December 4, 2011 Share Posted December 4, 2011 I forgot to mention that I am using OSCommerce 2.2 RC2a and Master Products Rc2a V1.25 Quote Link to comment Share on other sites More sharing options...
arlocalles Posted December 4, 2011 Share Posted December 4, 2011 This is the code for the product_info.php I am using. <?php /* $Id: product_info.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO); $product_check_query = tep_db_query("select count(*) as total 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_check = tep_db_fetch_array($product_check_query); //added by admin showing the master for slave products $master_query1 = tep_db_query("select products_id,products_master from " . TABLE_PRODUCTS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . " '"); $results1 = tep_db_fetch_array($master_query1); if (($results1['products_master'] != NULL) &&($results1['products_master'] != 0) ) { $HTTP_GET_VARS['products_id']=(int)$results1['products_master']; } //end of code added by admin showing the master for slave products ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> <script language="javascript"><!-- function popupWindow(url) { window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150') } //--></script> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="3" cellpadding="3"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <?php $master_status_query = tep_db_query("select p.products_master_status from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'"); $master_check = tep_db_fetch_array($master_status_query); if ($master_check['products_master_status'] > 0) { ?> <td width="100%" valign="top"><?php echo '<form name="buy_now_" method="post" action="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=add_slave', 'NONSSL') . '">'; ?><table border="0" width="100%" cellspacing="0" cellpadding="0"> <?php } else { ?> <td width="100%" valign="top"><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0"> <?php } // Master Products EOF if ($product_check['total'] < 1) { ?> <tr> <td><?php new infoBox(array(array('text' => TEXT_PRODUCT_NOT_FOUND))); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <?php } else { //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_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 $product_info = tep_db_fetch_array($product_info_query); tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'"); if ($new_price = tep_get_products_special_price($product_info['products_id'])) { $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>'; } else { $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); } if (tep_not_null($product_info['products_model'])) { $products_name = $product_info['products_name'] . '<br><span class="smallText">[' . $product_info['products_model'] . ']</span>'; } else { $products_name = $product_info['products_name']; } ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading" valign="top"><?php echo $products_name; ?></td> <td class="pageHeading" align="right" valign="top"><?php echo $products_price; ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="main"> <?php if (tep_not_null($product_info['products_image'])) { ?> <table border="0" cellspacing="0" cellpadding="2" align="right"> <tr> <td align="center" class="smallText"> <script language="javascript"><!-- document.write('<?php echo '<a href="javascript:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>'); //--></script> <noscript> <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?> </noscript> </td> </tr> </table> <?php } ?> <p><?php echo stripslashes($product_info['products_description']); ?></p> <?php $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'"); $products_attributes = tep_db_fetch_array($products_attributes_query); if ($products_attributes['total'] > 0) { ?> <table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main" colspan="2"><?php echo TEXT_PRODUCT_OPTIONS; ?></td> </tr> <?php $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name"); while ($products_options_name = tep_db_fetch_array($products_options_name_query)) { $products_options_array = array(); $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'"); while ($products_options = tep_db_fetch_array($products_options_query)) { $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']); if ($products_options['options_values_price'] != '0') { $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') '; } } if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) { $selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']]; } else { $selected_attribute = false; } ?> <tr> <td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td> <td class="main"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td> </tr> <?php } ?> </table> <?php } //Master Products if (tep_not_null($product_info['products_url'])) { ?> <tr> <td class="main"><?php echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false)); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } ?> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php if ($product_info['products_price']>0) { $qty_array = array(); for ($i=0; $n2 = (($product_info['products_quantity'] < 20) ? $product_info['products_quantity'] : 20), $i <= $n2; $i++) { $qty_array[] = array('id' => $i, 'text' => $i); } ?> <tr> <td align="right" class="main"><?php if ($product_info['products_quantity'] > 0) { echo TEXT_QUANTITY . ' ' . tep_draw_pull_down_menu('Qty_ProdId_' . $product_info['products_id'], $qty_array) ; } elseif ((STOCK_CHECK == 'false')&& ($product_info['products_quantity'] < 1)) { $qty_array = array(); for ($i=0; $ns = 20, $i <= $ns; $i++) { $qty_array[] = array('id' => $i, 'text' => $i); } echo TEXT_QUANTITY . ' ' . tep_draw_pull_down_menu('Qty_ProdId_' . $product_info['products_id'], $qty_array) ; } else { echo TEXT_STOCK; } echo tep_draw_separator('pixel_trans.gif', '30', '10'); ?> </td> </tr> <?php } ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '20'); ?></td> </tr> <?php $reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'"); $reviews = tep_db_fetch_array($reviews_query); if ($reviews['count'] > 0) { ?> <tr> <td class="main"><?php echo TEXT_CURRENT_REVIEWS . ' ' . $reviews['count']; ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) { ?> <tr> <td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td> </tr> <?php } else { ?> <tr> <td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td> </tr> <?php } ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php $master_query = tep_db_query("select products_id from " . TABLE_PRODUCTS . " where products_master = " . $HTTP_GET_VARS['products_id']); $results = tep_db_fetch_array($master_query); if (($results['products_id'] != NULL) && ($product_info['products_master_status'] == 1)) { ?> <tr> <td align="left" class="main"> <?php echo TEXT_SLAVE_PRODUCTS; ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><?php include(DIR_WS_MODULES . FILENAME_MASTER_PRODUCTS); ?></td> </tr> <?php } } ?> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <?php if ($reviews['count'] > 0) { ?> <td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?></td> <?php } ?> <td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td></form> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td> <?php if ((USE_CACHE == 'true') && empty($SID)) { echo tep_cache_also_purchased(3600); } else { include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS); } ?> </td> </tr> </table></td> <!-- Master Products EOF //--> <!-- body_text_eof //--> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Quote Link to comment Share on other sites More sharing options...
Geotex Posted December 4, 2011 Share Posted December 4, 2011 Master slave products, by design, only allow purchase of slaves. The master works kind of like a subcategory, except that the slave products can be anywhere on the system, including hidden or disabled directories. When someone clicks on a product or the master, all associated products are rounded up from wherever they are located and displayed in a meaningful display, with the Master providing a location to adequately describe and promote the whole group. Quote GEOTEX from Houston, TX (George) Link to comment Share on other sites More sharing options...
univer Posted December 6, 2011 Share Posted December 6, 2011 I am rebuilding an rc2.2a shop now. As soon as finish I will take it. ok, thank you do you have any idea in what time it could be done? Quote Link to comment Share on other sites More sharing options...
arlocalles Posted December 7, 2011 Share Posted December 7, 2011 I'm having this problem when I click on the contents of the Shopping Cart. I'm using OSC 2.2 RC2a and Master Products Rc2a V1.25 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '{9}23' at line 1 select products_id from products where products_master = 181{9}23 [TEP STOP] So this error is displayed in: product_info.php?products_id=181{9}23 Does anyone know why? I tried searching and it's not that fix they say for the offset at split_page_results.php since that page already comes with that fix. Quote Link to comment Share on other sites More sharing options...
tgely Posted December 29, 2011 Share Posted December 29, 2011 I'm having this problem when I click on the contents of the Shopping Cart. I'm using OSC 2.2 RC2a and Master Products Rc2a V1.25 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '{9}23' at line 1 select products_id from products where products_master = 181{9}23 [TEP STOP] So this error is displayed in: product_info.php?products_id=181{9}23 Does anyone know why? I tried searching and it's not that fix they say for the offset at split_page_results.php since that page already comes with that fix. Hi, it look like attributes values. Maybe something mixed with attributes codes. Regards, Gergely Quote osCommerce based shop owner with minimal design and focused on background works. When the less is more.Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store. Link to comment Share on other sites More sharing options...
tgely Posted December 29, 2011 Share Posted December 29, 2011 ok, thank you do you have any idea in what time it could be done? Hi, I use tab fix for myself in catalog/includes/modules/products_tabs.php /* <script type="text/javascript"> $(function() { $( "#tabs" ).tabs({ selected: <?php echo $selected_tab; ?> }); }); </script> */ ?> <script type="text/javascript"> $(function() { $( "#tabs" ).tabs({ cookie: { // store cookie for a day, without, it would be a session cookie expires: 1 } }); }); </script> Quote osCommerce based shop owner with minimal design and focused on background works. When the less is more.Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store. Link to comment Share on other sites More sharing options...
wood1e Posted February 5, 2012 Share Posted February 5, 2012 Hi, I am looking for some clarification/help. I have a client who has many products and product variations. At the moment we are using attributes, but this is a little clunky and long winded for the client, and so I am now looking at 'Master and Slave as a solution. But I am struggling to find sites using this contribution so see working examples...so my questions are: Can the slave products be a drop down box? Is the slave pricing $+x to the Master product, or can they be actual prices? Can 'Master/Slave' work with Attributes, for example attributes would still be used for variations that has no effect on price. like color. Apart from 'Delivery', 'installation' which would be $+x added to the Master price or the Slave variation price. Sorry for the number of questions, these are the ones I am still struggling to find answers to in the 120 pages of this help forum. Any help will be greatly appreciated. Quote Link to comment Share on other sites More sharing options...
tgely Posted February 8, 2012 Share Posted February 8, 2012 Can the slave products be a drop down box? Is the slave pricing $+x to the Master product, or can they be actual prices? Can 'Master/Slave' work with Attributes, for example attributes would still be used for variations that has no effect on price. like color. Apart from 'Delivery', 'installation' which would be $+x added to the Master price or the Slave variation price. Hi, I use master products with extra fields, but attributes works too. This project built in osCommerce V3 as parent-child concept. Free slave Drop down select not available at this moment. Forget price differencies (like works in attributes), master-slave is different. Every products are unique but can group with master product. Why dont you try it? You can install osCommerce v2.3.1 and dropp into master package. That's all. regards, Gergely Quote osCommerce based shop owner with minimal design and focused on background works. When the less is more.Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store. Link to comment Share on other sites More sharing options...
grellk Posted March 11, 2012 Share Posted March 11, 2012 Hi all. I am looking for a bit of help here, please be patient as I am quite new to osC and PHP in general. I am running a new install of 2.3.1 with The Master Products contrib in addition to QT Pro. The issue I am having is that during checkout the master product (purely a virtual placeholder) is removed from inventory however the two slave items are not. I do not know if I am missing something or if the interaction with the QT Pro addon is a possible cause. I am wondering if there is a way to force the quantity of the slave items to always be 1? This will be the case in my product and it may also resolve the issue. Any help would be appreciated for this osC noob. Thanks! Quote Link to comment Share on other sites More sharing options...
guettapan Posted March 19, 2012 Share Posted March 19, 2012 (edited) Hello, I used to master that works very well, but in the cart I want that when you remove the product slave, the master also removes product. Can you help me? I give the code to my basket $info_box_contents[$cur_row][] = array('align' => 'center', 'params' => 'class="productListing_image" valign="midlle" width="20px"', 'text' => '<a class="opacity_min" href="' . tep_href_link(FILENAME_SHOPPING_CART, 'action=remove_product&products_id=' . $products[$i]['id']) . '">' . tep_image(DIR_WS_ICONS . 'ndc_picto_bin.gif', TABLE_HEADING_REMOVE, 11, 13) . '</a>'); Sorry for my english thank you Edited March 19, 2012 by guettapan Quote Link to comment Share on other sites More sharing options...
ce7 Posted May 24, 2012 Share Posted May 24, 2012 Hi, Can anyone please help? I installed SPPC, stock tracking with Master Product in osC2.3.1, I got error message when delete the product and master product. Fatal error: Call to undefined function tep_remove_product() in \catalog\admin\categories.php on line 169 my categories.php code is as below: <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2010 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); require('includes/template_top.php'); // Line 619 // BOF Featured Products for v2.3.x _20120503_P060 //++++ QT Pro: Begin Added code //Create the product investigation for this product that are used in this page. $product_investigation = qtpro_doctor_investigate_product($HTTP_GET_VARS['pID']); //++++ QT Pro: End Added code // EOF Featured Products for v2.3.x _20120503_P060 require(DIR_WS_CLASSES . 'currencies.php'); $currencies = new currencies(); $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : ''); if (tep_not_null($action)) { switch ($action) { case 'setflag': if ( ($HTTP_GET_VARS['flag'] == '0') || ($HTTP_GET_VARS['flag'] == '1') ) { if (isset($HTTP_GET_VARS['pID'])) { tep_set_product_status($HTTP_GET_VARS['pID'], $HTTP_GET_VARS['flag']); } if (USE_CACHE == 'true') { tep_reset_cache_block('categories'); tep_reset_cache_block('also_purchased'); } } tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $HTTP_GET_VARS['cPath'] . '&pID=' . $HTTP_GET_VARS['pID'])); break; case 'insert_category': case 'update_category': if (isset($HTTP_POST_VARS['categories_id'])) $categories_id = tep_db_prepare_input($HTTP_POST_VARS['categories_id']); $sort_order = tep_db_prepare_input($HTTP_POST_VARS['sort_order']); $sql_data_array = array('sort_order' => (int)$sort_order); if ($action == 'insert_category') { $insert_sql_data = array('parent_id' => $current_category_id, 'date_added' => 'now()'); $sql_data_array = array_merge($sql_data_array, $insert_sql_data); tep_db_perform(TABLE_CATEGORIES, $sql_data_array); $categories_id = tep_db_insert_id(); } elseif ($action == 'update_category') { $update_sql_data = array('last_modified' => 'now()'); $sql_data_array = array_merge($sql_data_array, $update_sql_data); tep_db_perform(TABLE_CATEGORIES, $sql_data_array, 'update', "categories_id = '" . (int)$categories_id . "'"); } $languages = tep_get_languages(); for ($i=0, $n=sizeof($languages); $i<$n; $i++) { $categories_name_array = $HTTP_POST_VARS['categories_name']; $language_id = $languages[$i]['id']; $sql_data_array = array('categories_name' => tep_db_prepare_input($categories_name_array[$language_id])); if ($action == 'insert_category') { $insert_sql_data = array('categories_id' => $categories_id, 'language_id' => $languages[$i]['id']); $sql_data_array = array_merge($sql_data_array, $insert_sql_data); tep_db_perform(TABLE_CATEGORIES_DESCRIPTION, $sql_data_array); } elseif ($action == 'update_category') { tep_db_perform(TABLE_CATEGORIES_DESCRIPTION, $sql_data_array, 'update', "categories_id = '" . (int)$categories_id . "' and language_id = '" . (int)$languages[$i]['id'] . "'"); } } $categories_image = new upload('categories_image'); $categories_image->set_destination(DIR_FS_CATALOG_IMAGES); if ($categories_image->parse() && $categories_image->save()) { tep_db_query("update " . TABLE_CATEGORIES . " set categories_image = '" . tep_db_input($categories_image->filename) . "' where categories_id = '" . (int)$categories_id . "'"); } if (USE_CACHE == 'true') { tep_reset_cache_block('categories'); tep_reset_cache_block('also_purchased'); } tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&cID=' . $categories_id)); break; case 'delete_category_confirm': if (isset($HTTP_POST_VARS['categories_id'])) { $categories_id = tep_db_prepare_input($HTTP_POST_VARS['categories_id']); $categories = tep_get_category_tree($categories_id, '', '0', '', true); $products = array(); $products_delete = array(); for ($i=0, $n=sizeof($categories); $i<$n; $i++) { $product_ids_query = tep_db_query("select products_id from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$categories[$i]['id'] . "'"); while ($product_ids = tep_db_fetch_array($product_ids_query)) { $products[$product_ids['products_id']]['categories'][] = $categories[$i]['id']; } } reset($products); while (list($key, $value) = each($products)) { $category_ids = ''; for ($i=0, $n=sizeof($value['categories']); $i<$n; $i++) { $category_ids .= "'" . (int)$value['categories'][$i] . "', "; } $category_ids = substr($category_ids, 0, -2); $check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)$key . "' and categories_id not in (" . $category_ids . ")"); $check = tep_db_fetch_array($check_query); if ($check['total'] < '1') { $products_delete[$key] = $key; } } // removing categories can be a lengthy process tep_set_time_limit(0); for ($i=0, $n=sizeof($categories); $i<$n; $i++) { tep_remove_category($categories[$i]['id']); } reset($products_delete); while (list($key) = each($products_delete)) { tep_remove_product($key); } } if (USE_CACHE == 'true') { tep_reset_cache_block('categories'); tep_reset_cache_block('also_purchased'); } tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath)); break; case 'delete_product_confirm': if (isset($HTTP_POST_VARS['products_id']) && isset($HTTP_POST_VARS['product_categories']) && is_array($HTTP_POST_VARS['product_categories'])) { $product_id = tep_db_prepare_input($HTTP_POST_VARS['products_id']); $product_categories = $HTTP_POST_VARS['product_categories']; // BOF Separate Pricing Per Customer 1/6 tep_db_query("delete from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . tep_db_input($product_id) . "' "); // EOF Separate Pricing Per Customer 1/6 for ($i=0, $n=sizeof($product_categories); $i<$n; $i++) { tep_db_query("delete from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)$product_id . "' and categories_id = '" . (int)$product_categories[$i] . "'"); } $product_categories_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)$product_id . "'"); $product_categories = tep_db_fetch_array($product_categories_query); if ($product_categories['total'] == '0') { tep_remove_product($product_id); (--->this is line 169) } } if (USE_CACHE == 'true') { tep_reset_cache_block('categories'); tep_reset_cache_block('also_purchased'); Quote Link to comment Share on other sites More sharing options...
germ Posted May 24, 2012 Share Posted May 24, 2012 At some point in time you've copied the includes/functions/general.php from the catalog side to the admin side. That function is in the admin file, but not the catalog file. Quote If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
michellepchy Posted October 7, 2012 Share Posted October 7, 2012 Hello all i am new to oscommerce and have just installed it on my local machine to see if it will do what I need as the cart I am using at the moment can not handle what I need. Anyway I have just installed v2.3.3 and the add on master products v2.3x v2.0a to see if I can get it to do what I need. So far it is looking like it is going to be able to do what i want except for a few things that I need to change and would really appreciate it if anyone could help me out or point me in the right direction to achieve this. I have set up a master product called sailor costume with 0 price and 0 quantity, I have then set up 4 slaves to this small, medium, large and x large each one with a stock quantity and price assigned. The things I need to change are as follows; 1. Right now the master product is showing an out of stock message which I would like to get rid of. 2. When I add the slaves to the shopping cart the master product is added also which I do no want to happen. 3. When I add the slaves to the shopping cart I would like it to also show the name of the master product infront of the slave product name for example as of now it shows this small 1 29.99 I would like it to do this Sailor Costume Small 1 29.99. If I can get these sorted out then this mod is perfect for what I need I am hoping I can as this is a really great mod and i would love to be able to use it. Thank you in advance for any help anyone can offer me. Quote Link to comment Share on other sites More sharing options...
mumme1 Posted February 4, 2013 Share Posted February 4, 2013 Hi, I have slave products to almost all my products. The master products price is often zero. In the products listing i would like to have a function like this: If master_product_price = 0 then select all prices from the slave products. Then show the lowest price as the price in the product_listing. Lets say I have a master product called Pencils. The price is 0 to the master product. I have attached two slaves; Blue Pencil 3 € and Green Pencil 2 €. In the product listing i want: Pencil, price from 2€ (now it says Pencil 0€, and when i click on the master product I see the slaves) Quote Link to comment Share on other sites More sharing options...
fosterd Posted February 18, 2013 Share Posted February 18, 2013 Hi all, I have a large store currently using the 'master slave' contribution to show different sizes of costumes. Works brilliantly!! (check out www.justclowningaround.com.au/catalog/) HOWEVER, I am now trying to improve my site's Google ranking and found that I have 43,000 pages because each slave item has it's own new page (ie. I have a master page plus 3 slaves = 4 pages) These pages are seen by Google as duplicate pages and therefore destroys my ranking. So, does anyone know how to get around this problem? Can I "hide" my slave pages from Google somehow? opus_uno2001 1 Quote Link to comment Share on other sites More sharing options...
upnorth Posted July 19, 2013 Share Posted July 19, 2013 (edited) Hello, I've had a look through the later pages of this topic and googled for the last couple of days but can't find a solution to my query, which suprises me as I thought someone else would have this issue, or maybe it's a very simple solution that I've missed! I'm using Master Products on OSc 2.3.3 along with several other add-ons, with regard to Master Products I would like the customer to add quantities for the slaves for a single master product, then choose the number of master products required, resulting in the quantity of slaves being multiplied by the number of masters when added to the cart. I'm no programmer but have managed to create a quantity box next to the 'Add to cart' button via product_info.php (Section included below) but when added to the cart only the quantity of slaves entered in product_info.php along with the number of master copies is there, they have not been multiplied together to get a total number of slaves, once this is working I'll remove the master from the shopping cart. How do I multiply the number of slaves by the number of masters when passing to the shopping cart? (And how do I add code snippets?) Many thanks in anticipation. Bob. <code> <div class="buttonSet"> <span class="buttonAction"> <?php if ((STOCK_CHECK == 'true')&&(tep_get_products_stock($product_info['products_id']) < 1)&&($master_check['products_master_status'] == 0)) { echo TEXT_ENTER_QUANTITY . ": " . tep_draw_input_field('cart_quantity', '1', 'size=2') . " ", tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $product_info['products_id'])); } elseif ($product_info['products_master_status'] = "1"){ // Master Products echo "Copies : "; if ($product_info['products_quantity']>0) { $qty_array = array(); for ($i=0; $n2 = (($product_info['products_quantity'] < 20) ? $product_info['products_quantity'] : 20), $i <= $n2; $i++) { $qty_array[] = array('id' => $i, 'text' => $i); } ?> <p align="left" class="main"> <?php if ($product_info['products_quantity'] > 0) echo TEXT_QUANTITY . ' ' . tep_draw_pull_down_menu('Qty_ProdId_' . $product_info['products_id'], $qty_array, MASTER_PRODUCT_DEFAULT_QUANTITY); } elseif ((STOCK_CHECK == 'false') && ($product_info['products_quantity'] < 1)) { $qty_array = array(); for ($i=0; $ns = 20, $i <= $ns; $i++) { $qty_array[] = array('id' => $i, 'text' => $i); } echo tep_draw_input_field('Qty_ProdId_' . $product_info['products_id'], '1', 'size="4"') . " "; // echo tep_draw_input_field('Qty_ProdId_'.$product_info['products_id'],$cart->get_quantity($product_info['products_id']) ,'size="10"'); } else { echo TEXT_STOCK; } echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary'); } else { echo TEXT_ENTER_QUANTITY . ": " . tep_draw_input_field('cart_quantity', '1', 'size=2') . " ", tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary'); } </code> Edited July 19, 2013 by upnorth Quote Link to comment Share on other sites More sharing options...
wacisa Posted August 22, 2013 Share Posted August 22, 2013 Hello Have a simple questions. Is the Master Products V2.3x V2.1 download correct for osCommerce v2.3.3 ? Quote Link to comment Share on other sites More sharing options...
♥14steve14 Posted August 23, 2013 Share Posted August 23, 2013 Hello Have a simple questions. Is the Master Products V2.3x V2.1 download correct for osCommerce v2.3.3 ? Have a look here http://addons.oscommerce.com/info/7738 Quote REMEMBER BACKUP, BACKUP AND BACKUP Link to comment Share on other sites More sharing options...
♥Tsimi Posted March 7, 2014 Share Posted March 7, 2014 i installed this add-on on a vanilla osc 2.3.3.4 shop. i used the files that came with the latest version from Gergely. so far everything looks great except one thing. when i browse a product (not master and not slave) and choose lets say 3 from the quantity dropdown then only 1 product is added to the shopping cart and not 3. IF the product has a master or slave id then everything works just fine. i don't want to use this master slave system for "all" my products so it has to work with master/slave id and without. anyone has a fix for this? where should i look? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.