Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Master Products - MS2


Guest

Recommended Posts

I am looking at this contribution, and am not quite sure what it does. I thought that you can create a master product, and then create a slave product which has all of the master info already added in...

 

but it seems like the master is it's own product and the slaves are just another product...

 

what is the association??

 

I was looking to create a master product, and then the slaves would have the exact same info....

 

but it seems that each slave has to be totally added in via the admin....just like a regular product.....

 

if this is the case, why have the association? Just for the quantity changes??

Peter McGrath

-----------------------------

See my Profile (click here) for more information and to contact me for professional osCommerce support that includes SEO development, custom development and security implementation

Link to comment
Share on other sites

One use: attributes with stock handling. Make the Master a T-shirt w/ whatever on it. Make the slaves sizes. Now people can order multiple sizes on the same page and stock will be updated as needed. Good for someone who sells to school sports teams or other club like activities (i.e. in bulk with multiple sizes).

 

Second use: bundling. Make the Master a Gift Basket. Make the slaves into different gift items to go with the basket. Future versions may allow you to charge for the basket (the current version of the code would give away the basket for free) or you could change the code yourself.

 

Hth,

Matt

 

P.S. Couldn't you do what you were suggesting with the existing product copy mechanism? I.e. pick a product as a template and copy it to a new product with the same info then change as necessary?

Link to comment
Share on other sites

Hi,

 

I've installed this contrib. Wondering if someone could tell me how best to change the background of the box that lists the slave products? My background is black throughout the site with white text, i have been through the stylesheets and nothing there!

 

As this is a contrib that puts a new box on the product page would it be controlled within the new code? - had a look there too but couldnt see anything obvious. Pls i'm about to go live and enter all the products in but not much good if i cant see the slave products. Current master/slave box colour is white, text is white so appears that nothing is listed!!

 

Many thanks.

Link to comment
Share on other sites

It should get its color from the same place as the product listings, unless it's changed since the version that I installed. The CSS classes would be TD.productListing-data and the TR.productListing-odd and TR.productListing-even.

 

Hth,

Matt

Link to comment
Share on other sites

I have installed the package and have been trying to solve this problem (any help would be greatly appreciated):

 

I can not add the item to the cart only the slaves are added to the cart, when I change in product_info.php

if ($product_master['products_price']!= '0')

 

it switches and only the product adds to the cart and not the slaves???? :blink:

 

Thanks again.

Did you ever get an answer for this? I am having the same problem....

Link to comment
Share on other sites

First of all, this contribution is great. There is just one more thing I wish I code for it, and I was wondering if anyone could help.

 

Ok...I will be selling t-shirts, so I will use the sizes as an example for my slave products here. I would like it if when a slave products quantity reached 0, it would still be listed, but you just would not be able to add it to your cart. This is what my slave set up looks like in the product info page to begin with:

 

Model-------------------------Buy now

 

Small-----------------------------[0]

Medium --------------------------[0]

Large-----------------------------[0]

 

----------------------------Add to Cart

 

 

Ok, now say I ran out of medium shirts, I'd like something like this to show up (I use the model type for the size, so when I say medium within the example, it's just the model.

 

Model-------------------------Buy now

 

Small-----------------------------[0]

Sorry, we're all out of Medium!

Large-----------------------------[0]

 

----------------------------Add to Cart

 

 

If anyone could help me with that, I would be so grateful.

Link to comment
Share on other sites

think i saw some post somewhere related to changing the quantity select drop down box to a box which accepts a typed quantity - anyone know the code i could change to display this box?
Change (around line 165 of product_info.php):
tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute);

to

tep_draw_input_field('id[' . $products_options_name['products_options_id'] . ']', $selected_attribute);

If that doesn't work, try removing , $selected_attribute.

 

Hth,

Matt

Link to comment
Share on other sites

I would like it if when a slave products quantity reached 0, it would still be listed, but you just would not be able to add it to your cart.

Around lines 57-9 of includes/modules/master_products.php, comment out

        /*case 'MASTER_LIST_QUANTITY':
         $select_column_list .= 'p.products_quantity, ';
         break;*/

Around line 69, add p.products_quantity, just before p.products_id in the $master_sql definition, so it looks like this:

      $master_sql = "select  " . $select_column_list . " p.products_quantity, p.products_id,  p.manufacturers_id, p.products_model, p.products_image, p.products_tax_class_id, pd.products_name, s.specials_new_products_price, s.status, p.products_price, p.products_master, m.manufacturers_name from ". TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_id !=" . (int)$HTTP_GET_VARS['products_id'] . " and p.products_id = pd.products_id and p.products_master = '" . $thisquery['products_master'] . "' and p.manufacturers_id = m.manufacturers_id and p.products_status = '1' and pd.language_id = '" . (int)$languages_id . "'";

Around lines 159-186 of includes/modules/master_listing.php, change the buy_now case to (by adding if and new code in else):

          case 'MASTER_LIST_BUY_NOW': 
       if ($listing['products_quantity'] > 0) {
       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') . '">';
           $lc_align = 'center'; 
           $lc_valign = 'top'; 
           $lc_text = '<select name="Qty_ProdId_' . $listing['products_id'] . '" value="0" class="main" style="width: 40px">
                                                    <option value="0">0</option>
                                                    <option value="1">1</option>
                                                    <option value="2">2</option>
                                                    <option value="3">3</option>
                                                    <option value="4">4</option>
                                                    <option value="5">5</option>
                                                    <option value="6">6</option>                                                                       
                                                    <option value="7">7</option>
                                                    <option value="8">8</option>                                                                       
                                                    <option value="9">9</option>
                                                    <option value="10">10</option>                                                                     
                                                    <option value="11">11</option>
                                                    <option value="12">12</option>                                                                   
                                                    <option value="13">13</option>
                                                    <option value="14">14</option>                                                                             
                                                    <option value="15">15</option>
                                                    <option value="16">16</option>                                                                     
                                                    <option value="17">17</option>
                                                    <option value="18">18</option>                                                                     
                                                    <option value="19">19</option>
                                                    <option value="20">20</option>                                                                     
                        </select>'; 
       } else {
           $lc_align = 'center'; 
           $lc_valign = 'top'; 
           $lc_text = TEXT_OUT_OF_STOCK;
       }
break;

To includes/languages/english/product_info.php (or whatever language) add

  define('TEXT_OUT_OF_STOCK', 'Out of stock');

Edit wording as desired.

 

Hth,

Matt

Link to comment
Share on other sites

think i saw some post somewhere related to changing the quantity select drop down box to a box which accepts a typed quantity - anyone know the code i could change to display this box?
My previous post was incorrect. the place where you would make the change would be in includes/modules/master_listing.php, replace lines 163-185 with a new definition for $lc_text:
$lc_text = tep_draw_input_field('Qty_ProdId_' . $listing['products_id'], '0');

Hth,

Matt

Link to comment
Share on other sites

If you want to add the master product at the same time as you add the slaves, you can do so by adding a tep_draw_hidden_field('Qty_ProdId_' . $product_info['products_id'], 1) prior to the </form> in includes/modules/master_listing.php, around line 213:

        <td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_hidden_field('Qty_ProdId_' . $product_info['products_id'], 1) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></form></td>

Note: this change will affect all master products and will add the master every time the Add to Cart button is pressed.

 

Hth,

Matt

Link to comment
Share on other sites

Hello,

 

I'm desperatly trying to combine Master Products with UltraPics/HTMLArea but got into serious problems while trying to join the changes in categories.php.

 

This is a part of my categories.php with UltraPics installed:

 ? ? ?case 'update_product':
? ? ? ?if (isset($HTTP_POST_VARS['edit_x']) || isset($HTTP_POST_VARS['edit_y'])) {
? ? ? ? ?$action = 'new_product';
? ? ? ?} else {
? ? ? ?
// BOF MaxiDVD: Modified For Ultimate Images Pack!
? ? ? ? ? ?if ($HTTP_POST_VARS['delete_image'] == 'yes') {
? ? ? ? ? ? ? ?unlink(DIR_FS_CATALOG_IMAGES . $HTTP_POST_VARS['products_previous_image']);
? ? ? ? ? ?}
? ? ? ? ? ?if ($HTTP_POST_VARS['delete_image_med'] == 'yes') {
? ? ? ? ? ? ? ?unlink(DIR_FS_CATALOG_IMAGES . $HTTP_POST_VARS['products_previous_image_med']);
? ? ? ? ? ?}
? ? ? ? ? ?if ($HTTP_POST_VARS['delete_image_lrg'] == 'yes') {
? ? ? ? ? ? ? ?unlink(DIR_FS_CATALOG_IMAGES . $HTTP_POST_VARS['products_previous_image_lrg']);
? ? ? ? ? ?}
? ? ? ? ? ?if ($HTTP_POST_VARS['delete_image_sm_1'] == 'yes') {
? ? ? ? ? ? ? ?unlink(DIR_FS_CATALOG_IMAGES . $HTTP_POST_VARS['products_previous_image_sm_1']);
? ? ? ? ? ?}
? ? ? ? ? ?if ($HTTP_POST_VARS['delete_image_xl_1'] == 'yes') {
? ? ? ? ? ? ? ?unlink(DIR_FS_CATALOG_IMAGES . $HTTP_POST_VARS['products_previous_image_xl_1']);
? ? ? ? ? ?}
? ? ? ? ? ?if ($HTTP_POST_VARS['delete_image_sm_2'] == 'yes') {
? ? ? ? ? ? ? ?unlink(DIR_FS_CATALOG_IMAGES . $HTTP_POST_VARS['products_previous_image_sm_2']);
? ? ? ? ? ?}
? ? ? ? ? ?if ($HTTP_POST_VARS['delete_image_xl_2'] == 'yes') {
? ? ? ? ? ? ? ?unlink(DIR_FS_CATALOG_IMAGES . $HTTP_POST_VARS['products_previous_image_xl_2']);
? ? ? ? ? ?}
? ? ? ? ? ?if ($HTTP_POST_VARS['delete_image_sm_3'] == 'yes') {
? ? ? ? ? ? ? ?unlink(DIR_FS_CATALOG_IMAGES . $HTTP_POST_VARS['products_previous_image_sm_3']);
? ? ? ? ? ?}
? ? ? ? ? ?if ($HTTP_POST_VARS['delete_image_xl_3'] == 'yes') {
? ? ? ? ? ? ? ?unlink(DIR_FS_CATALOG_IMAGES . $HTTP_POST_VARS['products_previous_image_xl_3']);
? ? ? ? ? ?}
? ? ? ? ? ?if ($HTTP_POST_VARS['delete_image_sm_4'] == 'yes') {
? ? ? ? ? ? ? ?unlink(DIR_FS_CATALOG_IMAGES . $HTTP_POST_VARS['products_previous_image_sm_4']);
? ? ? ? ? ?}
? ? ? ? ? ?if ($HTTP_POST_VARS['delete_image_xl_4'] == 'yes') {
? ? ? ? ? ? ? ?unlink(DIR_FS_CATALOG_IMAGES . $HTTP_POST_VARS['products_previous_image_xl_4']);
? ? ? ? ? ?}
? ? ? ? ? ?if ($HTTP_POST_VARS['delete_image_sm_5'] == 'yes') {
? ? ? ? ? ? ? ?unlink(DIR_FS_CATALOG_IMAGES . $HTTP_POST_VARS['products_previous_image_sm_5']);
? ? ? ? ? ?}
? ? ? ? ? ?if ($HTTP_POST_VARS['delete_image_xl_5'] == 'yes') {
? ? ? ? ? ? ? ?unlink(DIR_FS_CATALOG_IMAGES . $HTTP_POST_VARS['products_previous_image_xl_5']);
? ? ? ? ? ?}
? ? ? ? ? ?if ($HTTP_POST_VARS['delete_image_sm_6'] == 'yes') {
? ? ? ? ? ? ? ?unlink(DIR_FS_CATALOG_IMAGES . $HTTP_POST_VARS['products_previous_image_sm_6']);
? ? ? ? ? ?}
? ? ? ? ? ?if ($HTTP_POST_VARS['delete_image_xl_6'] == 'yes') {
? ? ? ? ? ? ? ?unlink(DIR_FS_CATALOG_IMAGES . $HTTP_POST_VARS['products_previous_image_xl_6']);
? ? ? ? ? ?}
// EOF MaxiDVD: Modified For Ultimate Images Pack!
? ? ? ? ?if (isset($HTTP_GET_VARS['pID'])) $products_id = tep_db_prepare_input($HTTP_GET_VARS['pID']);
? ? ? ? ?$products_date_available = tep_db_prepare_input($HTTP_POST_VARS['products_date_available']);

? ? ? ? ?$products_date_available = (date('Y-m-d') < $products_date_available) ? $products_date_available : 'null';

? ? ? ? ?$sql_data_array = array('products_quantity' => tep_db_prepare_input($HTTP_POST_VARS['products_quantity']),
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_model' => tep_db_prepare_input($HTTP_POST_VARS['products_model']),
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_price' => tep_db_prepare_input($HTTP_POST_VARS['products_price']),
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_date_available' => $products_date_available,
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_weight' => tep_db_prepare_input($HTTP_POST_VARS['products_weight']),
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_status' => tep_db_prepare_input($HTTP_POST_VARS['products_status']),
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_tax_class_id' => tep_db_prepare_input($HTTP_POST_VARS['products_tax_class_id']),
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'manufacturers_id' => tep_db_prepare_input($HTTP_POST_VARS['manufacturers_id']));

// BOF MaxiDVD: Modified For Ultimate Images Pack!
? ? ? if (($HTTP_POST_VARS['unlink_image'] == 'yes') or ($HTTP_POST_VARS['delete_image'] == 'yes')) {
? ? ? ? ? ?$sql_data_array['products_image'] = '';
? ? ? ? ? } else {
? ? ? ? if (isset($HTTP_POST_VARS['products_image']) && tep_not_null($HTTP_POST_VARS['products_image']) && ($HTTP_POST_VARS['products_image'] != 'none')) {
? ? ? ? ? ?$sql_data_array['products_image'] = tep_db_prepare_input($HTTP_POST_VARS['products_image']);
? ? ? ? ?}
? ? ? ? ?}
? ? ? if (($HTTP_POST_VARS['unlink_image_med'] == 'yes') or ($HTTP_POST_VARS['delete_image_med'] == 'yes')) {
? ? ? ? ? ?$sql_data_array['products_image_med'] = '';
? ? ? ? ? } else {
? ? ? ? ?if (isset($HTTP_POST_VARS['products_image_med']) && tep_not_null($HTTP_POST_VARS['products_image_med']) && ($HTTP_POST_VARS['products_image_med'] != 'none')) {
? ? ? ? ? ?$sql_data_array['products_image_med'] = tep_db_prepare_input($HTTP_POST_VARS['products_image_med']);
? ? ? ? ?}
? ? ? ? ?}
? ? ? if (($HTTP_POST_VARS['unlink_image_lrg'] == 'yes') or ($HTTP_POST_VARS['delete_image_lrg'] == 'yes')) {
? ? ? ? ? ?$sql_data_array['products_image_lrg'] = '';
? ? ? ? ? } else {
? ? ? ? ?if (isset($HTTP_POST_VARS['products_image_lrg']) && tep_not_null($HTTP_POST_VARS['products_image_lrg']) && ($HTTP_POST_VARS['products_image_lrg'] != 'none')) {
? ? ? ? ? ?$sql_data_array['products_image_lrg'] = tep_db_prepare_input($HTTP_POST_VARS['products_image_lrg']);
? ? ? ? ?}
? ? ? ? ?}
? ? ? if (($HTTP_POST_VARS['unlink_image_sm_1'] == 'yes') or ($HTTP_POST_VARS['delete_image_sm_1'] == 'yes')) {
? ? ? ? ? ?$sql_data_array['products_image_sm_1'] = '';
? ? ? ? ? } else {
? ? ? ? ?if (isset($HTTP_POST_VARS['products_image_sm_1']) && tep_not_null($HTTP_POST_VARS['products_image_sm_1']) && ($HTTP_POST_VARS['products_image_sm_1'] != 'none')) {
? ? ? ? ? ?$sql_data_array['products_image_sm_1'] = tep_db_prepare_input($HTTP_POST_VARS['products_image_sm_1']);
? ? ? ? ?}
? ? ? ? ?}
? ? ? if (($HTTP_POST_VARS['unlink_image_xl_1'] == 'yes') or ($HTTP_POST_VARS['delete_image_xl_1'] == 'yes')) {
? ? ? ? ? ?$sql_data_array['products_image_xl_1'] = '';
? ? ? ? ? } else {
? ? ? ? ?if (isset($HTTP_POST_VARS['products_image_xl_1']) && tep_not_null($HTTP_POST_VARS['products_image_xl_1']) && ($HTTP_POST_VARS['products_image_xl_1'] != 'none')) {
? ? ? ? ? ?$sql_data_array['products_image_xl_1'] = tep_db_prepare_input($HTTP_POST_VARS['products_image_xl_1']);
? ? ? ? ?}
? ? ? ? ?}
? ? ? if (($HTTP_POST_VARS['unlink_image_sm_2'] == 'yes') or ($HTTP_POST_VARS['delete_image_sm_2'] == 'yes')) {
? ? ? ? ? ?$sql_data_array['products_image_sm_2'] = '';
? ? ? ? ? } else {
? ? ? ? ?if (isset($HTTP_POST_VARS['products_image_sm_2']) && tep_not_null($HTTP_POST_VARS['products_image_sm_2']) && ($HTTP_POST_VARS['products_image_sm_2'] != 'none')) {
? ? ? ? ? ?$sql_data_array['products_image_sm_2'] = tep_db_prepare_input($HTTP_POST_VARS['products_image_sm_2']);
? ? ? ? ?}
? ? ? ? ?}
? ? ? if (($HTTP_POST_VARS['unlink_image_xl_2'] == 'yes') or ($HTTP_POST_VARS['delete_image_xl_2'] == 'yes')) {
? ? ? ? ? ?$sql_data_array['products_image_xl_2'] = '';
? ? ? ? ? } else {
? ? ? ? ?if (isset($HTTP_POST_VARS['products_image_xl_2']) && tep_not_null($HTTP_POST_VARS['products_image_xl_2']) && ($HTTP_POST_VARS['products_image_xl_2'] != 'none')) {
? ? ? ? ? ?$sql_data_array['products_image_xl_2'] = tep_db_prepare_input($HTTP_POST_VARS['products_image_xl_2']);
? ? ? ? ?}
? ? ? ? ?}
? ? ? if (($HTTP_POST_VARS['unlink_image_sm_3'] == 'yes') or ($HTTP_POST_VARS['delete_image_sm_3'] == 'yes')) {
? ? ? ? ? ?$sql_data_array['products_image_sm_3'] = '';
? ? ? ? ? } else {
? ? ? ? ?if (isset($HTTP_POST_VARS['products_image_sm_3']) && tep_not_null($HTTP_POST_VARS['products_image_sm_3']) && ($HTTP_POST_VARS['products_image_sm_3'] != 'none')) {
? ? ? ? ? ?$sql_data_array['products_image_sm_3'] = tep_db_prepare_input($HTTP_POST_VARS['products_image_sm_3']);
? ? ? ? ?}
? ? ? ? ?}
? ? ? if (($HTTP_POST_VARS['unlink_image_xl_3'] == 'yes') or ($HTTP_POST_VARS['delete_image_xl_3'] == 'yes')) {
? ? ? ? ? ?$sql_data_array['products_image_xl_3'] = '';
? ? ? ? ? } else {
? ? ? ? ?if (isset($HTTP_POST_VARS['products_image_xl_3']) && tep_not_null($HTTP_POST_VARS['products_image_xl_3']) && ($HTTP_POST_VARS['products_image_xl_3'] != 'none')) {
? ? ? ? ? ?$sql_data_array['products_image_xl_3'] = tep_db_prepare_input($HTTP_POST_VARS['products_image_xl_3']);
? ? ? ? ?}
? ? ? ? ?}
? ? ? if (($HTTP_POST_VARS['unlink_image_sm_4'] == 'yes') or ($HTTP_POST_VARS['delete_image_sm_4'] == 'yes')) {
? ? ? ? ? ?$sql_data_array['products_image_sm_4'] = '';
? ? ? ? ? } else {
? ? ? ? ?if (isset($HTTP_POST_VARS['products_image_sm_4']) && tep_not_null($HTTP_POST_VARS['products_image_sm_4']) && ($HTTP_POST_VARS['products_image_sm_4'] != 'none')) {
? ? ? ? ? ?$sql_data_array['products_image_sm_4'] = tep_db_prepare_input($HTTP_POST_VARS['products_image_sm_4']);
? ? ? ? ?}
? ? ? ? ?}
? ? ? if (($HTTP_POST_VARS['unlink_image_xl_4'] == 'yes') or ($HTTP_POST_VARS['delete_image_xl_4'] == 'yes')) {
? ? ? ? ? ?$sql_data_array['products_image_xl_4'] = '';
? ? ? ? ? } else {
? ? ? ? ?if (isset($HTTP_POST_VARS['products_image_xl_4']) && tep_not_null($HTTP_POST_VARS['products_image_xl_4']) && ($HTTP_POST_VARS['products_image_xl_4'] != 'none')) {
? ? ? ? ? ?$sql_data_array['products_image_xl_4'] = tep_db_prepare_input($HTTP_POST_VARS['products_image_xl_4']);
? ? ? ? ?}
? ? ? ? ?}
? ? ? if (($HTTP_POST_VARS['unlink_image_sm_5'] == 'yes') or ($HTTP_POST_VARS['delete_image_sm_5'] == 'yes')) {
? ? ? ? ? ?$sql_data_array['products_image_sm_5'] = '';
? ? ? ? ? } else {
? ? ? ? ?if (isset($HTTP_POST_VARS['products_image_sm_5']) && tep_not_null($HTTP_POST_VARS['products_image_sm_5']) && ($HTTP_POST_VARS['products_image_sm_5'] != 'none')) {
? ? ? ? ? ?$sql_data_array['products_image_sm_5'] = tep_db_prepare_input($HTTP_POST_VARS['products_image_sm_5']);
? ? ? ? ?}
? ? ? ? ?}
? ? ? if (($HTTP_POST_VARS['unlink_image_xl_5'] == 'yes') or ($HTTP_POST_VARS['delete_image_xl_5'] == 'yes')) {
? ? ? ? ? ?$sql_data_array['products_image_xl_5'] = '';
? ? ? ? ? } else {
? ? ? ? ?if (isset($HTTP_POST_VARS['products_image_xl_5']) && tep_not_null($HTTP_POST_VARS['products_image_xl_5']) && ($HTTP_POST_VARS['products_image_xl_5'] != 'none')) {
? ? ? ? ? ?$sql_data_array['products_image_xl_5'] = tep_db_prepare_input($HTTP_POST_VARS['products_image_xl_5']);
? ? ? ? ?}
? ? ? ? ?}
? ? ? if (($HTTP_POST_VARS['unlink_image_sm_6'] == 'yes') or ($HTTP_POST_VARS['delete_image_sm_6'] == 'yes')) {
? ? ? ? ? ?$sql_data_array['products_image_sm_6'] = '';
? ? ? ? ? } else {
? ? ? ? ?if (isset($HTTP_POST_VARS['products_image_sm_6']) && tep_not_null($HTTP_POST_VARS['products_image_sm_6']) && ($HTTP_POST_VARS['products_image_sm_6'] != 'none')) {
? ? ? ? ? ?$sql_data_array['products_image_sm_6'] = tep_db_prepare_input($HTTP_POST_VARS['products_image_sm_6']);
? ? ? ? ?}
? ? ? ? ?}
? ? ? if (($HTTP_POST_VARS['unlink_image_xl_6'] == 'yes') or ($HTTP_POST_VARS['delete_image_xl_6'] == 'yes')) {
? ? ? ? ? ?$sql_data_array['products_image_xl_6'] = '';
? ? ? ? ? } else {
? ? ? ? ?if (isset($HTTP_POST_VARS['products_image_xl_6']) && tep_not_null($HTTP_POST_VARS['products_image_xl_6']) && ($HTTP_POST_VARS['products_image_xl_6'] != 'none')) {
? ? ? ? ? ?$sql_data_array['products_image_xl_6'] = tep_db_prepare_input($HTTP_POST_VARS['products_image_xl_6']);
? ? ? ? ?}
? ? ? ? ?}
// EOF MaxiDVD: Modified For Ultimate Images Pack!

? ? ? ? ?if ($action == 'insert_product') {
? ? ? ? ? ?$insert_sql_data = array('products_date_added' => 'now()');

? ? ? ? ? ?$sql_data_array = array_merge($sql_data_array, $insert_sql_data);

? ? ? ? ? ?tep_db_perform(TABLE_PRODUCTS, $sql_data_array);
? ? ? ? ? ?$products_id = tep_db_insert_id();

? ? ? ? ? ?tep_db_query("insert into " . TABLE_PRODUCTS_TO_CATEGORIES . " (products_id, categories_id) values ('" . (int)$products_id . "', '" . (int)$current_category_id . "')");
? ? ? ? ?} elseif ($action == 'update_product') {
? ? ? ? ? ?$update_sql_data = array('products_last_modified' => 'now()');

? ? ? ? ? ?$sql_data_array = array_merge($sql_data_array, $update_sql_data);

? ? ? ? ? ?tep_db_perform(TABLE_PRODUCTS, $sql_data_array, 'update', "products_id = '" . (int)$products_id . "'");
? ? ? ? ?}

? ? ? ? ?$languages = tep_get_languages();
? ? ? ? ?for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
? ? ? ? ? ?$language_id = $languages[$i]['id'];

? ? ? ? ? ?$sql_data_array = array('products_name' => tep_db_prepare_input($HTTP_POST_VARS['products_name'][$language_id]),
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_description' => tep_db_prepare_input($HTTP_POST_VARS['products_description'][$language_id]),
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_url' => tep_db_prepare_input($HTTP_POST_VARS['products_url'][$language_id]));

? ? ? ? ? ?if ($action == 'insert_product') {
? ? ? ? ? ? ?$insert_sql_data = array('products_id' => $products_id,
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'language_id' => $language_id);

? ? ? ? ? ? ?$sql_data_array = array_merge($sql_data_array, $insert_sql_data);

? ? ? ? ? ? ?tep_db_perform(TABLE_PRODUCTS_DESCRIPTION, $sql_data_array);
? ? ? ? ? ?} elseif ($action == 'update_product') {
? ? ? ? ? ? ?tep_db_perform(TABLE_PRODUCTS_DESCRIPTION, $sql_data_array, 'update', "products_id = '" . (int)$products_id . "' and language_id = '" . (int)$language_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 . '&pID=' . $products_id));
? ? ? ?}
? ? ? ?break;

 

###################

###################

 

and I'm unable to join it with Master Products version, which goes like that:

 

 ? ? ?case 'update_product':
? ? ? ?if (isset($HTTP_POST_VARS['edit_x']) || isset($HTTP_POST_VARS['edit_y'])) {
? ? ? ? ?$action = 'new_product';
? ? ? ?} else {
? ? ? ? ?if (isset($HTTP_GET_VARS['pID'])) $products_id = tep_db_prepare_input($HTTP_GET_VARS['pID']);
? ? ? ? ?$products_date_available = tep_db_prepare_input($HTTP_POST_VARS['products_date_available']);

? ? ? ? ?$products_date_available = (date('Y-m-d') < $products_date_available) ? $products_date_available : 'null';

? ? ? ? ?$sql_data_array = array('products_quantity' => tep_db_prepare_input($HTTP_POST_VARS['products_quantity']),
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_model' => tep_db_prepare_input($HTTP_POST_VARS['products_model']),
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_price' => tep_db_prepare_input($HTTP_POST_VARS['products_price']),
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_date_available' => $products_date_available,
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_weight' => tep_db_prepare_input($HTTP_POST_VARS['products_weight']),
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_status' => tep_db_prepare_input($HTTP_POST_VARS['products_status']),
// Master Products
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_listing_status' => tep_db_prepare_input($HTTP_POST_VARS['products_listing_status']),
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_tax_class_id' => tep_db_prepare_input($HTTP_POST_VARS['products_tax_class_id']),
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'manufacturers_id' => tep_db_prepare_input($HTTP_POST_VARS['manufacturers_id']),
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_master' => tep_db_prepare_input($HTTP_POST_VARS['products_master']));
// Master Products EOF



? ? ? ? ?if (isset($HTTP_POST_VARS['products_image']) && tep_not_null($HTTP_POST_VARS['products_image']) && ($HTTP_POST_VARS['products_image'] != 'none')) {
? ? ? ? ? ?$sql_data_array['products_image'] = tep_db_prepare_input($HTTP_POST_VARS['products_image']);
? ? ? ? ?}

? ? ? ? ?if ($action == 'insert_product') {
? ? ? ? ? ?$insert_sql_data = array('products_date_added' => 'now()');

? ? ? ? ? ?$sql_data_array = array_merge($sql_data_array, $insert_sql_data);

? ? ? ? ? ?tep_db_perform(TABLE_PRODUCTS, $sql_data_array);
? ? ? ? ? ?$products_id = tep_db_insert_id();

? ? ? ? ? ?tep_db_query("insert into " . TABLE_PRODUCTS_TO_CATEGORIES . " (products_id, categories_id) values ('" . (int)$products_id . "', '" . (int)$current_category_id . "')");
? ? ? ? ?} elseif ($action == 'update_product') {
? ? ? ? ? ?$update_sql_data = array('products_last_modified' => 'now()');

? ? ? ? ? ?$sql_data_array = array_merge($sql_data_array, $update_sql_data);

? ? ? ? ? ?tep_db_perform(TABLE_PRODUCTS, $sql_data_array, 'update', "products_id = '" . (int)$products_id . "'");
? ? ? ? ?}

? ? ? ? ?$languages = tep_get_languages();
? ? ? ? ?for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
? ? ? ? ? ?$language_id = $languages[$i]['id'];

? ? ? ? ? ?$sql_data_array = array('products_name' => tep_db_prepare_input($HTTP_POST_VARS['products_name'][$language_id]),
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_description' => tep_db_prepare_input($HTTP_POST_VARS['products_description'][$language_id]),
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'products_url' => tep_db_prepare_input($HTTP_POST_VARS['products_url'][$language_id]));

? ? ? ? ? ?if ($action == 'insert_product') {
? ? ? ? ? ? ?$insert_sql_data = array('products_id' => $products_id,
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'language_id' => $language_id);

? ? ? ? ? ? ?$sql_data_array = array_merge($sql_data_array, $insert_sql_data);

? ? ? ? ? ? ?tep_db_perform(TABLE_PRODUCTS_DESCRIPTION, $sql_data_array);
? ? ? ? ? ?} elseif ($action == 'update_product') {
? ? ? ? ? ? ?tep_db_perform(TABLE_PRODUCTS_DESCRIPTION, $sql_data_array, 'update', "products_id = '" . (int)$products_id . "' and language_id = '" . (int)$language_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 . '&pID=' . $products_id));
? ? ? ?}
? ? ? ?break;
//Master Products ? ? ? ?

 

I seriously need a solution because I need to be able to set different product weights and ids ! :((

 

Please give me a hand..

 

Greetz from Germany

Ren? Reineke

Edited by flynst4r
Link to comment
Share on other sites

It should get its color from the same place as the product listings, unless it's changed since the version that I installed. The CSS classes would be TD.productListing-data and the TR.productListing-odd and TR.productListing-even.

 

Hth,

Matt

Matt, Many thanks - i've slogged over 3 days trying to find this setting - your spot on - i didnt have any background reference set under this header. Your next answer to my question relating to the type the quantity Vs drop down i'll try this evening.

 

I do have one outstanding display issue with the box however. It doesn't appear to line up so well. The drop down column doesn't line up with the title and the far side of the box has a vacant column - no title above this, as if the box has over drawn horizontally? - i'm currently not hosted so can't show you? any ideas based on what i've said?

 

Thanks again for your help, really appreciate the time you've saved me.

 

Marc

Link to comment
Share on other sites

....similarly , i started with a base of OSC 2.2, installed

 

Master Products - MS2.

 

then

 

MS2 HTML WYSIWYG Editor, Product Desc, Email

 

Works ok, but i'm struggling getting the admin/categories.php working. Currently settled for designing my HTML page in frontpage and pasting the text into the box within OSC\admin - i havent updated the categories file to include the HTML contrib as i'd prefer the Master Products working completely.. It seems by leaving the updates of the HTML contrib i dont have the ability to edit the page within the OSc admin, but rather paste HTML into the box, which is then displayed correctly in the catalog.

 

So what i'd ideally like to do is get the Java applet working in categories.php so i can edit the pages within Osc admin without breaking the Master Products...anyone done this?

 

thanks

 

Marc

Link to comment
Share on other sites

Greetz,

 

I could finally merge the files more or less but now I'm stuck again.

 

http://www.hair-xperts.de/product_info.php/products_id/32

I am able to chose the amount of products but clicking on buy means -> 'empty cart' :(

 

Can't solve that.

 

Anybody able to help?

 

 

Thanks

Ren?

Edited by flynst4r
Link to comment
Share on other sites

I have to add something to my last post.

 

I believe that something in application_top.php might go wrong concerning "case: add_slave"

 

That's what I have got:

 ? ? ?//Master Products ? ? ? ? ? ? ? ? ? ? ? ? 
? ? ?// customer adds multiple products from the master_listing page
? ? ?case 'add_slave' : ? ?
? ? ? ? ? ? ? ? ? ? ? ? ? ? ?while ( list( $key, $val ) = each( $HTTP_POST_VARS ) ) { 
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if (substr($key,0,11) == "Qty_ProdId_") { 
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? $prodId = substr($key,11); 
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? $qty = $val; 
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if ($qty <= 0 ) continue; 

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? $cart->add_cart($prodId, $cart->get_quantity(tep_get_uprid($prodId, $HTTP_POST_VARS['id']))+($qty), $HTTP_POST_VARS['id']);
? ?	echo("$prodId<br>" . $HTTP_POST_VARS['id'] . "<br>" . $HTTP_POST_VARS['id'] . "<br><p>");
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} 
? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} 
? ? ? ? ? ? ? ? ? ? ? ? ? ? ?die;
? ? ? ? ? ? ? ? ? ? ? ? ? ? ?tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
? ? ? ? ? ? ? ? ? ? ? ? ? ? ?break; 
? ? ?//Master Products EOF

 

Trying to locate the source of the error I added a die() function, which gets executed (result: add_slave is called!) but nothing is returned by my echo function (maybe while(...) not workin')

 

a part of the form source follows (product_info.php/master_listing.php)

<!-- Master Products //--> ? ? ?

? ? ? ? ? ? ? ?<td width="10"><img src="images/pixel_trans.gif" border="0" alt="" width="10" height="1"></td>
? ? ? ? ? ? ?</tr>
? ? ? ? ? ?</table></td>
? ? ? ? ?</tr>
? ? ? ?</table></td>
? ? ?</tr>
? ? ?
? ? ?<tr>
? ? ? ?<td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="10"></td>
? ? ?</tr>



? <tr>
? ?<td align="left" class="main"> *Bitte wählen Sie unten die gewünschte Anzahl aus.</td>
? </tr>
? ? ?<tr>
? ? ? ?<td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="10"></td>
? ? ?</tr> ? 
? <tr>
? ?<td><form name="buy_now_" method="post" action="http://www.hair-xperts.de/product_info.php/cPath/21/products_id/32/sort/3a/[b]action/add_slave[/b]"><form name="buy_now_" method="post" action="http://www.hair-xperts.de/product_info.php/cPath/21/products_id/32/sort/3a/action/add_slave"><table border="0" width="100%" cellspacing="0" cellpadding="2" class="productListing">
?<tr>
? ?<td class="productListing-heading"> <a href="http://www.hair-xperts.de/product_info.php/cPath/21/products_id/32/page/1/sort/1a" title="Sortierung der Artikel ist aufsteigend nach Modell" class="productListing-heading">Modell</a> </td>
? ?<td align="center" class="productListing-heading"> Beschreibung </td>
? ?<td class="productListing-heading"> <a href="http://www.hair-xperts.de/product_info.php/cPath/21/products_id/32/page/1/sort/3d" title="Sortierung der Artikel ist absteigend nach Name" class="productListing-heading">Name+</a> </td>
? ?<td align="right" class="productListing-heading"> <a href="http://www.hair-xperts.de/product_info.php/cPath/21/products_id/32/page/1/sort/4a" title="Sortierung der Artikel ist aufsteigend nach Preis" class="productListing-heading">Preis</a> </td>
? ?<td align="center" class="productListing-heading"> Jetzt kaufen! </td>
?</tr>
?<tr class="productListing-odd">
? ?<td class="productListing-data"> 18-CS-1000 </td>
? ?<td class="productListing-data"> Dies ist die 1000ml version des prodkt </td>
? ?<td class="productListing-data"> 1.8 Color Saver Shampoo 1000 ml</a> </td>
? ?<td align="right" class="productListing-data"> 127,60? </td>
? ?<td align="center" class="productListing-data"><select name="Qty_ProdId_33" value="0" class="main" style="width: 40px">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <option value="0">0</option>
? ? ? ? ? ? ? ? ? ? ? ? ?<option value="1">1</option>
? ? ? ? ? <option value="2">2</option>
? ? ? ? ? ? ? ? ? ? ? ? <option value="3">3</option>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <option value="4">4</option>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <option value="5">5</option>
? ? ? ? ? <option value="6">6</option> ? ? ? ?	
? ? ? ? ? <option value="7">7</option>
? ? ? ? ? <option value="8">8</option> ? ? ? ?	
? ? ? ? ? <option value="9">9</option>
? ? ? ? ? <option value="10">10</option> ? ? ? ?	
? ? ? ? ? <option value="11">11</option>
? ? ? ? ? <option value="12">12</option> ? ? ? ?	
? ? ? ? ? <option value="13">13</option>
? ? ? ? ? <option value="14">14</option> ? ? ? ? ?
? ? ? ? ? <option value="15">15</option> ?
? ? ? ? ? <option value="16">16</option> ? ? ? ?	
? ? ? ? ? <option value="17">17</option>
? ? ? ? ? <option value="18">18</option> ? ? ? ?	
? ? ? ? ? <option value="19">19</option>
? ? ? ? ? ? ? ? ?<option value="20">20</option> ? ? ? ?	
? ? ? ? ? </select></td>
?</tr>
?<tr class="productListing-even">
? ?<td class="productListing-data"> 18-CS-500 </td>
? ?<td class="productListing-data"> 5500 </td>
? ?<td class="productListing-data"> 500 ml</a> </td>
? ?<td align="right" class="productListing-data"> 63,80? </td>
? ?<td align="center" class="productListing-data"><select name="Qty_ProdId_34" value="0" class="main" style="width: 40px">
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <option value="0">0</option>
? ? ? ? ? ? ? ? ? ? ? ? ?<option value="1">1</option>
? ? ? ? ? <option value="2">2</option>
? ? ? ? ? ? ? ? ? ? ? ? <option value="3">3</option>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <option value="4">4</option>
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? <option value="5">5</option>
? ? ? ? ? <option value="6">6</option> ? ? ? ?	
? ? ? ? ? <option value="7">7</option>
? ? ? ? ? <option value="8">8</option> ? ? ? ?	
? ? ? ? ? <option value="9">9</option>
? ? ? ? ? <option value="10">10</option> ? ? ? ?	
? ? ? ? ? <option value="11">11</option>
? ? ? ? ? <option value="12">12</option> ? ? ? ?	
? ? ? ? ? <option value="13">13</option>
? ? ? ? ? <option value="14">14</option> ? ? ? ? ?
? ? ? ? ? <option value="15">15</option> ?
? ? ? ? ? <option value="16">16</option> ? ? ? ?	
? ? ? ? ? <option value="17">17</option>
? ? ? ? ? <option value="18">18</option> ? ? ? ?	
? ? ? ? ? <option value="19">19</option>
? ? ? ? ? ? ? ? ?<option value="20">20</option> ? ? ? ?	
? ? ? ? ? </select></td>
?</tr>
</table>
? ? <table border="0" width="100%" cellspacing="0" cellpadding="2">
? ? ?<tr>
? ? ? ?<td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="10"></td>
? ? ?</tr>
? ? ?<tr> 
? ? ? ?<td class="main" align="right"><input type="hidden" name="products_id" value="32"><input type="image" src="includes/languages/german/images/buttons/button_in_cart.gif" border="0" alt="In den Warenkorb" title=" In den Warenkorb "></form></td> 
? ? </tr> 
? ? ?<tr>
? ? ? ?<td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="10"></td>
? ? ?</tr> 
? ? </table>
? ? 
? ? <table border="0" width="100%" cellspacing="0" cellpadding="2"> ? ? ? ? ?
? ? <tr>
? ? ? ?<td class="smallText">angezeigte Produkte: <b>1</b> bis <b>2</b> (von <b>2</b> insgesamt)</td>
? ? ? ?<td class="smallText" align="right">Seiten:  <b>1</b> </td>
? ? </tr>
? ?</table>
? ? ?<tr>
? ? ? ?<td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="10"></td>
? ? ?</tr>

</td>
? </tr>
? 
<!-- Master Products EOF //-->

Edited by flynst4r
Link to comment
Share on other sites

Now works very well, thank you Matti.

 

Idea for next version:

 

The dropdown quantity selector goes from 0 -> 20 on every product.  This would be more beneficial to go from 0 -> quantity in stock.

 

I will have a go at doing this when I finish my next project (if no-one does it in the meantime).

 

A very useful addition to Oscommerce - finally removing one of the big barriers to being able to deploy this to the business sector (rather than the "amateur business" sector) -> attributes stock levels.  Good work.

Thankyou Burt

 

I've been toying in my mind with what to do with the quantity select - basing it on stock becomes a problem if there is a great deal of stock - I definitely intend to add admin control of the select range - perhaps a stock option if it is not too difficult. Some people prefer a simple text field, so this needs to be an option also. Global settings are simple, but some also prefer control per product.... this also is a consideration.....

 

Attributes are the no.1 priority at the moment - this will multiply the usefulness of Master Products immensly... almost there, busy, busy....

 

Also in the works: - (Admin) easy identification of Master and Slave products - the abilty to select a Master and have Slaves listed with it . More control for Master products so they are purchasable - this will include a quantity select on product_info.php for the Master, maintaining a single Buy Now button. An option on the admin product edit page whether a slave will have its own product_info page or not.... I think perhaps a series of check boxes as to which pages a Slave will show on... products_new, specials etc.

 

Feedback/ideas are greatly appreciated.

 

Matti

Link to comment
Share on other sites

When I try add slaves to the cart I have

Your Shopping Cart is empty! (every time) :angry:

 

Why?

I use

Apache 1.3.29

PHP 4.3.4?

MySQL 4.0.16

 

at php.ini

register_globals=on

 

Can somebody help?

Try to replace function add_slave in catalog/includes/application_top.php

with the following:

 ? ? ?//Master Products ?ENDLICH ?BERHOLT!! Ren? Reineke 06.12.03 ? ? ? ? ? ? ? ? ? ? ? 
? ? ?// customer adds multiple products from the master_listing page
? ? ?case 'add_slave' : ? ?
? ? ? ? ? ? ? ? ? ? ? ? ? ? ?foreach ($HTTP_POST_VARS as $keyA => $valueA) {
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if (substr($keyA,0,11) == "Qty_ProdId_") { 
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? $prodId = substr($keyA,11); 
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if ($valueA <= 0 ) continue; 
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? $cart->add_cart($prodId, $cart->get_quantity(tep_get_uprid($prodId, $HTTP_POST_VARS['id']))+($valueA), $HTTP_POST_VARS['id']);
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?} 
? ? ? ? ? ? ? ? ? ? ? ? ? ? ?}
? ? ? ? ? ? ? ? ? ? ? ? ? ? ?tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
? ? ? ? ? ? ? ? ? ? ? ? ? ? ?break; 
? ? ?//Master Products EOF ? ? ?

Worked for me!

Edited by flynst4r
Link to comment
Share on other sites

Hello, I have a shop with attributes sorter and Mo Pics installed which leaves my admin/catagories.php hacked to hell. My php knowlege is not enough to copy and paste all the Master Products changes into the hacked up file...I was wondering if anyone could help?

Link to comment
Share on other sites

Hello, I'm new to php; I have been learning very quickly though! I have a problem that I am hoping someone can fix. I added the master slave contribution, and finally got it to play nice with my other contributions; however here is the problem that remains:

I have a master product with 2 slaves (color and sizes). When I select how many of a slave I want, the program only adds the master product and not the slave.

The only way I can add a slave is to click on the slave image, thus opening it's own product page, and then adding to the cart from there.

 

Also, my slave products are showing up in the "New products" box even though they are set no to show in the listing.

 

Thank you folks for all of the contributions and support you have provided. You are helping me reach my dream. I can't express enough how awesome you all are.

 

--Kristy

See you on the dark side,

Kristy

 

I'm just a girl living in captivity

Your rules of thumb makes me worrisome

Link to comment
Share on other sites

The dropdown quantity selector goes from 0 -> 20 on every product.  This would be more beneficial to go from 0 -> quantity in stock.
I think that it is enough to replace the $lc_text line in the buy_now case in includes/modules/master_listing.php (around lines 163-85) with
            $quantity_select_list = array();
           for ($i = 0, $n2 = (($listing['products_quantity'] < 20) ? $listing['products_quantity'] : 20); $i <= $n2; $i++) {
             $quantity_select_list[] = array('id' => $i, 'text' => $i);
           }
           $lc_text = tep_draw_pull_down_menu('Qty_ProdId_' . $listing['products_id'], $quantity_select_list, '0', 'class="main" style="width: 40px"');

Note that the 20 and the '0' could be replaced by admin settings and that the whole thing could be enclosed in an if statement that selects between the pull_down (code here) and an input field.

 

Hth,

Matt

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