Jump to content
Johnson

Master Products - MS2

Recommended Posts

Hi,

 

any updates on the status of the add-on to this contribution that would allow a slave to show up under multiple masters?


"communicating your business message through the web"

 

Kevin Javitz

Share this post


Link to post
Share on other sites

i am also interested in having slaves show up under multiple masters - this would make the contrib. perfect.

Share this post


Link to post
Share on other sites
Yes :D I'm referring to this!!!!

 

Tnx very much!!!!

 

I have replace:

this

            $tmp_html = '<input type="text" name ="id[' . TEXT_PREFIX . $products_options_name['products_options_id'] . ']" size="' . $products_options_name['products_options_length'] .'" maxlength="' . $products_options_name['products_options_length'] . '" value="' . $cart->contents[$HTTP_GET_VARS['products_id']]['attributes_values'][$products_options_name['products_options_id']] .'">  ' . $products_options_name['products_options_comment'];

with this

            $tmp_html = '<input type="text" name ="id_' . TEXT_PREFIX . $HTTP_GET_VARS['products_id'] . '[' . $products_options_name['products_options_id'] . ']" size="' . $products_options_name['products_options_length'] .'" maxlength="' . $products_options_name['products_options_length'] . '" value="' . $cart->contents[$HTTP_GET_VARS['products_id']]['attributes_values'][$products_options_name['products_options_id']] .'">  ' . $products_options_name['products_options_comment'];

 

this

              $tmp_html .= tep_draw_radio_field('id[' . $products_options_name['products_options_id'] . ']', $products_options_array['products_options_values_id'], $checked);

with this

              $tmp_html .= tep_draw_radio_field('id_' . $HTTP_GET_VARS['products_id'] . '[' . $products_options_name['products_options_id'] . ']', $products_options_array['products_options_values_id'], $checked);

 

this

            echo tep_draw_checkbox_field('id[' . $products_options_name['products_options_id'] . ']', $products_attribs_array['options_values_id']);

with this

            echo tep_draw_checkbox_field('id_' . $HTTP_GET_VARS['products_id'] . '[' . $products_options_name['products_options_id'] . ']', $products_attribs_array['options_values_id']);

 

and this

        <td class="main"><input type="file" name="id[<?php echo TEXT_PREFIX . $products_options_name['products_options_id']; ?>]"><br><?php echo $cart->contents[$HTTP_GET_VARS['products_id']]['attributes_values'][$products_options_name['products_options_id']] . tep_draw_hidden_field(UPLOAD_PREFIX . $number_of_uploads, $products_options_name['products_options_id']) . tep_draw_hidden_field(TEXT_PREFIX . UPLOAD_PREFIX . $number_of_uploads, $cart->contents[$HTTP_GET_VARS['products_id']]['attributes_values'][$products_options_name['products_options_id']]); ?></td>

with this

        <td class="main"><input type="file" name="id_<?php echo TEXT_PREFIX . $HTTP_GET_VARS['products_id'] . '[' . $products_options_name['products_options_id']; ?>]"><br><?php echo $cart->contents[$HTTP_GET_VARS['products_id']]['attributes_values'][$products_options_name['products_options_id']] . tep_draw_hidden_field(UPLOAD_PREFIX . $number_of_uploads, $products_options_name['products_options_id']) . tep_draw_hidden_field(TEXT_PREFIX . UPLOAD_PREFIX . $number_of_uploads, $cart->contents[$HTTP_GET_VARS['products_id']]['attributes_values'][$products_options_name['products_options_id']]); ?></td>

 

and does it work well, would you know how to tell me if the last substitution is correct?

 

tnx againg, jo.

 

I am running into the same problem trying to integate MP Rev 4 with Option Type 1.71. I got most of it working and pulling through to the shopping cart, except for the text and textarea boxes. Any one have any ideas?

 

Has anyone updated the master_listing.php to allow for the different option types?

 

Any help would be greatly appreciated

---

Thanks,

Dorothy

Share this post


Link to post
Share on other sites

I was able to find the 'option' format to change the "slave" products but I was unable to find where to actually change the pulldown values for the Master product

 

In catalog/includes/modules/master_listing.php - you will see the 'option' format - this is easily added to.

 

Matti


My Contribution

Music Download Store Template

http://www.oscommerce.com/community/contributions,4275

Share this post


Link to post
Share on other sites

I made the changes but the slaves are still showing up in the NEW PRODUCTS field...

 

 

In catalog/includes/new_products.php change the db queries to:

 

 ?if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) {
? ?$new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where products_status = '1' and products_master = '0' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);
?} else {
? ?$new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' and products_master= '0' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);
?}

 

I have simply added:

 

and products_master = '0'

 

You could also use:

 

and products_listing_status = '1'

 

This latter will allow you to control which slaves show and which do not via the product edit page 'listing status' - perhaps the better option.

 

You can do the same in catalog/includes/boxes/whats_new.php and elsewhere  :D

 

Take a look at the  catalog/products_new.php included with the package for more ideas on how to control display.

 

Admin control of these and other parameters will feature in later versions of Master Products. The next release will display product attributes in the slave listing. I also intend to include an option whether or not individual slave products will link to their own product_info page (more info).

HTH

 

Matti


My Contribution

Music Download Store Template

http://www.oscommerce.com/community/contributions,4275

Share this post


Link to post
Share on other sites

Hello

 

I managed to get the Master Products working with the hidden products underneath. Is there a way for each hidden slave products to NOT be in the "Whats New" table and also NOT be included in the inventory count of the "categories" Info Box? I guess I am wanting them to be completely hidden, if that is possible and also not show up individually when you select a "manufacturer"?

 

url to store for reference: Store!

 

 

Thank you! This software is awesome and works very well, just wish I wasnt such a newb with it.

 

Best!

Share this post


Link to post
Share on other sites
Does Master Products have these features?

 

1) Allow slave products to be downloadable using the download contirbution?

 

2) Allow population of master products with Easy Populate if additional fields are added.  Would Easy Populate conflict with Master Products in any way?

 

3) Allow a discounted price when buying the master product as opposed to buying the slaves individually?

 

For example, we are selling individual music/song downloads here at http://www.latincoolnow.com and would like to start selling albums ...but by grouping songs into a master product/album.

 

So, any comments or suggestions would be helpful. If Master Product can do all of this now, can it with minor modifications? or am I best coding something from  scratch?

 

Thanks for any comments or feedback.

 

I am searching for the same solution, I couldn't find any replies to your original question...have you come up with anything yet...I am going to see if it is feasible to add the Bundles Contrib on top of the Master Slave Contrib

 

Steve

Share this post


Link to post
Share on other sites

okay....

http://musica360.com/store/product_info.php?products_id=33

 

on this page I can select all the tracks individually for this album and then download them no problem...

 

but if i choose to purchase the MASTER instead of all of the SLAVES individually, when i get to check out....

 

nothing happens....

 

 

is there a way to set this up so that when you choose to purchase the MASTER... all the SLAVES that make up that master, can be downloaded individually?


My Contribution

Music Download Store Template

http://www.oscommerce.com/community/contributions,4275

Share this post


Link to post
Share on other sites

The only workaround I can suggest is creating a zip file of all the tracks and including that as a slave, and sell that at a discounted price.

 

I spent several days messing around to see if it was possible to create a bundle out of the slaves but with my lack of programming skills got nowhere!!

 

Any joy with the radar/select buttons yet!!??

 

Steve

Share this post


Link to post
Share on other sites

I've been running an interchange store for almost 5 years. I'm looking forward to finishing the move over to osCommerce. I'm about to go live but I'm still stuck on getting Master Products and Option Type to work together. I need to be able to use input boxes, but the values are not following to the shopping cart.

 

I'm just a newb when it comes to php. Has anyone been able to get Master Products and Option Type working together?

 

 

Thanks,

Dorothy

Share this post


Link to post
Share on other sites

okay, now when i add one of the slaves on my master page and go through the checkout phase...

 

none of them present download links....

 

if I click on the slaves directly from the "Top Downloads/Best Sellers" column or a search and go through the whole download process.... the download appears....

 

any ideas?


My Contribution

Music Download Store Template

http://www.oscommerce.com/community/contributions,4275

Share this post


Link to post
Share on other sites

Strange...I have exactly the opposite situation!!!

 

I think I will get rid of the Search and Best Sellers dialogs, and then I won't have to deal with the problem.

 

Steve

Share this post


Link to post
Share on other sites

i think the problem may be some kind of conflict with osplayer....

originally in album view:

was the only place that you could listen to sounclips..... and you could purchase individual tracks in the this view with no problem...... but I had no soundclips if you pulled up a single track by itself...

 

so yesterday, i added soundclips to the individual tracks as well in case you click on a track directly in Top Downloads view.

 

But now when you purchase tracks in albumn view, the downloads don't appear....

 

 

 

what I would would to do is:

whenever someone tries up a single (slave) it will pull up the album (Master)....

 

is there a way to make this modification?

 

so that clicking on a slave will always bring up the master?


My Contribution

Music Download Store Template

http://www.oscommerce.com/community/contributions,4275

Share this post


Link to post
Share on other sites

Can someone help me?

(Again I am new to this).

I am installing my first contribution (Master products) and I think all i hve to do is first BACKUP, and then compare all of the files in the master products, to the files in my file manager, correct? I am using "beyond compare" to do that. I know that I am supposed to take anything I see in the MASTER PRODUCTS files, and copy it over to the file manager files, but what about vice versa? When I look at the MASTER PRODUCT FILES and compare to the files in my file manager, I am noticing that sometimes there is data in MY FILE MANAGER already that is NOT in the MASTER PRODUCT FILES, do I have to KEEP THAT INFO or do I overwrite that info? I hope I don't sound like a moron!

And i hope i am doing this right!

Share this post


Link to post
Share on other sites
Can someone help me? 

(Again I am new to this).

I am installing my first contribution (Master products) and I think all i hve to do is first BACKUP, and then compare all of the files in the master products, to the files in my file manager, correct?  I am using "beyond compare" to do that.  I know that I am supposed to take anything I see in the MASTER PRODUCTS files, and copy it over to the file manager files, but what about vice versa?  When I look at the MASTER PRODUCT FILES and compare to the files in my file manager, I am noticing that sometimes there is data in MY FILE MANAGER already that is NOT in the MASTER PRODUCT FILES, do I have to KEEP THAT INFO or do I overwrite that info? I hope I don't sound like a moron!

And i hope i am doing this right!

First off, is it a clean copy of OSCommerce?

 

If the answer is yes and you haven't changed anything with any other contributions then all you have to do is is copy the unzipped catalog into your current catalogue, as the Master Slave contribution is set up with all the sub folders in the right place.

 

It's that easy. Just open up your folder that contains the catalogue folder and paste the MS contibution catalog folder in it. (I am assuming you are using a windows PC)

It will prompt you with a warning re the same folders and files, just say yes and off you go

 

If on the other hand you have already installed other contributions then I suggest that you make alist of those files that were changed by the previous contributions and check them against the ones that are contained in the Master Slave contribution.

 

Use a program like STG Folder Print to look at the fully expanded folder/files within

each contribution as it makes seeing what each contribution has in the way of files

 

Only if there is an already ammended file do you have to worry about using Compare and Merge,

 

I am not sure what you mean when you talk about File Manager as you don't need to be using the catalog file manager when using Compare and Merge.

 

Just open the original file in one window in C&M and the Master Slave equivalent in the escond window

 

Don't forget to run the sql file that comes with the package

 

Good Luck, I hope this helps

 

Stev

Edited by Sierrab

Share this post


Link to post
Share on other sites

Thanki you SO MUCH! Yes i am planning on adding a few contributions so Ive been manually doing it;

What i mean is this though

I copied all my files to my hard drive, and opened it on the LEFT SIDE of the compare/merge

on the RIGHT SIDE i open the file from the Contribution. I use Beyond compare which makes RED any differences between the 2 files. I take any differences on the CONTRIBUTIONS SIDE and move it to the hard drive, but IN SOME i notice that there is a bunch of stuff in the HARD DRIVE SIDE that is NOT in the master products side , and when i move data from contribution side to the hard drive side, it sometimes OVERWRITES that extra data that is there, do u know what i mean? (and this is the first contribution i have done, so is this odd?)

thanks you were VERY HELPFUL!

Share this post


Link to post
Share on other sites
Oh dear, i did what you said and im getting all errors now ahhh

Errors are pretty much par for the course when you start, but they get less worrying after a month or so!!

 

I just installed a clean copy of OSC and copied the Master Products across OK to double check what I said. Before you run the "master.sql file that is part of the package, one error is returned. This error disapears after you have run the master.sql

 

If you are running this on a localhost server rather than across the Internet (I think it's always better to test locally before you work on the net....it's a lot quicker for one thing), then it may be a good idea to set-up a second virtual server and reinstall OSC on that and follow my instructions above.

 

As I said I just set up a clean OSC and installed MS (about 15 mins work) and it works fine

 

Another alternative would be to wipe your current OSC and start again

 

Just to double check are you running OSc2.2ms2 ond Master Products 1.1.5?

 

Finally once you have carried out my instructions, you will also need to download the Master Slave attributes package and carry out the instructions in that to make the whole thing work. (It's on the same page as the Master Products download)

 

It's actually called 15 Feb 2005 - Master Products Attributes Add-on Rev4 and can be found here http://www.oscommerce.com/community/contri...ch,Master+Slave

 

 

Steve

Share this post


Link to post
Share on other sites

I have the Master Slave working fine along with Download Controller.

 

As customers will only wish to buy 1 download I would like to have a checkbox appear on the Slaves page rather than the quantity box that I now have. I have looked at the option types contribution and also the add multi products checkbox contribution but the first is for various options and the latter adds the checkboxes on the "master" page rather than on the "slaves" page.

 

Has anyone come across a contribution that adds checkboxes to the slave listing page?

 

Or alternatively does anyone have a suggestion of how this might be achieved?

 

Steve

Share this post


Link to post
Share on other sites

I've got Master Products (sorta) working with UltraPics, Separate Price Per Customer (not really) and my other less related mods.

 

Right now, I am trying to figure out whats going on with my product_listing_status. Changing the radio button in admin doesn't change my product_listing_status for some reason. Changing it in phpMyAdmin seems to work, but obviously thats less ideal.

 

When I set a slave to not be listed, it isn't listed when viewing by manufacturer or category/manufacturer. However, the slaves show up when attempting to view products by category.

 

Where could I have gone wrong that is causing those issues? The files involved are huge so I'm not posting them unless someone wants me to, I can also post them on another server if anyone would kindly take a look.

 

Thanks for any ideas,

Garrett

Share this post


Link to post
Share on other sites

I'm pretty sure part of my problem are these lines from index.php. First line is the line from the MP contrib, second block is the Separate Pricing Per Customer block.

 

 $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_master, p.products_master_status, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.products_listing_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";

 

and then this code from SPPC:

 

// BOF Separate Pricing Per Customer
       if ($status_product_prices_table == true) {
       $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, tmp_pp.products_price, p.products_master, p.products_master_status, p.products_tax_class_id, IF(tmp_pp.status, tmp_pp.specials_new_products_price, NULL) as specials_new_products_price, IF(tmp_pp.status, tmp_pp.specials_new_products_price, tmp_pp.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . $product_prices_table . " as tmp_pp using(products_id), " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
       } else { // either retail or no need to get correct special prices
       $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_master, p.products_master_status, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS_RETAIL_PRICES . " s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
     } // end else { // either retail...
// EOF Separate Pricing per Customer

 

I'm just starting to learn php, and those lines really confuse me. I've no idea how to combine them.

Share this post


Link to post
Share on other sites

I am using Master Products to display a tshirt model and choose the slave models to specify the sizes to order. Currently all the slae products on the master product page have a drop down menu 1-20. I would like for that menu to be a text field where the customer can type in the quantity they choose or have the drop down menu reflect the actual quantity that is in stock for that size (slave product).

 

Also, is there any way to completely hide the slave products so that they dont get cycled through the "Whats New" info box or the "New in the month of . . . " info box? I tried installing the Featured Product Contribution but it only gave me a ton of errors, so I reverted back to whre I am at now. I also tried setting up attributes for sizes but the way that system works is counter productive for me, because customers can still go through and order a shirt model without selecting an attribute which leaves me without their information for delivery. The problem I am currently having is that I would like to have a T-shirt model shown and be able to order specific sizes, but dont want to have all the different sizes pile up in the products section. If anyone can think of a better way to take care of this problem I would greatly appreciate it.

 

Here is the URL for my store: http://www.axisofstevil.com/store

 

Thanks!

Steven

Share this post


Link to post
Share on other sites

Quantity Text Box:

 

Edit file: includes->modules-master_listing.php

locate switch satement:

case 'MASTER_LIST_BUY_NOW':

 

This is where quantity is built. You have three options in here controled by if,elseif and else.

// this is where it checks if Check Stock option is set to true and if stock is less then 1
if ((STOCK_CHECK == 'true')&&(tep_get_products_stock($listing['products_id']) < 1)) { 
$lc_text = TEXT_STOCK;
}
// if stock check is false and quantity is less than 1
elseif ((STOCK_CHECK == 'false')&&(tep_get_products_stock($listing['products_id']) < 1)) {
   $qty_array = array();
   for ($i=0; $ns = 20, $i <= $ns; $i++) {
       $qty_array[] = array('id' => $i, 'text' => $i); 
 } 
}
// if stock check is false and quantity is more than 1
else {
   $quantity = tep_get_products_stock($listing['products_id']); 
   $qty_array = array();
   for ($i=0; $ns = (($quantity < 20) ? $quantity : 20), $i <= $ns; $i++) {
       $qty_array[] = array('id' => $i, 'text' => $i); 
} 
}

If you dont care about the stock and has set it to false than you can safely comment out elseif code and replace the code in else block, above code will look like this.

if ((STOCK_CHECK == 'true')&&(tep_get_products_stock($listing['products_id']) < 1)) { 
$lc_text = TEXT_STOCK;
}
//         elseif ((STOCK_CHECK == 'false')&&(tep_get_products_stock($listing['products_id']) < 1)) {
//             $qty_array = array();
//             for ($i=0; $ns = 20, $i <= $ns; $i++) {
//              $qty_array[] = array('id' => $i, 'text' => $i); 
//              // tep_draw_input_field('Qty_ProdId_'.$product_info['products_id'],$cart->get_quantity($product_info['products_id']) ,'size="5"');
//              $lc_text = tep_draw_pull_down_menu('Qty_ProdId_' . $listing['products_id'], $qty_mos_next_idarray);                       
//              } 
//            }
else {
   //$quantity = tep_get_products_stock($listing['products_id']); 
   //$qty_array = array();
   //for ($i=0; $ns = (($quantity < 20) ? $quantity : 20), $i <= $ns; $i++) {
   //$qty_array[] = array('id' => $i, 'text' => $i); 

  // $lc_text = tep_draw_pull_down_menu('Qty_ProdId_' . $listing['products_id'], $qty_array);
           
// } 

/////////////////// this line generates the quantity text box 
 $lc_text = tep_draw_input_field('Qty_ProdId_'.$listing['products_id'],$cart->get_quantity($listing['products_id']) ,'size="10"');
}

This will always display text field for the slave quantity no matter what the stock is.

 

if you want drop down list based on actual quantity: Just replace the

for ($i=0; $ns = 20, $i <= $ns; $i++) {
AND
for ($i=0; $ns = (($quantity < 20) ? $quantity : 20), $i <= $ns; $i++)

with
     for ($i=0; $i <= $quantity; $i++){

 

 

To filter out slaves from new products :

Edit file: includes->modules-new_products.php

 

Add this filter to the where clause of the query, you can add this to any query where u want to filter out slave products:

p.products_status = '1' and p.products_listing_status = '1'

 

  if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) {
// start random new products
  $new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS_TO_CATEGORIES . " INNER JOIN `products` `p` ON (`products_to_categories`.`products_id` = `p`.`products_id`) left outer join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.products_listing_status = '1' AND categories_id < '8' order by p.products_date_added desc");
 } else {
   $new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' order by p.products_date_added desc limit " . MAX_RANDOM_SELECT_NEW);
// end random new products    
 }

Share this post


Link to post
Share on other sites

I had osc installed by an installer, I have no idea how to do all of the installing; also i did do the master.sql so i have no i dea why i keep getting errors. most of the errors look like this:

Fatal error: Class messagestack: Cannot inherit from undefined class tableboxmessagestack in /home/jawpi/public_html/catalog/includes/classes/message_stack.php on line 20

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

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

Create an account

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

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×