Jump to content
Johnson

Master Products - MS2

Recommended Posts

George,

 

I managed to get the text field to appear, My coding is pretty poor... so I was wondering if someone could have a look to see how I can improve the below code but at the same time keep it functional

 

I changed this....

 

$lc_text .= tep_draw_pull_down_menu('id_'.$listing['products_id'].'[' . $products_options_name_values['products_options_id'] . ']', $products_options_array);

 

to this

 

 

 

I know the coding is pretty poor but I could not find any solution to including some kind of text field on this thread..

 

Thought I replied this morning, but guess not.

 

Attribute options are transferred to customer orders by id. There are some contributions that allow pricing options, but again, these are stored files. Text cannot be transferred to orders through use of attributes. In fact, I have found no way to easily transfer text from a product page to an order. The problem is compounded when working from a slave list of products, since one should be able to order the product from the in-line display for slave products.

 

There are a couple of contributions that are supposed to allow text to be entered in an attribute and passed to a customer order. I have so many add-ons and changes to my files, I have not been successful at this point in getting one of them to work. (I need it for a customer, but still generating too many errors to use, and haven't had time to complete the debugging process). Maybe a java script or AJAX is the answer. No idea at this point.

 

George


GEOTEX from Houston, TX

 

(George)

Share this post


Link to post
Share on other sites

Hi there,

 

This contribution allows you to hide slave products from the listing pages. Does anyone know how to also hide them from the search result pages also?

 

Many thanks in advance...

Share this post


Link to post
Share on other sites
Hi there,

 

This contribution allows you to hide slave products from the listing pages. Does anyone know how to also hide them from the search result pages also?

 

Many thanks in advance...

 

You would apply a filter to the sql calls (in the where ... statements) in advanced_search_results.php. However, most users do not want to filter slaves from search results, since when you click on them they display the master and all associated products.


GEOTEX from Houston, TX

 

(George)

Share this post


Link to post
Share on other sites
You would apply a filter to the sql calls (in the where ... statements) in advanced_search_results.php. However, most users do not want to filter slaves from search results, since when you click on them they display the master and all associated products.

 

Thanks George.. I will have a look at that file.

Share this post


Link to post
Share on other sites
Thanks George.. I will have a look at that file.

 

Also give consideration to removing the buy now button from the adavanced_search_results.php, therby forcing any user doing a search to go to the product or master product page before purchasing. This forces the same action as if a customer clicked on the buy-now button for a product with attributes.

 

George


GEOTEX from Houston, TX

 

(George)

Share this post


Link to post
Share on other sites
in product_info.php

 

approx. line 89 find:

 

	  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td class="pageHeading" valign="top"><?php echo $products_name; ?></td>
		<td class="pageHeading" align="right" valign="top"><?php echo $products_price; ?></td>
	  </tr>
	</table></td>
  </tr>

 

Change to:

 

	  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td class="pageHeading" valign="top"><?php echo $products_name; ?></td>
		<td class="pageHeading" align="right" valign="top">
					<?php 
						if (($product_info['products_master_status'] == 1) {
							  echo('Starting at: ' . $products_price . ' ');
							}else{
							  echo $products_price;
							}  
						} 
					?>
					</td>
	  </tr>
	</table></td>
  </tr>

 

Just a quick fix, may need some tweaking.

hth.

 

George

Hi GEorge, this mod will show a price IF the master has a price, but if it´s just a container for slaves , the price is 0 ... That´s why we need to show one or the lowest slave price....

And should display @ newproducts too...

Any IDea?

Share this post


Link to post
Share on other sites
This is the support thread for Master Products - MS2.

 

I will not reply to postings for support elsewhere on these forums. Please do not pm or email me for support unless you give billing details :D

 

Matti

 

Do the products_id and master_id need to be numerical? As soon as I changed them to non-numerical they don't work.

Share this post


Link to post
Share on other sites
Do the products_id and master_id need to be numerical? As soon as I changed them to non-numerical they don't work.

 

Products_id and master_id are set by the system. These are not numbers you can change without a lot of grief, even for those experienced in mySQL data manipulation. And, yes, they are numbers. You can set Product Model to any desired value. This will allow you to manipulate your data in various ways without a lot of other changes to osCommerce or the database.


GEOTEX from Houston, TX

 

(George)

Share this post


Link to post
Share on other sites
Hi GEorge, this mod will show a price IF the master has a price, but if it´s just a container for slaves , the price is 0 ... That´s why we need to show one or the lowest slave price....

And should display @ newproducts too...

Any IDea?

 

Hi, sorry for the slow response. We have been out of town for a few days, without the luxury of all my data files. I seem to have lost the track here on this. Why do we need to show a price in the product_info, New Products or advanced search? The master will show up in a search or under new products, as will the slaves. A click on any master or slave takes one to the Master page, showing all the slaves below. Read my commentary below.

 

Specifically, to answer your question, I will look at a routine that can search the "slave" for the lowest price and put in your Master where the price would display, saying something link "priced from" or whatever. This could be used in search, new products, specials, etc. but will slow down the page builds due to the large number of database calls needed to be added to these pages.

 

The price on a Master is used to set the purchase or lack of purchase of the master product. Normally, the Master would never be able to be purchased. In fact, unless you are using it to sell a set, or perhaps a discount price for purchasing the whole"set" one should never be able to purchase the Master. If you are going to use the Master to sell a set, or offer a discount on a set, then you need to reset the slave listing to display a "0" quantity in the purchase column on the slaves, or you double up on the customer's cart and aggravate them to no end. I do have routines for setting up a set only, already built into virtually all the boxes and modules that one can use to list or sell a product. I can't really post here without a lot of modifications because of the total add-ins I have on my sites. I can send if you PM me. You will have to modify some of the code to fit your situation, but any data calls and all the scripts should work okay on any PHP 4 or 5 site, or with mySQL 4 or 5. (don't know about 3.23, but maybe??) with register_globals set ON. (this offer is for any who PM. If there is enough interest, I can post many of my files on a public download area on one of my sites)

 

HTH

 

George


GEOTEX from Houston, TX

 

(George)

Share this post


Link to post
Share on other sites
Hi, sorry for the slow response. We have been out of town for a few days, without the luxury of all my data files. I seem to have lost the track here on this. Why do we need to show a price in the product_info, New Products or advanced search? The master will show up in a search or under new products, as will the slaves. A click on any master or slave takes one to the Master page, showing all the slaves below. Read my commentary below.

 

Specifically, to answer your question, I will look at a routine that can search the "slave" for the lowest price and put in your Master where the price would display, saying something link "priced from" or whatever. This could be used in search, new products, specials, etc. but will slow down the page builds due to the large number of database calls needed to be added to these pages.

George , thanks for the offer. I´m not selling sets, it´s just a wholesale b2b makeup shop. So i.e. The mater product is a lipstick and the slaves are the colors available. So every box in the site shows master products but the price is blank,that´s the reason to use a "priced from" or whatever.

NOTE:just in case... I´ve SPPC installed...

 

Thanks in advance.

Share this post


Link to post
Share on other sites
George , thanks for the offer. I´m not selling sets, it´s just a wholesale b2b makeup shop. So i.e. The mater product is a lipstick and the slaves are the colors available. So every box in the site shows master products but the price is blank,that´s the reason to use a "priced from" or whatever.

NOTE:just in case... I´ve SPPC installed...

 

Thanks in advance.

 

We did exactly this for a customer, just a different product line.

 

There is a contribution for hiding categories, http://www.oscommerce.com/community/contributions,5907 (this, I think is a re-release of a very old one, but should work okay as the idea is the same). Add this contribution. Then, put in a subcategory for your colors, having all the products active. Then, set the show category status to "0" (false). The master will show in new products and your searches because the category for it is active. The colors will not, as their category is not active, but the slaves will show when you pull up the category because the products are active.

 

You can see this concept work here (live site) http://littledutchgirl.com/catalog/index.php?cPath=104. Clicking on one of the chocolate letters shown as a new product will bring up the master, and list all the slaves. In the case of a wholesale where a certain quantity is required, you have some options, either pricing the master for the full case, with all the slaves order quantity set to zero, or you can add a contribution for master packs, minimum quantity per product

 

Hope this will give you an idea for your site display.

 

George


GEOTEX from Houston, TX

 

(George)

Share this post


Link to post
Share on other sites
Products_id and master_id are set by the system. These are not numbers you can change without a lot of grief, even for those experienced in mySQL data manipulation. And, yes, they are numbers. You can set Product Model to any desired value. This will allow you to manipulate your data in various ways without a lot of other changes to osCommerce or the database.

 

Our product id is assigned by us instead automatically generated. The slave works when the product id is set either 'int' or 'varchar' in MYSQL. And it works when it looks like numeric (20..) but not when it is non-numeric (20abc). So is OScommerce written based on the assumption that all product id is numeric??

 

Another question here.

What can possibly cause regular

 

print 'hello';

 

in any file doesn't work?

Share this post


Link to post
Share on other sites

Are you sure you aren't confusing products_id with products_model? You get to set the products_model and it can contain numbers and/or letters. But the products_id is automatically generated by osCommerce.

 

Our product id is assigned by us instead automatically generated. The slave works when the product id is set either 'int' or 'varchar' in MYSQL. And it works when it looks like numeric (20..) but not when it is non-numeric (20abc). So is OScommerce written based on the assumption that all product id is numeric??

 

Another question here.

What can possibly cause regular

 

print 'hello';

 

in any file doesn't work?


~Tracy
 

Share this post


Link to post
Share on other sites
Are you sure you aren't confusing products_id with products_model? You get to set the products_model and it can contain numbers and/or letters. But the products_id is automatically generated by osCommerce.

 

Our product model is the internal stock number. We do physically increment the product id by 1 when we add new product to the products table...

Share this post


Link to post
Share on other sites
Our product model is the internal stock number. We do physically increment the product id by 1 when we add new product to the products table...

 

Not that I really care one way or the other, but this is off topic for this group. We have too many pages of things pertaining to Master Slave to get off on something about stock osCommerce. Since you are knowledgeable enough about mySQL and osCommerce to coordinate all your product and product_description ids without error, you will have no trouble converting the master_id to fit your schema.

 

HTH

 

George


GEOTEX from Houston, TX

 

(George)

Share this post


Link to post
Share on other sites
Are you sure you aren't confusing products_id with products_model? You get to set the products_model and it can contain numbers and/or letters. But the products_id is automatically generated by osCommerce.

 

Hi, Tracy

 

Long time no hear. Hope all is going well.


GEOTEX from Houston, TX

 

(George)

Share this post


Link to post
Share on other sites
Are you sure you aren't confusing products_id with products_model? You get to set the products_model and it can contain numbers and/or letters. But the products_id is automatically generated by osCommerce.

 

We enter the product info through MYSQL instead through Admin. That is why we assign the product id ourselves.

Share this post


Link to post
Share on other sites

I tried to install MS2 and was getting too many errors, including one that corrupted my Admin, making it unusable. I unded up removing all of the manual edits (pain in the arse) and restoring the MySQL on the site.

 

Any chance there will be a nice compiled Mod release of MS2 that can be easily installed (instead of 32 file edits)?

Share this post


Link to post
Share on other sites

Hi! TS, i got these messages when try to install MP v1.2 in latest OSC

 

"Fatal error: Call to undefined method currencies::calculate_price() in ......\OnlineShop\includes\classes\shopping_cart.php on line 272" :

 

272 $this->total += $currencies->calculate_price($products_price, $products_tax, $qty);

273 $this->weight += ($qty * $products_weight);

 

I try to google out but did not find any solution to fix it (Maybe i missed out something - still newbiz here!)

 

and if you already have the solutions please give me the link... Thank you very much.

Edited by RiCHBoYZ

Share this post


Link to post
Share on other sites

I was wondering if someone can tell me if this contribution will suit my need.

 

I have a set of truck products that I'm trying to sell. I just want to have one ad for each of the "base" products (i.e. a hood protector). The model number of the hood protector varies by the year, make and model of the truck for which it is designed. So, I want to have the customer go into this ad and be able to click that they (for example) have a 2005 Ford F150 and have the correct model number be put in the shopping cart.

 

A key part of this is there about 100 different kinds of years, makes and models. I don't really want to have them all displayed at one time nor do I want them in one, big drop down menu. Ideally, I'd like the customer to be able to pull down the year, which in turn would lead him to another drop down of vehicle makes, followed by anothrer drop down of vehicle models. So, in three clicks, he has chosen his part and the proper model is placed in his cart.

 

I'm sure that this contribution probably does not handle all of what I'm looking for. But, am I on the right track with this one? Will it get me close enough so that I can add some Ajax code on (for the drop downs) and get to where I want to go? Or, do you know if there is another contribution out there that is more appropriate?

 

Any thoughts or suggestions will be appreciated.

 

Thanks!

Moez

Share this post


Link to post
Share on other sites
Hi! TS, i got these messages when try to install MP v1.2 in latest OSC

 

"Fatal error: Call to undefined method currencies::calculate_price() in ......\OnlineShop\includes\classes\shopping_cart.php on line 272" :

 

272 $this->total += $currencies->calculate_price($products_price, $products_tax, $qty);

273 $this->weight += ($qty * $products_weight);

 

I try to google out but did not find any solution to fix it (Maybe i missed out something - still newbiz here!)

 

and if you already have the solutions please give me the link... Thank you very much.

 

If that is the only error you get, consider yourself lucky. This contribution was written for ms2.2, no updates. Installing on a RC2a is bound to cause some problems as there are several database calls that need to be updated, and, as you found, you may have to search some older versions to find some of the calls, and, of course, double check all your work as errors are easy to make.

 

I think this will solve the error above. Add it to your catalog/includes/classes/currencies.php if the function does not exist. If it does exist, add include_once(DIR_WS_CLASSES . 'currencies.php') to the top of shopping_cart.php.

 

	function calculate_price($products_price, $products_tax, $quantity = 1) {
  global $currency;

  return tep_round(tep_add_tax($products_price, $products_tax), $this->currencies[$currency]['decimal_places']) * $quantity;
}


GEOTEX from Houston, TX

 

(George)

Share this post


Link to post
Share on other sites
I was wondering if someone can tell me if this contribution will suit my need.

 

I have a set of truck products that I'm trying to sell. I just want to have one ad for each of the "base" products (i.e. a hood protector). The model number of the hood protector varies by the year, make and model of the truck for which it is designed. So, I want to have the customer go into this ad and be able to click that they (for example) have a 2005 Ford F150 and have the correct model number be put in the shopping cart.

 

A key part of this is there about 100 different kinds of years, makes and models. I don't really want to have them all displayed at one time nor do I want them in one, big drop down menu. Ideally, I'd like the customer to be able to pull down the year, which in turn would lead him to another drop down of vehicle makes, followed by anothrer drop down of vehicle models. So, in three clicks, he has chosen his part and the proper model is placed in his cart.

 

I'm sure that this contribution probably does not handle all of what I'm looking for. But, am I on the right track with this one? Will it get me close enough so that I can add some Ajax code on (for the drop downs) and get to where I want to go? Or, do you know if there is another contribution out there that is more appropriate?

 

Any thoughts or suggestions will be appreciated.

 

Thanks!

Moez

 

That would be a tough call for this contribution. I had a similar quest for a customer some time back, and used this java script link to solve the problem. I built the drop down lists using standard php database calls to build the drop down menus.

 

http://dynamicdrive.com/dynamicindex16/cha...lects/index.htm

 

Your on your won here, as it has been some time since I tackled this, and it is not a normal help item for this group. I may be able to offer some limited help if you pm me.

 

HTH,

 

George


GEOTEX from Houston, TX

 

(George)

Share this post


Link to post
Share on other sites
That would be a tough call for this contribution. I had a similar quest for a customer some time back, and used this java script link to solve the problem. I built the drop down lists using standard php database calls to build the drop down menus.

 

http://dynamicdrive.com/dynamicindex16/cha...lects/index.htm

 

Your on your won here, as it has been some time since I tackled this, and it is not a normal help item for this group. I may be able to offer some limited help if you pm me.

 

HTH,

 

George

 

 

Wow, George! That looks like a perfect solution! Thanks a lot for getting back to me. I think that that will give me enough to play with for a little while.

 

Thanks again!

Moez

Share this post


Link to post
Share on other sites

Hi George,

I had talked to you earlier in the year about the possibility of slave pop-ups. I see you eventually added it on..AWESOME! I wound up creating a site that was customer friendly but an extreme pain for the admin in the sense that they (make that 'I') have to first make the secondary products as options and then create a separate html page for each of the product descriptions...50 products. Needless to say, weekly price changes take the better part of a day. After doing this for a good part of a year, I'm redoing the site to be easier to maintain...so your contribution is really going to help in this area.

One general question...can slave products be set up so that they only add if the master is chosen?

Thanks for putting it out,

Chris

Share this post


Link to post
Share on other sites
Hi George,

I had talked to you earlier in the year about the possibility of slave pop-ups. I see you eventually added it on..AWESOME! I wound up creating a site that was customer friendly but an extreme pain for the admin in the sense that they (make that 'I') have to first make the secondary products as options and then create a separate html page for each of the product descriptions...50 products. Needless to say, weekly price changes take the better part of a day. After doing this for a good part of a year, I'm redoing the site to be easier to maintain...so your contribution is really going to help in this area.

One general question...can slave products be set up so that they only add if the master is chosen?

Thanks for putting it out,

Chris

 

If I understand your question, yes, but....

 

We did a thing with M/S where a customer had sets to sell. The Master Product shows a picture of the set, the slaves are listed as a "list" in the Master description as opposed to actually being displayed under the product. The individual items can display a pop-up for detail of the individual item, but ONLY the set can be purchased. Also, the items show in searches, as new items, etc., but no individual item can be purchased.

 

You can see the concept here: http://www.designerdogregistry.com/master-parts-p-396.html

 

If this looks like what you are after, PM me as I do not have the code organized enough at this time to release as an add-on to the M/S contribution.


GEOTEX from Houston, TX

 

(George)

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

×