Jump to content
Johnson

Master Products - MS2

Recommended Posts

I've found that the Best Sellers Infobox seems to only appear on category pages if one of the products in that category is on the Best Sellers List. However; it doesn't seem to be recognizing that some products are in more than one category. I have, for example, the "Mother's Care Combo" showing on the home page as a Best Seller and also showing in the Women's Health>Pregnancy subcategory - but it is not showing in the Women's Health parent category, or in the Package Deals parent category.

 

Any idea on how to correct this? (It also doesn't show up on it's own product page).

 

See it happening here:

http://www.mmherbs.dreamhosters.com

 

Thanks :)


~Tracy
 

Share this post


Link to post
Share on other sites

Well - I found a strange one today - how do I correct it if I have duplicate listings of options in the Admin->Configuration->Slave Products ? Every option is listed twice :huh: I have no idea how I managed to do that - nor how to undo it - hopefully somebody will know what I need to do to correct this :blush:

 

Thanks,


~Tracy
 

Share this post


Link to post
Share on other sites

Has anyone found a solution to that problem that bhall2001 was having a couple of months ago? The same thing is happening to me. I can add either the product itself or the slaves of the product (depending on how I alter the code), but not both. He said he found a solution by combining functions in application_top.php, but I don't see it posted anywhere. I've already spent a great deal of time on this and it's becoming quite infuriating, yet I cannot find a solution. Any help is greatly appreciated and if you need any additional information (i.e. code) please feel free to ask. Thank you very much for your time.

 

-Ian


Ian Osos

Web Developer

Share this post


Link to post
Share on other sites

Wooo nevermind... I just fixed it... I am most happy now ^__^


Ian Osos

Web Developer

Share this post


Link to post
Share on other sites

Ahoy Ian, can you please post the code that fixed it? been trying for 2 days now but I'm just too much of a N00b with php :-"

 

thanks dude! :thumbsup:

ciao/riaan

 

Wooo nevermind... I just fixed it... I am most happy now ^__^

Share this post


Link to post
Share on other sites

Sure... in application_top.php change this:

 

	  case 'add_slave' :
						  reset($HTTP_POST_VARS);
						  while ( list( $key, $val ) = each( $HTTP_POST_VARS ) ) {
							if (substr($key,0,11) == "Qty_ProdId_") {
							  $prodId = substr($key,11);
							  $qty = $val;
							  if(isset($HTTP_POST_VARS["id_$prodId"]) && is_array($HTTP_POST_VARS["id_$prodId"])) {
								// We have attributes
								$cart->add_cart($prodId, $cart->get_quantity(tep_get_uprid($prodId,$HTTP_POST_VARS["id_$prodId"]))+$qty, $HTTP_POST_VARS["id_$prodId"]);
							  } else {
								// No attributes
								$cart->add_cart($prodId, $cart->get_quantity($prodId)+$qty);
							  }
							}
						  }
						  tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
						  break;

 

to this:

 

	  case 'add_slave' :
						  reset($HTTP_POST_VARS);
						  while ( list( $key, $val ) = each( $HTTP_POST_VARS ) ) {
							if (substr($key,0,11) == "Qty_ProdId_") {
							  $prodId = substr($key,11);
							  $qty = $val;
							  if(isset($HTTP_POST_VARS["id_$prodId"]) && is_array($HTTP_POST_VARS["id_$prodId"])) {
								// We have attributes
								$cart->add_cart($prodId, $cart->get_quantity(tep_get_uprid($prodId,$HTTP_POST_VARS["id_$prodId"]))+$qty, $HTTP_POST_VARS["id_$prodId"]);
							  } else {
								// No attributes
								$cart->add_cart($prodId, $cart->get_quantity($prodId)+$qty);
							  }
							}
						  }

						  if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {
							$cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']);
						  }

						  tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
						  break;

 

This basically just adds the "add_product" function to the bottom of the new "add_slave" function: the function that this contrib calls. That should do it... it seems to be working just fine for me.

Edited by Kawazu

Ian Osos

Web Developer

Share this post


Link to post
Share on other sites
PS - I do still have this issue unresolved :blush:

 

Turns out that this was due to the fact I didn't have any images for the subcategories or the slave products (products were doing it in the shopping cart) and apparently, with Netscape installed, both FireFox and Netscape were pulling up the ALT text for the non-existant images.

 

I fixed it by setting all of the subcategories and slave products to have a transparent gif image :D


~Tracy
 

Share this post


Link to post
Share on other sites
Well - I found a strange one today - how do I correct it if I have duplicate listings of options in the Admin->Configuration->Slave Products ? Every option is listed twice :huh: I have no idea how I managed to do that - nor how to undo it - hopefully somebody will know what I need to do to correct this :blush:

 

Thanks,

 

Ok - I found the error - just not sure what caused it. In my database configuration table I had duplicate entries for the Master Products fields :huh: I deleted the duplicates and that's all fixed now :D


~Tracy
 

Share this post


Link to post
Share on other sites
I've found that the Best Sellers Infobox seems to only appear on category pages if one of the products in that category is on the Best Sellers List. However; it doesn't seem to be recognizing that some products are in more than one category. I have, for example, the "Mother's Care Combo" showing on the home page as a Best Seller and also showing in the Women's Health>Pregnancy subcategory - but it is not showing in the Women's Health parent category, or in the Package Deals parent category.

 

Any idea on how to correct this? (It also doesn't show up on it's own product page).

 

See it happening here:

http://www.mmherbs.dreamhosters.com

 

Thanks :)

 

Anybody have any thoughts on this one yet? I'm still at a loss with it ;)


~Tracy
 

Share this post


Link to post
Share on other sites

Does anyone know which Master Products file(s) call the price in the listing of slave products when viewing the master products page? I am running Separate Price per Customer along with the Master Products contrib - and while my shopping cart page shows the correct prices for the different customer groups - the page you choose what product to add to your cart does not :(

 

I've been attempting to incorporate the SPPC code into includes/modules/master_products.php or includes/modules/master_listing.php - but I'm not sure which one needs the code, or if they both do, or if I'm messing with the wrong files :(

 

Thanks


~Tracy
 

Share this post


Link to post
Share on other sites

Hi,

 

what must i change to have a buy button after every slave

 

i want to buy slave (with and without options) with a buy button after the slave (no field or checkbox)

 

Thanks

 

Share this post


Link to post
Share on other sites
Hi,

 

what must i change to have a buy button after every slave

 

i want to buy slave (with and without options) with a buy button after the slave (no field or checkbox)

 

Thanks

 

 

I believe you would need to edit your includes/modules/master_listing.php file. I know that this line of code creates the input box to enter the quantity you would like to add to your cart:

$lc_text = tep_draw_input_field('Qty_ProdId_' . $listing[$x]['products_id'], '', 'size="4"');

 

I believe you will find that line twice in the file and you need to edit it in both instances.


~Tracy
 

Share this post


Link to post
Share on other sites
I believe you would need to edit your includes/modules/master_listing.php file. I know that this line of code creates the input box to enter the quantity you would like to add to your cart:

$lc_text = tep_draw_input_field('Qty_ProdId_' . $listing[$x]['products_id'], '', 'size="4"');

 

I believe you will find that line twice in the file and you need to edit it in both instances.

 

PS - your file most likely won't have the [$x] in that line of code. I believe I have that because I am also using Separate Price per Customer


~Tracy
 

Share this post


Link to post
Share on other sites
I believe you would need to edit your includes/modules/master_listing.php file. I know that this line of code creates the input box to enter the quantity you would like to add to your cart:

$lc_text = tep_draw_input_field('Qty_ProdId_' . $listing[$x]['products_id'], '', 'size="4"');

 

I believe you will find that line twice in the file and you need to edit it in both instances.

 

Hi,

 

ok, this line create an input field for the qty, but what must i write to see no input box,

 

i want to buy the slave artikel only with buy-button ???

 

is that possible?

Share this post


Link to post
Share on other sites
Hi,

 

ok, this line create an input field for the qty, but what must i write to see no input box,

 

i want to buy the slave artikel only with buy-button ???

 

is that possible?

 

What I would try is looking at a page that has the "Buy Now" button in the script, such as includes/modules/product_listing.php That file has this bit of code for the Buy Now button:

$lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing[$x]['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ';

 

Again - my code has the [$x] bits in it for the Separate Price per Customer contribution - so if you aren't running that contribution as well you don't need those.

 

Anyway - I would try placing that line of code in the master_listing.php file in place of the line of code I pointed out earlier that gives you the input field for your quantity :) I have no idea if it will work - but it's worth a try :blush:


~Tracy
 

Share this post


Link to post
Share on other sites

I just wanted to thank everybody who put this contrib together, worked right out of the box on heavily modified cart! This contrib is a huge lifesaver, don't know how I would have done it without it.

 

I followed the instructions to a "T" and used Beyond Compare 2 to handle file comparisons (which saved the day). There were 1 or 2 places that had differences that were not commented as //Master Products start, but were distinct to this contribution.

 

Thanks again!


Installed Modules:

Dynamenu, InfoBox Admin, Master Products v.1.2, Header Tags Controller, Multiple Products Manager, Quick Edit in Admin, Secure Admin, Ultimate SEO URL's, EZ Secure Order, Easy Populate v.2.76d MS2, AuthorizeNet_AIM, ChangeFinal Breadcrumb Title, FedEx Labels, Fedex Direct 2.06, How Did you Hear 1.5, Login a la Amazon, UPS XML 1.2.4, USPS Labels, USPS Methods API MS2

Share this post


Link to post
Share on other sites

Shaun, I have both Header Tags Controller and Master Products installed, I agree it was a bit of a juggling act in getting the /admin/categories.php file to straighten out. Not sure if you figured it out or not but for the benefit of the group I will try to outline it.

 

There are a few places where MP and HTC overlap, they are in defining some database calls, but all you have to do is look at the actual columns and fields that are being pulled and you can carefully ad in the new fields for MP (or HTC) whichever you install second. The instructions that come with these modules tell you to find and replace large chunks of code, but all you really need to do is to add the bolded fields below (I installed HTC second so the red code would be added if you install MP second).

 

Looks something like this (the bold was added):

Code:

 

//HTC BOC

if (isset($HTTP_GET_VARS['pID']) && empty($HTTP_POST_VARS)) {

$product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_head_title_tag, pd.products_head_desc_tag, pd.products_head_keywords_tag, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_listing_status, p.products_tax_class_id, p.manufacturers_id, p.products_master, products_master_status from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'");

//Master Products EOF

//HTC EOC

 

There a few instances of find/replaces like this when integrating HTC and MP maybe three or four. Everything else should be just straight find/replace or find and add after (unless you have other mods installed on the categories page). Hope that helps.

 

Hi Everyone,

 

I saw one reply earlier in this thread that asks to see a categories.php that has BOTH Header Tags Controller and MS2 installed. Unfortunately, nobody replied to that person :( .

 

I already have Header Tags Controller installed. My wife and I are pretty new with OScommerce. We're in the process of starting up a small Thai Shop using OS commerce....

 

Our question is, can we use both Header Tags Controller AND MS2? If so, what should the categories.php file look like in the admin. directory?

 

We appreciate any help with this!

Shaun & Natlada :)


Installed Modules:

Dynamenu, InfoBox Admin, Master Products v.1.2, Header Tags Controller, Multiple Products Manager, Quick Edit in Admin, Secure Admin, Ultimate SEO URL's, EZ Secure Order, Easy Populate v.2.76d MS2, AuthorizeNet_AIM, ChangeFinal Breadcrumb Title, FedEx Labels, Fedex Direct 2.06, How Did you Hear 1.5, Login a la Amazon, UPS XML 1.2.4, USPS Labels, USPS Methods API MS2

Share this post


Link to post
Share on other sites
Second use: bundling. Make the Master a Gift Basket. Make the slaves into different gift items to go with the basket. Future versions may allow you to charge for the basket (the current version of the code would give away the basket for free) or you could change the code yourself.

Hth,

Matt

 

 

 

Hi This is what I am looking for in bold ...is this now doingable :D ie buy some items in the basket or the whole basket at a fixed price? secondly the products amount to purchase is set to 0 how can change this to 1 (perhaps only one in some cases an original) ,,,

 

thanks

 

russell


Rusty

-------------------------------------------

Share this post


Link to post
Share on other sites

I've tried to dig through this thread first to find a current working example of this contrib to check it out but I'm having a bit of trouble, either the sites are down (atm? permanently?) or I in some cases maybe I just can't find a product they used the functionality on...

 

Can someone provide a link to their site using this mod, preferably straight to a product example? I'm trying to see if this does exactly what I'm thinking it will before going through the work to implement...

 

Thanks!


Jerry a.k.a. 'FoundSoul'

Share this post


Link to post
Share on other sites
I've tried to dig through this thread first to find a current working example of this contrib to check it out but I'm having a bit of trouble, either the sites are down (atm? permanently?) or I in some cases maybe I just can't find a product they used the functionality on...

 

Can someone provide a link to their site using this mod, preferably straight to a product example? I'm trying to see if this does exactly what I'm thinking it will before going through the work to implement...

 

Thanks!

 

This can be used to solve many different issues that can't be resolved just by using attributes. For our online store we have products available in different sizes. But each size has it's own product model number. For example - we have Blood Pressure Formula available in 2oz (Model 2022) or 4oz (Model 2024) size. So I used Master Products to be able to create one Master Product for Blood Pressure Formula that contains the product description and then allows you to choose which slave (2oz or 4oz) you would like to purchase. In our case the Master Product is not available for purchase.

 

This module has the ability for you to choose whether or not you want the Master Product to be a purchasable product - whether or not you want to show the Master Product in your store - and various other settings.

 

It might be more helpful for you if you told us what functionality you need in your store and then we can say whether or not Master Products can do that for you :)

 

You can see how we used it here: http://mmherbs.dreamhosters.com/blood-pres...mula-p-122.html


~Tracy
 

Share this post


Link to post
Share on other sites

Hi,

 

I'm having the Buy it Now button problem, but its different than others posted so I thought I'd throw it out there.

 

As others, when clicked the button takes to you to an empty cart. But when rolled over it gives a product_id= blank, no product id. Its weird because this just started happening yesterday, after I installed some shipping modules for Fedex and UPS. For all products that were put into the database prior to yesterday everything is fine but for any new products I create, I get this problem. I have tried duplicating one of the working products and that seems ok too. Is there something obvious or telling about this problem?

 

The live store:

http://www.thehealthypet.net/index.php?cPath=30_36

 

Thanks for any help in advance.

 

Mike


Installed Modules:

Dynamenu, InfoBox Admin, Master Products v.1.2, Header Tags Controller, Multiple Products Manager, Quick Edit in Admin, Secure Admin, Ultimate SEO URL's, EZ Secure Order, Easy Populate v.2.76d MS2, AuthorizeNet_AIM, ChangeFinal Breadcrumb Title, FedEx Labels, Fedex Direct 2.06, How Did you Hear 1.5, Login a la Amazon, UPS XML 1.2.4, USPS Labels, USPS Methods API MS2

Share this post


Link to post
Share on other sites

I'm hoping that somebody with very good knowledge of PHP and this mod is currently monitoring the thread. I'm at my wits end, and have tried so many things that my head is spinning :blink:

 

I don't know enough PHP to debug this, please please help me.

 

I'm trying to use Header Tags Controller with Master Products. The problem is that when I add a product to the database in admin, then go to the cart and try to use the Buy it Now button it just takes me to the cart and says 'your cart it empty'. When I roll over the button there is no product id its product_id= then a blank. I know a product id is being generated in admin when I create it because in the resulting page it shows it in the url as product_id=431 or what have you. You can go to the product_info page for the new product and buy it there but not from the button on the product_listing page.

 

I think the problem is on the /admin/categories.php file because these two mods use the same blocks of code and queries from time to time on that page so you have to mesh them together. I'm sure I just did it wrong.

 

I tried uninstalling completely both contributions, and it was fine. Then I installed HTC and it was fine, then I installed MP over the top of it and it broke. The only file I modified during all this was the categories.php.

 

Here are some places where the code is meshed on categories.php file:

 

This bit isn't even commented in the install of Master Products with the standard //Master Products so don't know if its supposed to be included or not:

  case 'new_master_preview':
//copy image only if modified
   $products_image = new upload('products_image');
	$products_image->set_destination(DIR_FS_CATALOG_IMAGES);
  if ($products_image->parse() && $products_image->save()) {
	 $products_image_name = $products_image->filename;
 } else {
	 $products_image_name = (isset($HTTP_POST_VARS['products_previous_image']) ? $HTTP_POST_VARS['products_previous_image'] : '');
	}
   break;

 

Here's a meshed block, is this the right way of doing the $products_query? (also note that the final call is for products_master_status from.... shouldn't it be p.products_master_status from...etc?

//Master Products 
				   'products_listing_status' => '',
				   'products_tax_class_id' => '',
				   'manufacturers_id' => '');

$pInfo = new objectInfo($parameters);

//HTC BOC
if (isset($HTTP_GET_VARS['pID']) && empty($HTTP_POST_VARS)) {
  $product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_head_title_tag, pd.products_head_desc_tag, pd.products_head_keywords_tag, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_listing_status, p.products_tax_class_id, p.manufacturers_id, p.products_master, products_master_status from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'");
  $product = tep_db_fetch_array($product_query);							
  //HTC EOC 
//Master Products EOF

 

Another meshed block is it right? Not sure at all:

<!-- HTC BOC //-->
<?php
 } elseif ($action == 'new_product_preview') {
if (tep_not_null($HTTP_POST_VARS)) {
  $pInfo = new objectInfo($HTTP_POST_VARS);
  $products_name = $HTTP_POST_VARS['products_name'];
  $products_description = $HTTP_POST_VARS['products_description'];
  $products_head_title_tag = $HTTP_POST_VARS['products_head_title_tag'];
  $products_head_desc_tag = $HTTP_POST_VARS['products_head_desc_tag'];
  $products_head_keywords_tag = $HTTP_POST_VARS['products_head_keywords_tag'];
  $products_url = $HTTP_POST_VARS['products_url'];
} else {
// Master Products
  $product_query = tep_db_query("select p.products_id, pd.language_id, pd.products_name, pd.products_description, pd.products_head_title_tag, pd.products_head_desc_tag, pd.products_head_keywords_tag, pd.products_url, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.manufacturers_id, p.products_master  from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "'");
// Master Products EOF
  $product = tep_db_fetch_array($product_query); 
// HTC EOC

 

I am in real need ofhelp here, my understanding of PHP doesn't go this far...please help!!


Installed Modules:

Dynamenu, InfoBox Admin, Master Products v.1.2, Header Tags Controller, Multiple Products Manager, Quick Edit in Admin, Secure Admin, Ultimate SEO URL's, EZ Secure Order, Easy Populate v.2.76d MS2, AuthorizeNet_AIM, ChangeFinal Breadcrumb Title, FedEx Labels, Fedex Direct 2.06, How Did you Hear 1.5, Login a la Amazon, UPS XML 1.2.4, USPS Labels, USPS Methods API MS2

Share this post


Link to post
Share on other sites

I have Master Products installed and have added LOTS of master & slave products (only the slave products can be added to the cart).

 

My problem is that I have over 500 master & slave products and when my slave product has been assigned to master product 496 it also displays at master product 96 (497 is showing up at master product 97 etc...), why are the slave product showing up at both master product 496 & 96 when it should only show up on master product 496?

 

I have the latest master product pack installed from 14 Sep 2006 (full pack install in one package).

 

Please help!!!

Share this post


Link to post
Share on other sites

I was always told "measure twice and cut once" so please consider this question as my way of measuring twice.

 

I'm relatively new to OSC, not to script installation or customization. Another developer asked me to help on a project, in which a person has a product catalog from hell. After looking at this list of products, I can see why help is needed.

 

Here's an overview:

 

Product # | Size | Style | Color | Addons

 

1234 = Main product number, let's say a tool belt

 

Style:

AB = Type of buckle or belt closure

ST = Stamped leather

 

Size:

L, S ~ OR

15, 16, 17, etc.

 

Color:

NA = Natural Color

BL = Blue

PP = Purple

 

Addons:

1 = Silver studs

1A = Silver studs and fancy buckle

 

The main products are belts, dog collars and wrist bands, for instance. I can potentially have the addon and color options for literally every product. But the color and the addon changes the model number, and the client (apparently) is totally unwilling to do away with the product model numbers she currently has.

 

So, for instance, if the belts product number or model number is Bt and the size indicator is Lg, so far we have a product model number BtLg.

 

After that number, we'll have a dash followed by color and addons. If you order that belt in a natural leather color, NA, the model number becomes BtLg-Na. Now, if you want to add those fancy silver studs and buckle, your total product's model number is BTLG-NA1A.

 

The color won't affect the price. The size might. The addons will. But everything affects the model number.

 

I would like to show the main product (BT) with all the various configuration choices (size, style, color, addons), then a quantity selector for the final configured product.

 

Is this the contribution I want, or is there something else that might work better?

 

Thanks for your guidance,

Schelly

Share this post


Link to post
Share on other sites

For my Buy It button problem, well its fixed sort of. I had to revert to backups from about a week ago rolling back about 30 hours of work but the good news is that its working. Now I have to back up again, then try installing Header Tags Controller again! :'(

 

Never found out what caused it all, hope it never happens to me or anyone else.


Installed Modules:

Dynamenu, InfoBox Admin, Master Products v.1.2, Header Tags Controller, Multiple Products Manager, Quick Edit in Admin, Secure Admin, Ultimate SEO URL's, EZ Secure Order, Easy Populate v.2.76d MS2, AuthorizeNet_AIM, ChangeFinal Breadcrumb Title, FedEx Labels, Fedex Direct 2.06, How Did you Hear 1.5, Login a la Amazon, UPS XML 1.2.4, USPS Labels, USPS Methods API MS2

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

×