Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Master Products - MS2


Guest

Recommended Posts

Thanks for the reply.

 

I just have the two regular buttons that say "New Category" and "New Product". Something went wrong. I'll try to install it again but I don't think my results will change. This will be my second installation on a clean copy of OSC 2.2. All I have to do is upload the catalog directory and the master.sql files right?

That should be correct. You are using osC 2.2 MS2, correct?

Link to comment
Share on other sites

Did I miss something on the install? I keep getting people buying my master producsts instead of the slave products. It is rather annoying as the master products don't have a price or shipping weight.

 

Having tried for weeks to work out how this is happening I find that if you click the description and then reviews there is an 'Add to Cart' link there which shouldn't exist.

 

Is there a quick fix?

Link to comment
Share on other sites

Is there a quick fix?

Comment this line in catalog/product_reviews_info.php

 

<?php
 }

 echo '<p><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now') . '">' . tep_image_button('button_in_cart.gif', IMAGE_BUTTON_IN_CART) . '</a></p>';
?>

 

Quick fix only - I'll attend to this properly in the next release.

 

Matti

Link to comment
Share on other sites

Hi

 

i'm in trouble:

1. i need to sort slave products by model but i don't know where can i change it.

2. it's possible to add link in slave product to go to it's master product? if it's not possible can somebody tell me the code to ad back button to go back? i tryed to use similar code used in the shopping cart but i can't obtain it.

3. if it's possible i need new field (with a number) in the slave products to force the order in the list... sometimes the 'model' number wasn't correlative; in this case i put letters before model to group those like A-22558, A-11388, B-22336, B-33695... (where the model was only 22558, 11388, 22336, 33695...) The question was for the possibility to add this new field in the admin and how will use this new value by slave products and how will be sorted by this number.

 

Thank's a lot for your patience... Any help would be appreciate.

 

PD: most important answer for this moment is to question number 1.

Link to comment
Share on other sites

Hi,

I tried adding v1.1.2 by making the appropriate changes, and unfortunately, I do not see any Master/Slave buttons. Any suggestions as to what file I missed or didn't finish? I was careful to make sure I edited all the files, but obviously I made a mistake somewhere.

 

No doubt I'll get it fixed just before v2 comes out :P

 

 

...Donovan

Link to comment
Share on other sites

Ah, it appears I missed a ton of changes in admin/categories.php somehow. And there is at least one change in there that is not identified by comments. Using xxdiff, hopefully I'll get everything fixed up :)

Link to comment
Share on other sites

Hi another time :P

 

i'm in the same trouble yet:

 

<b>1. i need to sort slave products by model but i don't know where can i change it. For the moment it list's as it wants</b> :)

 

2. Can I add link in slave product to go to it's master product?

if it's not possible can somebody tell me the code to ad back button to go back? i tryed to use similar code used in the shopping cart but i can't obtain it. In every change wich i did i obtain an error message...

 

3. if it's possible i need new field (with a number) in the slave products to force the order in the list... sometimes the 'model' number wasn't correlative; in this case i put letters before model to group those like A-22558, A-11388, B-22336, B-33695... (when the model was only 22558, 11388, 22336, 33695...) The question was for the possibility to add this new field in the admin and how will use this new value by slave products and how will be sorted by this number.

 

Thank's a lot for your patience...

Any help would be appreciate.

Link to comment
Share on other sites

It is a simple matter to add a 'sort order', just a little time consuming. The default sort order may be found in modules/master_products.php:

 

    if ( (!isset($HTTP_GET_VARS['sort'])) || (!ereg('[1-8][ad]', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) {
     for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
       if ($column_list[$i] == 'MASTER_LIST_NAME') {
         $HTTP_GET_VARS['sort'] = $i+1 . 'a';
         $master_sql .= " order by pd.products_name";
         break;
       }
     }
   }

 

Matti

Link to comment
Share on other sites

Master Products requires a little work, but it is a great learning experience and a must-have contribution! :wub:

 

I'd like to contribute back, just before v2 no doubt! :rolleyes: I wanted to use Ren? Reineke's code example to have the link for a slave product in the shopping cart link back to the master product...

 

This is a great starting point, but it has a flaw in it's design -- the system will use the master product's stock levels, etc. For starters, if the master product stock has a quantity of zero, there will be a message displayed saying such, and I'm guessing the price listed would be the master product's price as well...

 

To use my replacement solution, replace this (in shopping_cart.php around lines 120-130?):

 ? ? ?$products_name = '<table border="0" cellspacing="2" cellpadding="2">' .
? ? ? ? ? ? ? ? ? ? ? ' ?<tr>' .
? ? ? ? ? ? ? ? ? ? ? ' ? ?<td class="productListing-data" align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">' . tep_image(DIR_WS_IMAGES . $products[$i]['image'], $products[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>' .
? ? ? ? ? ? ? ? ? ? ? ' ? ?<td class="productListing-data" valign="top"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '"><b>' . $products[$i]['name'] . '</b></a>';

 

with this:

// Master Products (link back to master product from Shopping Cart) ? ? ?
? ? $master_prod = tep_db_query("select products_master, products_master_status
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? from " . TABLE_PRODUCTS . "
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? where products_id = '" . $products[$i]['id'] . "'");
? ? $master_prod_values = tep_db_fetch_array($master_prod);
? ? 
? ? if (($master_prod_values['products_master_status'] == 0) && ($master_prod_values['products_master'] != 0)) {
? ? ? $prod_link_id = $master_prod_values['products_master'];
? ? } else { $prod_link_id = $products[$i]['id']; }

? ? ?$products_name = '<table border="0" cellspacing="2" cellpadding="2">' .
? ? ? ? ? ? ? ? ? ? ? ' ?<tr>' .
? ? ? ? ? ? ? ? ? ? ? ' ? ?<td class="productListing-data" align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $prod_link_id) . '">' . tep_image(DIR_WS_IMAGES . $products[$i]['image'], $products[$i]['name'], SMALL_IMAGE_WIDTH,SMALL_IMAGE_HEIGHT) . '</a></td>' .
? ? ? ? ? ? ? ? ? ? ? ' ? ?<td class="productListing-data" valign="top"><a href="' .tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $prod_link_id) . '"><b>' . $products[$i]['name'] . '</b></a>';
// Master Products EOF

 

If there there is no master product for some reason, then the regular slave product info link will be used.

 

Next up, showing master+slaves in the count for each category is the next thing I want to change. While there may be many variations (sizes, etcetera) for a product, I don't consider them as separate products.

 

Cheers! B)

Link to comment
Share on other sites

Hi,

 

I'd like to offer music downloads.

The master is the CD with price=0, and then all the tracks as slaves.

All appears fine at the product page, but the slaves appear without their attribute, thus appear as a regular CD, rather than a download.

I have to go to the slave product page, and add it from there to the cart, leaving the whole Master Product quite useless...

 

Any suggestions to overcome the attribute problem???

Link to comment
Share on other sites

The next version is supposed to support attributes IIRC (read through this thread and the Announcements thread to see what I saw). In the meantime, if you are only selling downloadable CDs (i.e. all your products are Master CDs and Slave tracks), then you could fudge the code to treat all the products as downloadable.

 

Hth,

Matt

Always back up before making changes.

Link to comment
Share on other sites

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');

I've changed the qty field from drop-down to text input but the width of the input box is rather excessive. I can't seem to find where to adjust this. See it at http://www.genesispos.com/catalog/slave_items.jpg. Any suggestions? Thanks.

$lc_text = '<input type ="Text"name=Qty_ProdId_' . $listing['products_id'] . '" Size ="1" maxlength="2" value ="0" />';

 

 

That should fix your problem

 

Now how do I change "Select" to "Qty"?

Link to comment
Share on other sites

Hi

 

I tried to install this contribution as I think it will do exactly what I want - but although it all seemed to go fine it seemed to completely screw up my shop and I got loads of errors.

 

I have 'deinstalled' it - by going back to my backup.

 

I suspect I may have the wrong version of OSCommerce - how do you tell?

 

 

Christine

Link to comment
Share on other sites

Hi

 

I tried to install this contribution as I think it will do exactly what I want - but although it all seemed to go fine it seemed to completely screw up my shop and I got loads of errors.

 

I have 'deinstalled' it - by going back to my backup.

 

I suspect I may have the wrong version of OSCommerce - how do you tell?

 

 

Christine

Look in catalog/includes/application_top.php - you should have:

 

// define the project version
 define('PROJECT_VERSION', 'osCommerce 2.2-MS2');

 

Matti

Link to comment
Share on other sites

This mod kicks ass!!! It totally does what I need!

 

I only have one request.. Is there a way to make the slave products a child process in the categories menu? Rather than show up as it's own product per-se, have the ability to click on the product and then view the slave products that way? Either that or display the slave product directly beneat the master product to keep everything organized?

 

I ask this because I have roughly 150 rims to input into my website, each having roughly 4-6 different sizes and offsets. With the current setup, I will have more than 15 different products named 35-42mm!@% Here's a screenshot of what I'm thinking about..

 

screenie.jpg

 

Thanks!

Colin

Link to comment
Share on other sites

Rather than show up as it's own product per-se, have the ability to click on the product and then view the slave products that way? Either that or display the slave product directly beneat the master product to keep everything organized?

Yes - this has long been on the list and will feature in the next release.

 

Matti

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