Jump to content
Johnson

Master Products - MS2

Recommended Posts

I was wondering if anyone happens to know the code to make the Categories / Products list in the admin Categorized? I cant seem to find the code in categories.php

I saw that someone got it working but never posted a solution for it.

 

Thanks for any help

Share this post


Link to post
Share on other sites

When I try and upload the "master products" table I get the following error:

 

 

Output from uploaded SQL commands ..

 

 

ERROR 1062 at line 13: Duplicate entry '16' for key 1

 

that is this line:

 

INSERT INTO configuration_group VALUES (16, 'Slave Products', 'Slave Product Listing - configuration options', 16, 1);

 

anyone know whats wrong, experienced the same issue or have any advice as i'd like to implement this solution asap.

 

Thanks.

Edited by effour

Share this post


Link to post
Share on other sites
When I try and upload the "master products" table I get the following error:

 

 

Output from uploaded SQL commands ..

 

 

ERROR 1062 at line 13: Duplicate entry '16' for key 1

Set '16' to a higher value - look at the last entry in your configuration table and set this one as the next.

 

Matti


Matti Ressler

 

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

_____

Share this post


Link to post
Share on other sites
When I try and upload the "master products" table  I get the following error:

 

 

Output from uploaded SQL commands ..

 

 

ERROR 1062 at line 13: Duplicate entry '16' for key 1

Set '16' to a higher value - look at the last entry in your configuration table and set this one as the next.

 

Matti

Here are a some screen shots of the tables...I cant figure out what is meant by

 

"Set '16' to a higher value - look at the last entry in your configuration table and set this one as the next."

 

Thanks for the help.

 

config_group_table.gif

 

config_table.gif

Share this post


Link to post
Share on other sites
...I cant figure out what is meant by

 

"Set '16' to a higher value - look at the last entry in your configuration table and set this one as the next."

I'm sorry - its not very clear is it :blink:

 

Browse the table - we are looking for the highest entry for 'configuration_id' - change '16' in the master.sql file to one higher.

 

Matti

Edited by Johnson

Matti Ressler

 

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

_____

Share this post


Link to post
Share on other sites
...I cant figure out what is meant by

 

"Set '16' to a higher value - look at the last entry in your configuration table and set this one as the next."

I'm sorry - its not very clear is it :blink:

 

Browse the table - we are looking for the highest entry for 'configuration_group_id' - change '16' in the master.sql file to one higher.

 

Matti

According to the two bottom images (screenshots of my actual tables) that "higher value" should be "12" ??

 

I still get the error:

----

Output from uploaded SQL commands ..

 

 

ERROR 1062 at line 13: Duplicate entry '12' for key 1

----

 

Any Idea?

 

Thanks again.

 

 

config_group_table.gif

 

config_table.gif

Share this post


Link to post
Share on other sites

You are looking at the table structure - I said 'browse' - this will show you the table contents - look for the highest 'entry' under configuration_id in the table.

 

My bad on the name for the row :unsure:

 

Matti

Edited by Johnson

Matti Ressler

 

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

_____

Share this post


Link to post
Share on other sites

I must be missing something, can someone tell me how you set up items as master/slaves? I have the mod in and there are no errors, just can't find how you set it up.

 

Thanks

Ryan


If I was crafty, this would be a funny signature.

Share this post


Link to post
Share on other sites
I must be missing something,  can someone tell me how you set up items as master/slaves?  I have the mod in and there are no errors, just can't find how you set it up.

 

Thanks

Ryan

The settings are at the bottom of the admin->categories/products->product edit page.

 

There is also a 'create new master product' option - this is actually redundant on my development version - I will try to upload a few files on the weekend so this is available, as the new admin/categories.php is much simpler to integrate with existing mods.

 

Matti

Edited by Johnson

Matti Ressler

 

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

_____

Share this post


Link to post
Share on other sites

:blink: I got it now. I forgot to add all the admin files! Whoops!


If I was crafty, this would be a funny signature.

Share this post


Link to post
Share on other sites

Ok, I got it all set up, can someone give me step by step instructions on how to get these to work right? I want it so I can have:

 

Three Stone Ring (Master Product)

 

Then slaves listed as:

3 Topaz cost: $85.00 qty |___| buy now

3 Amethyst cost: $90.00 qty |___| buy now

 

etc...

 

Thanks

Edited by ryanf

If I was crafty, this would be a funny signature.

Share this post


Link to post
Share on other sites

Set the Master Product up with a zero dollar value - this will prevent it from having a quantity box so it can't be added to the cart - give it a stock quantity of 1

 

If the Master is the setting, simply give it the dollar value of the setting - then the customer can choose it along with the stone/s of choice - you may wish to modify the quantity select for the Master to a hidden field with the value of '1' by default so it is automatically added to the cart:

 

Once you have set up your Master Product it will appear in the Master Product drop menu in the products edit page - you can choose this for the Slaves you create.

 

If you wish only the Master to appear in new products and the catalog product listing set the Slave to 'Hide Product'.

 

There are 'Slave Listing' options in admin-> configuration where you can control the listing display

 

Matti

Edited by Johnson

Matti Ressler

 

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

_____

Share this post


Link to post
Share on other sites

Hey Matti,

 

Just wondering what happens in your new version of master products, for example if you set master product item to 0 dollars, there is no add to cart button, but lets say you have 5 slaves, and all those slave currently have 0 in the quantity box, and you click buy now, doesn't the master product get added to the cart? Mine is currently doing that and i'm using your previous verison of 1.1.2

Share this post


Link to post
Share on other sites
...I cant figure out what is meant by
"Set '16' to a higher value - look at the last entry in your configuration table and set this one as the next."
Browse the table - we are looking for the highest entry for 'configuration_id' - change '16' in the master.sql file to one higher.
This problem can be avoided by changing the SQL file to
INSERT INTO configuration_group VALUES ('', 'Slave Products', 'Slave Product Listing - configuration options', 16, 1);

SET @configuration_group_id = LAST_INSERT_ID();

INSERT INTO configuration VALUES ('', 'Display Slave Product Name', 'MASTER_LIST_NAME', '5', 'Do you wish to display the products name?', @configuration_group_id, 1, '2003-11-17 20:22:53', '2003-11-04 23:28:38', NULL, NULL);
INSERT INTO configuration VALUES ('', 'Display Slave Product Price', 'MASTER_LIST_PRICE', '13', 'Do you want to display the Product Price?', @configuration_group_id, 3, '2003-11-16 20:47:55', '2003-11-04 23:28:38', NULL, NULL);
INSERT INTO configuration VALUES ('', 'Display Slave Product Manufacturer Name', 'MASTER_LIST_MANUFACTURER', '0', 'Do you want to display the Product Manufacturer Name?', 16, 4, NULL, '2003-11-04 23:28:38', NULL, NULL);
INSERT INTO configuration VALUES ('', 'Display Slave Product Image', 'MASTER_LIST_IMAGE', '0', 'Do you want to display the Product Image?', @configuration_group_id, 8, '2003-11-10 21:38:06', '2003-11-04 23:28:38', NULL, NULL);
INSERT INTO configuration VALUES ('', 'Display Slave Product Model', 'MASTER_LIST_MODEL', '1', 'Do you want to display the Product Model?', @configuration_group_id, 2, '2003-11-16 22:10:58', '2003-11-04 23:28:38', NULL, NULL);
INSERT INTO configuration VALUES ('', 'Display Slave Product Quantity', 'MASTER_LIST_QUANTITY', '0', 'Do you want to display the Product Quantity?', @configuration_group_id, 6, '2003-11-09 22:49:47', '2003-11-04 23:28:38', NULL, NULL);
INSERT INTO configuration VALUES ('', 'Display Slave Product Weight', 'MASTER_LIST_WEIGHT', '0', 'Do you want to display the Product Weight?', @configuration_group_id, 5, NULL, '2003-11-04 23:28:38', NULL, NULL);
INSERT INTO configuration VALUES ('', 'Location of Prev/Next Navigation Bar (1-top, 2-bottom, 3-both)', 'MASTER_PREV_NEXT_BAR_LOCATION', '2', ' Sets the location of the Prev/Next Navigation Bar (1-top, 2-bottom, 3-both)', @configuration_group_id, 12, '2003-11-10 01:02:58', '2003-11-04 23:28:38', NULL, NULL);
INSERT INTO configuration VALUES ('', 'Display the Buy Now Column', 'MASTER_LIST_BUY_NOW', '10', 'Do you want to display the Buy Now column?', @configuration_group_id, 9, '2003-11-12 19:02:59', '2003-11-09 20:38:04', NULL, NULL);
INSERT INTO configuration VALUES ('', 'Display Slave Product Description', 'MASTER_LIST_DESCRIPTION', '2', 'Set to 0 to disable, set to 99 to enable.', @configuration_group_id, 10, '2003-11-17 19:02:49', '0000-00-00 00:00:00', NULL, NULL);
INSERT INTO configuration VALUES ('', 'Length of Truncated Product Description', 'MASTER_LIST_DESCRIPTION_LENGTH', '100', 'How many characters would you like to display?', @configuration_group_id, 11, '2003-11-10 23:36:52', '2003-11-10 18:51:26', NULL, NULL);

ALTER TABLE products ADD products_master int(11) NOT NULL default '0';
ALTER TABLE products ADD products_master_status tinyint(2) NOT NULL default '0';
ALTER TABLE products ADD products_listing_status tinyint(2) NOT NULL default '1';

Then one doesn't need to worry about synchronizing the rows in the configuration and configuration_group tables manually.

 

Hth,

Matt


Always back up before making changes.

Share this post


Link to post
Share on other sites

Hi Matti!

Great contrib!

 

I have the following contribs too:

- Admin Access With Levels 1.6.0

- CategoryBoxEnhancement_v1.1

- CustomerUpdateCartReminder_v20a

 

I have some errors after I installed the latest MP as shown on the picture.

No matter what is the language.

 

pm%20errors.jpg

 

On product _info pages if my product stock is 0 prods displays TEXT_STOCK.

The other problem is the TEXT_QUANTITY.

 

Im would like to go live without these mistakes.

 

Regards,

Andrew

Share this post


Link to post
Share on other sites
Hey Matti,

 

Just wondering what happens in your new version of master products, for example if you set master product item to 0 dollars, there is no add to cart button, but lets say you have 5 slaves, and all those slave currently have 0 in the quantity box, and you click buy now, doesn't the master product get added to the cart? Mine is currently doing that and i'm using your previous verison of 1.1.2

No - it doesn't get added unless it has a dollar value - in this case the quantity box will appear for the Master also.

 

Matti


Matti Ressler

 

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

_____

Share this post


Link to post
Share on other sites

OK!

 

This is the posted code .../english/product_info.php :

 

<?php

/*

$Id: product_info.php,v 1.15 2002/11/19 01:48:08 dgw_ Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Master Products - JOHNSON - 05/11/2003 matti@suomedia.com

 

Copyright © 2003 Suomedia - Dynamic Content Management

 

Released under the GNU General Public License

*/

//Master Products

define('TEXT_SLAVE_PRODUCTS', '*Please select the quantity for each item you wish to order and click the \'Add To Cart\' button below.');

//Master Products EOF

define('TEXT_PRODUCT_NOT_FOUND', 'Product not found!');

define('TEXT_CURRENT_REVIEWS', 'Current Reviews:');

define('TEXT_MORE_INFORMATION', 'For more information, please visit this products <a href="%s" target="_blank"><u>webpage</u></a>.');

define('TEXT_DATE_ADDED', 'This product was added to our catalog on %s.');

define('TEXT_DATE_AVAILABLE', '<font color="#ff0000">This product will be in stock on %s.</font>');

define('TEXT_ALSO_PURCHASED_PRODUCTS', 'Customers who bought this product also purchased');

define('TEXT_PRODUCT_OPTIONS', 'Available Options:');

define('TEXT_CLICK_TO_ENLARGE', 'Click to enlarge');

define('TEXT_QUANTITY', 'Select quantity: ');

define('TEXT_STOCK', '<font color="#ff0000"><b>Out of Stock</b></font>');define('TEXT_STOCK', '<font color="#ff0000"><b>Out of Stock</b></font>');

?>

 

Lines colored with red should move up between //Master Products and //Master Products EOF because my original code doesnt contains these lines and people like me wont copy these codes into their code so they will have the same errors.

The define('TEXT_STOCK', '<font color="#ff0000"><b>Out of Stock</b></font>'); line is duplicated is this necessary?

Just a piece of advice to make the contrib installation run perfect for dummys like me.

 

Cheers

Andrew B)

Share this post


Link to post
Share on other sites

hi guys!

 

 

what do I need to do, to change the quantity pulldown menu to an input field?

 

:huh:

Share this post


Link to post
Share on other sites

Just curious how I would have my master product display a price but not a quantity. If i set it to 0 it just displays an "out of stock message" - thought I read somewhere that that would make it not show up.

 

Thanks!

Share this post


Link to post
Share on other sites
Just curious how I would have my master product display a price but not a quantity. If i set it to 0 it just displays an "out of stock message" - thought I read somewhere that that would make it not show up.

 

Thanks!

Figured it out. just deleted some code from product_info and voila.

 

Still could use some help with the above issue i'm having.

 

thanks.

Share this post


Link to post
Share on other sites

Can someone explain this as it is in the instalation txt file?

 

Install the files - changes are marked in the files for those who wish to copy and paste.

Run the master.sql file on your database.

 

how do i run the master.sql?

 

tks

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

×