Jump to content
Johnson

Master Products - MS2

Recommended Posts

To display a different button for Slave/Master products in product_listing change the following lines in catalog/includes/modules/product_listing.php:

 

//Master Products            
           if ($listing['products_master_status'] != '1' && $listing['products_master'] == '0') {
           $lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ';
       } elseif ($listing['products_master'] != '0') {
           $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_master']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ';       
       } else {
           $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ';
       }	
//Master Products EOF  

 

to:

 

//Master Products            
           if ($listing['products_master_status'] != '1' && $listing['products_master'] == '0') {
           $lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ';
       } elseif ($listing['products_master'] != '0') {
           $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_master']) . '">' . tep_image_button('button_details.gif', IMAGE_BUTTON_DETAILS) . '</a> ';       
       } else {
           $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image_button('button_details.gif', IMAGE_BUTTON_DETAILS) . '</a> ';
       }	
//Master Products EOF

 

Create a button named 'button_details.gif' and upload it to your languages/english/images/buttons directory (if somebody has time to create a default osCommerce style button please pm me :D )

 

Add the following line (or similar) to languages/english.php:

 

define('IMAGE_BUTTON_DETAILS', 'Product Details');

 

 

Matti


Matti Ressler

 

We were all once expert at...... nothing

_____

Share this post


Link to post
Share on other sites

Help, Help I can't find why this error keeps coming up now that I finsihed loading Master_Products.

 

Can someone please help...

 

Warning: SAFE MODE Restriction in effect. The script whose uid is 10098 is not allowed to access /tmp/sess_9a89054f68596d67b74347f73c87634c owned by uid 48 in XXXX/XXXXXXXXX/XXXX/XXXX/catalog/admin/whos_online.php on line 109

 

Warning: file("/tmp/sess_9a89054f68596d67b74347f73c87634c") - Success in /admin/whos_online.php on line 109

 

Warning: Bad arguments to implode() in /ecom/catalog/admin/whos_online.php on line 110

 

 

Please...

Share this post


Link to post
Share on other sites

Hi

 

I hope this hasn't been asked before.

 

I just recreated my store (again) as it seems to be the simplest way to work out how things work.

 

I have added some sample products in categories...

 

e.g. Nappies, Pocket Nappies, Happy Heinys

 

The in the Happy Heinys category I have created a Master product "Large Happy Heiny" and slave products for each pattern... I hid the slaves and that works great in the Happy Heiny category because you just see the master one then when you click on you get the listing of patterns to choose from.

 

However, in the Pocket Nappies category there is a New Products box and that shows the Slaves and the Master... it is probably better if the items on display there are the Slaves, because in time the Master will not be new so its a good way of showcasing new designs.

 

Is there a way of turning off viewing master products in the New Products listings?

 

In the long term it would be nice if on each product whether it was a master or a slave there was a 'add to New Products' tick box.

 

 

 

Christine

Share this post


Link to post
Share on other sites

Help people... I don't know why thhe errors previously described are happening. I could really use some help.

 

And maybe Matti could explain what numbers are supposed to be used in admin/configuration/slave products. It seems the questions are yes and no but we use numbers to answer?????????? :(

Share this post


Link to post
Share on other sites
1) We are having a problem with the Master product not showing an "Add to Shopping Cart" button on the detailed page for that product. Am I doing something wrong here? I have tried it with slaves, without slaves, both the slave & master hidden together & seperatly.

 

Is there not a button at the bottom of the page?

 

2) With the slave hidden or shown it still does not show up under the master that we set it to.

 

Check the product quantity/status

 

3) On the main Categories page upon clicking on the Buy Now! button for the Master product it just takes you to the detailed page for that master product. It does not add it to the shopping cart like a normal product does. Is this how it is supposed to work or is it a bug?

 

Yes - this is how its supposed to work - the intention actually was to have it show a 'details' button instead - I just didn't have time as this is a pre-release and I am very busy - I shall post how to do this tonight.

 

4) What is the best way to use the "Products Master: (products_id)" feature? We have 5 different systems (masters) & each one uses the same exact slave except each system just has extra slaves. IE: System 1 has 1 slave, System 2 has 2 slaves & so on. I want to get a good id system going here. Any suggestions?

 

The current release doesn't handle multiple Master-Slave relationships at present - this is something being worked on for the next release.

 

5) Are you/we able to have shoppers choose between 2 slaves? IE: Product A (master) comes with a Fork (slave1) or a Knife (slave2).

 

Yes.

 

Matti

ccc

Matti, thank you for the reply. The answers to your questions are as follows...

 

1) No there is not a "Add to Shopping Cart" button on the details page of the master product. The "Write Review" button is there though.

 

2) The slave will show up under the category if I un hide it but not under it's master. I set the qut to 100000 & I am not sure what you mean by the status.

 

3) Thank you for the code to this. I will add it tonight.

 

4) Ok, so for now I will just have to add 15 of the same slave to be able to have each system have the same slave?

 

5) Ok, how do I do this? Are there instructions somewhere? Thanks for all the help, it is appreciated!

 

Lastly, Do you HAVE TO set a products_id? for a slave & if so can it have letters also?


Knowledge is Power!

Share this post


Link to post
Share on other sites

Christine,

 

Everything in the box OSC runs off of the calender day of your system when you input the product master. Go into your db and change this date to one which goes back 90 days. it will not appear under new items but the slaves will. So if the slaves are the new designs, then everytime you enter one it will appear under new items.

One thing to consider is the mod for Featured items, it might work better for you.

You can turn them on and off.

 

:D

Share this post


Link to post
Share on other sites

Hi, first off i must say this is a great script, but I was wondering is there anyway to put a product description section under the master product? So that when people checkout the product listings page, they can get a description for the slave items carried inside the master product? That way they won't see just the product name.

 

Also is it possible to make it so that when people do a search for an item, they don't see all the slave products in the search? As of now if you put a small product description in the slave item which is meant for the master product, people can search it and if they click on that item they'll see the small description. Instead of the master product.

 

Thanks.

Share this post


Link to post
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

I was wondering if anyone has a solution for this? I've read the past 24 pages and it seems I can't find a solution and a few others are having this same problem.

 

Thanks.

Edited by talon177

Share this post


Link to post
Share on other sites
I was wondering if anyone has a solution for this? I've read the past 24 pages and it seems I can't find a solution and a few others are having this same problem.

 

Thanks.

Not sure which of the two above you are referring to - if it is adding the slave to the basket then you most likely have a problem on product_info.php - post this file.

 

Your product listing description suggestion for Master products is a good one - I shall include this in the new release.

 

Matti


Matti Ressler

 

We were all once expert at...... nothing

_____

Share this post


Link to post
Share on other sites
Help people... I don't know why thhe errors previously described are happening. I could really use some help.

 

And maybe Matti could explain what numbers are supposed to be used in admin/configuration/slave products. It seems the questions are yes and no but we use numbers to answer?????????? :(

PM me a link to your phpinfo.

 

The numbers determine which order they display from left to right - 0 turns them off.

 

Matti


Matti Ressler

 

We were all once expert at...... nothing

_____

Share this post


Link to post
Share on other sites
In the long term it would be nice if on each product whether it was a master or a slave there was a 'add to New Products' tick box.

 

 

 

Christine

You could do this by adding:

 

and products_master_status != '1'

 

to the $new_products queries, but this would prevent any Master from showing there.

 

 

Matti


Matti Ressler

 

We were all once expert at...... nothing

_____

Share this post


Link to post
Share on other sites

Hello Matti,

 

With OSC development gearing towards the new features in php4, is Master Products being written to play nice in php3 ? That's the version my host is running.

 

Thanks, Charles


We stand in ignorance only for questions not asked. Plug up the leaks in your knowledge base and open up a flood of understanding.

Share this post


Link to post
Share on other sites

Version 2 is being developed for MS2 - then from that will progress to MS3 which will drop PHP3 compatibility.

 

Matti

Edited by Johnson

Matti Ressler

 

We were all once expert at...... nothing

_____

Share this post


Link to post
Share on other sites

Thanks Matti, along those lines, what do you think of my suggestion which I posted under Weekly Summary, but maybe it should have been under Contributions instead?

 

Charles

 

Link to suggestion


We stand in ignorance only for questions not asked. Plug up the leaks in your knowledge base and open up a flood of understanding.

Share this post


Link to post
Share on other sites
Thanks Matti, along those lines, what do you think of my suggestion which I posted under Weekly Summary, but maybe it should have been under Contributions instead?

 

Charles

 

Link to suggestion

I replied in the thread.

 

Matti


Matti Ressler

 

We were all once expert at...... nothing

_____

Share this post


Link to post
Share on other sites

I was wondering if anyone has a solution for this? I've read the past 24 pages and it seems I can't find a solution and a few others are having this same problem.

 

Thanks.

Not sure which of the two above you are referring to - if it is adding the slave to the basket then you most likely have a problem on product_info.php - post this file.

 

Your product listing description suggestion for Master products is a good one - I shall include this in the new release.

 

Matti

Thanks Johnson, for everything. I must say i love this script so much! I finally got my script fixed after hacking it for an hour.

 

Can't wait till v2 comes out!

Share this post


Link to post
Share on other sites

I was also wondering about the search engine, is there anyway to make it so that slaves won't be displayed in the search engine, but only the master itself.

 

For example if the master item was called rims

and the slaves was rim 17", rim 18", rim 19" blue

 

So when you do a search for "rims", "rims blue" "rims 19" u would see "rims" (The master link) only?

 

Thanks.

Share this post


Link to post
Share on other sites
I have installed Master Products v1.1.2 with Osc 2.2ms2.

 

Everything is good until I found this problem.

When displaying products of specified manufacture, You can not add product to shopping cart by "buy now" button in product_listing if that manufacture has "master" or "slave" product. It will prompt that "product not found".

 

Anyone has the same problem?

In /catalog/index.php,

 

replace,

 

// show the products of a specified manufacturer
? ?if (isset($HTTP_GET_VARS['manufacturers_id'])) {
? ? ?if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {
// We are asked to show only a specific category
? ? ? ?$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, 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 . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' 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)$HTTP_GET_VARS['filter_id'] . "'";
? ? ?} else {
// We show them all
? ? ? ?$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, 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 . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'";
? ? ?}
? ?} else {
// show the products in a given categorie
? ? ?if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {
// We are asked to show only specific catgeory
? ? ? ?$listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, 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 . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' 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 {
// We show them all

//Master Products
? ? ? ?$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 . "'";
//Master Products EOF
? ? ?}
? ?}

 

with,

 

// show the products of a specified manufacturer
? ?if (isset($HTTP_GET_VARS['manufacturers_id'])) {
? ? ?if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {
// We are asked to show only a specific category
? ? ? ?$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 . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' 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)$HTTP_GET_VARS['filter_id'] . "'";
? ? ?} else {
// We show them all
? ? ? ?$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 . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'";
? ? ?}
? ?} else {
// show the products in a given categorie
? ? ?if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {
// We are asked to show only specific catgeory
? ? ? ?$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 . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' 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 {
// We show them all

//Master Products
? ? ? ?$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 . "'";
//Master Products EOF
? ? ?}
? ?}

 

 

Also, I've noticed the same problem in the search results. I've managed to fix by making the following change.

 

In /catalog/advanced_search_result.php (around line 238),

 

replace,

 

 ?$select_str = "select distinct " . $select_column_list . " m.manufacturers_id, p.products_id, pd.products_name, p.products_price, 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 ";

 

with,

 

 ?$select_str = "select distinct " . $select_column_list . " m.manufacturers_id, p.products_id, pd.products_name, 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 ";

 

What I've basically done is just add products_master and products_master_status to the sql queries.

 

VJ

Thanks, that worked great!

Share this post


Link to post
Share on other sites

How do I keep slaves from showing up in the below blocks/pages? Some of our slaves have no price attached to them because their Master has the price so we really need to make sure they NEVER show up here >>

 

Quick Find / Advanced Search

Manufacturers

Bestsellers

New Products

 

What can we do to stop this?

Edited by MattMallory

Knowledge is Power!

Share this post


Link to post
Share on other sites
I made a minor modification of the script to allow me to view which products in the categories.php (/catalog/admin/categories.php) page were designated as "Master" and which were "Slave." Because I entered all my slave products with the same name(s) as the masters, it was impossible to tell with a simple glance at the list.

 

Here are my mods, if anyone's interested:

 

In the master products queries (around line 1420 in my copy) I simply added 'p.products_master_status' to each query:

//Master Products

? ? $products_count = 0;

? ? if (isset($HTTP_GET_VARS['search'])) {

? ? ? $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_quantity, p.products_image, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.products_master_status, p.products_listing_status, p2c.categories_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and pd.products_name like '%" . tep_db_input($search) . "%' order by pd.products_name");

? ? } else {

? ? ? $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_quantity, p.products_image, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.products_master_status, p.products_listing_status from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by pd.products_name");

? ? }

 

And then changed the table display based on $products['products_master_status'] down around lines 1455 (in my copy - your mileage may vary):

 

? ? ? ? ? ? ? ? <td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products['products_id'] . '&action=new_product_preview&read=only') . '">' . tep_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW) . '</a> ';

? ?

? if ($products['products_master_status'] == "1") {

?  echo '<span style="color: #00f;">' . $products['products_name'] . ' (Master)</span></td>';

? } else {

?  echo $products['products_name'] . '</td>';

? } ?>

 

Now, my products list displays as:

 

Black Leather Studded Belt - Master

Black Leather Studded Belt

Black Leather Studded Belt

 

(Mind you - if I had just entered all my content with a slightly different name for the slave items, I wouldn't have needed to go to this trouble. But I didn't, so I did. So there. :) )

 

 

HOWEVER...

 

Something odd has happened that I don't believe is related to the code I changed. Now, when I click on a product for a quick overview in the box to the right of the list, I get two sets of "Edit/Delete/Move/Copy To" buttons. The top set of buttons appears to relate to the master item - the "Edit" button, for example - while the bottom buttons appear to relate to a standard (slave) item. (See image below:)

 

oscommerce1.gif

 

I really have no idea what's going on. I removed my edits above from the script and the extra buttons were still there. Any ideas?

Thanks, this works great and doesn't have the double edit's on the left.

Share this post


Link to post
Share on other sites
How do I keep slaves from showing up in the below blocks/pages? Some of our slaves have no price attached to them because their Master has the price so we really need to make sure they NEVER show up here >>

 

Quick Find / Advanced Search

Manufacturers

Bestsellers

New Products

 

What can we do to stop this?

As stated on Page 7 by Johnson, you can hide the New products by:

 

For the new products box, in catalog/includes/modules/new_products.php change the $new_products_query to:

 

//Products_master
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 p.products_status = '1' and p.products_listing_status = '1' 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 p.products_listing_status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);
}
//Products_master EOF

 

To hide them in the 'What's New' box, in catalog/includes/boxes/whats_new.php change the $random_product query to:

 

//Products_master
if ($random_product = tep_random_select("select products_id, products_image, products_tax_class_id, products_price from " . TABLE_PRODUCTS . " where products_status = '1' and products_listing_status = '1' order by products_date_added desc limit " . MAX_RANDOM_SELECT_NEW)) {
//Products_master EOF

 

To hide them on the catalog/products_new.php page, update $products_new_query_raw to:

 

//Products_master
$products_new_query_raw = "select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_master, p.products_master_status, p.products_tax_class_id, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_listing_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_date_added DESC, pd.products_name";
//Products_master EOF

 

To hide them from the manufactuers:

 

Change the setting of Products Manufacturer to none on the product description page of the slave, as mentioned by someone in the previous pages.

 

For Quick Find/Advanced Search:

 

I'm still wondering the same, is there anyways when someone types in a keyword that belongs to the master or slave to only show the master product?

 

Thanks.

Share this post


Link to post
Share on other sites

is this all going to be in the next release?

 

Is there a sample site to see this BRILLIANT contrib working so I can get the full concept?

 

Joe

Share this post


Link to post
Share on other sites
is this all going to be in the next release?

 

Is there a sample site to see this BRILLIANT contrib working so I can get the full concept?

 

Joe

Yes.

 

There is a simple demo here (images are turned off in admin):

 

Master Products MS2 - demo

 

There are also links in the two threads to live sites using the contribution.

 

Matti


Matti Ressler

 

We were all once expert at...... nothing

_____

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

×