Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Master Products - MS2


Guest

Recommended Posts

I am sorry if this has been asked before. I installed a brand new store, and then installed master product 1.1.5, no error message, and then I import my existing database through mySQL, also says import successfully. but I got error message on the site, any help will be greatly appreciated. the errors are:

 

Under new product, I got:

 

1054 - Unknown column 'p.products_listing_status' in 'where clause'

 

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 products p left join 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 0

 

[TEP STOP]

 

under product list, I got:

 

1054 - Unknown column 'p.products_listing_status' in 'where clause'

 

select count(p.products_id) as total from products_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c left join 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 = '1' and p2c.categories_id = '27'

 

[TEP STOP]

Link to comment
Share on other sites

After installed master products, from the slave product table on the product info page, we will see 5 colums: Model / Description / Name+ / select / Price, I want to remove 2 colums, the Model and the Description, How to do it?

 

Many thanks for any help

Link to comment
Share on other sites

I'm still going through the hellishly long pages of this thread to find an answer, but perhaps someone can either answer or point me in the right direction to save my time and sanity.

 

I'm using the slave products primarily as quantity options. I'm working on a printing site that sells fixed quantities (1000, 2500, etc) of product but also needs the functioniality to sell multiples of those fixed quantities (i.e., 3x2500). The Master/Slave works perfectly for this and helps the shipping costs figure correctly.

 

HOWEVER, I need the following functionality which seems like it wouldn't be too difficult:

 

 

Master Product/Description

 

Master Options

 

Slave Products (Quantities)

 

(when add to cart is clicked, the master options are applied to whatever slaves are selected by the user and added to cart as one listing) for example: user chooses 14pt paper weight (master option) and 2x2500 quantity (slave options) and it lists in cart all together. i know there's a mod early on in this thread to get master and slave to add together, but a) doesn't seem to match current version of your contrib and b) would add as 2 separate products.

 

I know as well that I could add all the master options under each slave product, but that's precisely the mess I'm trying to avoid. Plus, I have some mods installed on the attributes (upload file, text fields) that don't even work properly under the [un-modified] slave products.

 

Ok, think that's it - any ideas?

 

nathan

Link to comment
Share on other sites

I know as well that I could add all the master options under each slave product, but that's precisely the mess I'm trying to avoid. Plus, I have some mods installed on the attributes (upload file, text fields) that don't even work properly under the [un-modified] slave products.

 

Specifically, I think i need to make the option type mod and master product play nice together. I'm okay with listing the main options under each slave, but I need at least text field and file upload to work from the option type mod. I found a couple posts (#1050,1051,1052) that claimed to cure this but so far nothing's worked for me. I'm somewhat of a noob, but after half a dozen manual contrib installations, this is the only thing that's given me problems.

 

Please help!

Edited by opinionate
Link to comment
Share on other sites

Has anyone figured out how to link a slave product to the master from the search results? There was an example earlier in the thread but it took regular products out of the search results for me :(

Also the lowest price slave idea is great if anyone can figure it out.

Link to comment
Share on other sites

Can I return to this query.

 

When a regular product is OOS it shows as 'Out of Stock'.

 

When a master product has slaves and the slaves appear below the master, any stock figures appear correcty in the slave products. However, the master which has no stock, shows as 'Out of Stock'.

 

Is there a way that I can hide stock qty (ie so no message appears) on Master Products?

 

Thanks

 

W

 

Hmm

 

Tried this but still shows as OOS. When I go back into the master it shows the Quantity as 0. (I deleted it previously so that it was blank).

 

W

Link to comment
Share on other sites

Can I return to this query.

 

When a regular product is OOS it shows as 'Out of Stock'.

 

When a master product has slaves and the slaves appear below the master, any stock figures appear correcty in the slave products. However, the master which has no stock, shows as 'Out of Stock'.

 

Is there a way that I can hide stock qty (ie so no message appears) on Master Products?

 

Thanks

 

W

 

 

In product_info.php simply comment: echo TEXT_STOCK;

 

Like this: //echo TEXT_STOCK;

 

Matti

Link to comment
Share on other sites

Thanks Matti

 

Just to check, if a regular product is OOS (ie not a master or slave), it will still show as OOS?

 

Thanks

 

W

 

In product_info.php simply comment: echo TEXT_STOCK;

 

Like this: //echo TEXT_STOCK;

 

Matti

Link to comment
Share on other sites

Ok, just checked that but I cannot do it.

 

If I comment out echo TEXT_STOCK then I dont get the drop down list on the regular products. Is there any way of doing an 'IF' statement so that if its a Master product then //echo TEXT_STOCK, else show it.

 

W

 

Thanks Matti

 

Just to check, if a regular product is OOS (ie not a master or slave), it will still show as OOS?

 

Thanks

 

W

Link to comment
Share on other sites

Hey folks,

 

I'm loving the contrib, but I'm having a conflict with the all products page. How do I filter out the slaves from allprod.php? I've read through the forums and found solutions for earlier versions of all products but for some reason I can get the syntax right on the newest version. The best I can figure is I need to alter this line of code from /catalog/allprod.php:

$listing_sql = "select p.products_id, p.products_model, pd.products_name, pd.products_description, p.products_image, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, p.products_date_added, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id $where order by pd.products_name";

but I'm at a total loss, unless I've been trying to alter the wrong code :blink:

 

Thanks a ton for any help. Once again, an amazing contrib

 

Cheers

Shane

Link to comment
Share on other sites

Hi

 

As an aside to this problem, if I wanted to remove the stock checking rule, is there a way to not offer a stock quantity on Master products within my store.

 

Again, I cannot comment out the code for the drop down box as this then remove the ability to buy regular products (ie non Master or Slave).

 

At the moment, I am either faced with offering actual stock quantites for regular and slave products, and showing the OOS message for master, or removing the stock checking rule and offering customers ability to buy any products, regular, master or slave.

 

For me, neither are desirable and I am keen to find a way to eliminate Master Products having stock figures.

 

Thanks all

 

W

 

Ok, just checked that but I cannot do it.

 

If I comment out echo TEXT_STOCK then I dont get the drop down list on the regular products. Is there any way of doing an 'IF' statement so that if its a Master product then //echo TEXT_STOCK, else show it.

 

W

Link to comment
Share on other sites

Hi all..

 

I want to use Master products for my product options.. only a small percentage of my products have attributes.. but those that do I would like to have master products showing the list (red, white etc.)

Does master products also track the stock?

 

I know there is an easypopulate contrib for MP - but just wonderign how this works? Does MP assign a master model number and then salve model numbers as well? Are these model numbers downloaded in EP?

 

Can someone give me a URL of an oscommerce site using MP? The osC site link on the original contrib announcement no longer works.

 

Thanks,

Natalie

Link to comment
Share on other sites

Hi all..

 

I want to use Master products for my product options.. only a small percentage of my products have attributes.. but those that do I would like to have master products showing the list (red, white etc.)

Does master products also track the stock?

 

I know there is an easypopulate contrib for MP - but just wonderign how this works? Does MP assign a master model number and then salve model numbers as well? Are these model numbers downloaded in EP?

 

Can someone give me a URL of an oscommerce site using MP? The osC site link on the original contrib announcement no longer works.

 

Thanks,

Natalie

 

 

Yes, you can track stock with slaves.

 

http://google-store.com

 

Matti

Link to comment
Share on other sites

hello johnson!

 

i have got the master product contribution and it works beautifully! thanks mate....

 

i have had a problem with the index.php and did email you for help without realising that you only support through this forum post...sorry!

 

my problem:

 

(quick background) i have problem from changing from mysql4 to msql5 and have found fix in the oscommerce update section. However the fix required to make changes to the INDEX.PHP. But the index.php from the Master Product have been modified and thus i have no idea where to make the changes

 

for a clear understanding of this problem please see post

 

http://www.oscommerce.com/forums/index.php?sho...40entry858640

 

please point me to the right direction: and you can ignore to my email ...sorry!

 

cheers

michael

Link to comment
Share on other sites

Did anybody include custom sort order contrib

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

in Master Slave Products?

 

I think it is not too difficult to use it in display of the slave-products under an master product, but my trial to change master_listing.php

 

from

	 if (($column_list[$col] != 'MASTER_LIST_BUY_NOW') && ($column_list[$col] != 'MASTER_LIST_IMAGE') && ($column_list[$col] != 'MASTER_LIST_MULTIPLE') && ($column_list[$col] != 'MASTER_LIST_DESCRIPTION') && ($column_list[$col] != 'MASTER_LIST_OPTIONS')) {
  $lc_text = tep_create_sort_heading($HTTP_GET_VARS['sort'], $col+1, $lc_text);

 

in

if ($column_list[$col] == 'PRODUCT_LIST_SORT_ORDER'){break;}
if (($column_list[$col] != 'MASTER_LIST_BUY_NOW') && ($column_list[$col] != 'MASTER_LIST_IMAGE') && ($column_list[$col] != 'MASTER_LIST_MULTIPLE') && ($column_list[$col] != 'MASTER_LIST_DESCRIPTION') && ($column_list[$col] != 'MASTER_LIST_OPTIONS') && ($column_list[$col] != 'PRODUCT_LIST_MULTIPLE')) {
  $lc_text = tep_create_sort_heading($HTTP_GET_VARS['sort'], $col+1, $lc_text);

 

failed. I thought modification is similar to product_listing.php.

Did anyone this before?

The Attrib Modification for Master Slave products has also no effect on sort order of slave products.

Link to comment
Share on other sites

Hi,

 

can anybody help me with this, I am very sorry if this question been asked before.

I got my master product 1.1.5 installed, copy and paste every file. but when I ran the master.sql. it shows error

 

Error

 

SQL-query :

 

ALTER TABLE products ADD products_master int( 11 ) NOT NULL default '0'

 

MySQL said:

 

 

#1060 - Duplicate column name 'products_master'

 

any idea?

:'(

Link to comment
Share on other sites

Thought I had it all working but...

I can add slave items to the shopping cart, I can add master items to the shopping cart but NORMAL items will not go into the shopping cart.

 

Any idea what I have wrong?

 

Thanks for any advice.

Link to comment
Share on other sites

I figured out why I could not add Non-master & non-slave items to the shopping cart. I removed the drop down entry on the master. This must stay. I plan on changing it and making it a hidden field.

 

I hope this helps someone else.

 

Great contribution by the way.

Link to comment
Share on other sites

First, Matti's dedication to this contrib for such a long time is impressive. Second, Tracy, that was quite a clever fix.

 

For me, the fix will not work because of the "client factor", nor will Xen's fixes mentioned on Page 47. I need to be able to turn the product admin over to the client, and probably some college kid they hire to do data entry. They will goof something up for sure when it comes to the commas and they would absolutlely have no clue about using phpmyadmin or any other tool to manage a new table for products_to_master. Catalog is going to be in excess of 20000 products and this is already a huge issue with only 1500 entered. Unfortunately, we added all slaves for a whole category.... about 400 products... it worked GREAT! So we did the other categories, only to discover that the slaves were showing up on any master that contained any of the numbers (such as the 18 slaves showing up for 188 as Tracy mentions).

 

I've scoured the threads... Is there any solution that will eliminate Slaves from showing up on unassigned Masters without having to jump through hoops? .... Just enter a slave, assign its master's, and it works "out of the box"....

 

Thanks for any help on the issue... Great contribution for sure

 

This is for those who have large stores like mine. Eventually someone will run into the same problem I did. To cap real quick, I had so many masters that one master was id#88 and another was id#188 when I asigned a slave to #188, it also showed up on #88.

 

This is my quick fix (took awhile to figure out considering I have no idea about PHP or SQL):::

 

In the file admin/categories.php I added in a coma instead of a space here:

		document.forms["new_product"].products_master.value = theValue+','+masValue;

 

Then in the file includes/module/master_products.php and in product_info.php I changed the WHERE/LIKE statement to read as such:

where products_master LIKE '%" . ',' . $HTTP_GET_VARS['products_id'] . ',' . "%'

 

Then I went into all my slaves and changed the products master to read ",#,##,###," It's important that it starts out AND ENDS with a coma because it takes the numbers between the comas.

 

It's not perfect, and your slaves in your list no longer look like slave products (I guess you could add any number at the beginning because it won't be considered a master product for the slave) but I'm in a hurry, and now that I have the fix for this, I thought I'd share it with everyone because, as I said before, someone will have a large store as well, and have this problem......

 

Any questions feel free to PM me.

 

Thanks to Matti for building this contrib, and thanks for all the support sites that teach PHP and SQL. I have learned quite a bit, and understand it a little bit more now.

 

Tracy :)

Link to comment
Share on other sites

I think I've made all the correct changes in the other files - just having trouble with the categories file

 

I get this error when I click on 'catalog' in admin.

 

Parse error: parse error, unexpected T_ELSEIF in /homepages/4/d75936541/htdocs/catalog/admin/categories.php on line 795

 

line 795 is just the code which was pasted in:

 

elseif ($action == 'new_master') {

 

I think there must be a mistake above or below but no idea where. Any ideas what would cause this error?

 

Thanks! :D

Link to comment
Share on other sites

Fixed - put } in front - although it doesn't have this in the file I downloaded but perhaps just my contribs conflicting.

 

Thanks.. and if anyone has the answer to my STS question a couple of posts up please let me know!

 

 

I think I've made all the correct changes in the other files - just having trouble with the categories file

 

I get this error when I click on 'catalog' in admin.

 

Parse error: parse error, unexpected T_ELSEIF in /homepages/4/d75936541/htdocs/catalog/admin/categories.php on line 795

 

line 795 is just the code which was pasted in:

 

elseif ($action == 'new_master') {

 

I think there must be a mistake above or below but no idea where. Any ideas what would cause this error?

 

Thanks! :D

Link to comment
Share on other sites

After installed master products, from the slave product table on the product info page, we will see 5 colums: Model / Description / Name+ / select / Price, I want to remove 2 colums, the Model and the Description, How to do it?

 

Many thanks for any help

 

Thanks for giving me the idea!

 

I don't know PHP or anything so please backup!

 

In master_products.php

Around line 23 you'll find a line starting

 $slave_list = array

just comment out the fields ou don't want, putting '//' in front

so your final code will look something like this:

$slave_list = array(//'MASTER_LIST_MODEL' => MASTER_LIST_MODEL,
					 'MASTER_LIST_NAME' => MASTER_LIST_NAME,
					 'MASTER_LIST_MANUFACTURER' => MASTER_LIST_MANUFACTURER, 
					 'MASTER_LIST_PRICE' => MASTER_LIST_PRICE, 
					 'MASTER_LIST_QUANTITY' => MASTER_LIST_QUANTITY, 
					 'MASTER_LIST_WEIGHT' => MASTER_LIST_WEIGHT, 
					 'MASTER_LIST_IMAGE' => MASTER_LIST_IMAGE,
					 'MASTER_LIST_BUY_NOW' => MASTER_LIST_BUY_NOW,
					 //'MASTER_LIST_DESCRIPTION' => MASTER_LIST_DESCRIPTION,
'MASTER_LIST_OPTIONS' => MASTER_LIST_OPTIONS);

 

I haven't tested thoroughly but seems to work on mine.

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