Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Master Products - MS2


Guest

Recommended Posts

Hi, I just installed this contribution and I think it's great!

 

I hope this question hasn't been asked before, (I searched and searched!), but does anybody know if there is a way to add an if statement to the <?php echo $products_price; ?> on a page that is a master with slaves? Here's my scenario:

 

The site sells sporting goods, and there are lots of products that come in several size variations with different prices... so I set up the Master with the lowest price item, and the larger items are set as slaves so all the sizes show on the page. But for these pages, I'd like the price on the product info page and in the thumbnail views to show something like "As low as" or "Starting at" before the price, or to show the low-high pricing ($24.95 - $54.95). but for products without masters/slaves, it should show the regular price without any prefixes.

 

Does anybody know if there's a way to do this?

 

Many thanks,

Janet

Link to comment
Share on other sites

Hi, I just installed this contribution and I think it's great!

 

I hope this question hasn't been asked before, (I searched and searched!), but does anybody know if there is a way to add an if statement to the <?php echo $products_price; ?> on a page that is a master with slaves? Here's my scenario:

 

The site sells sporting goods, and there are lots of products that come in several size variations with different prices... so I set up the Master with the lowest price item, and the larger items are set as slaves so all the sizes show on the page. But for these pages, I'd like the price on the product info page and in the thumbnail views to show something like "As low as" or "Starting at" before the price, or to show the low-high pricing ($24.95 - $54.95). but for products without masters/slaves, it should show the regular price without any prefixes.

 

Does anybody know if there's a way to do this?

 

Many thanks,

Janet

 

I haven't figured this out either but what I did for the time being was in the Product Name area, after the name I put <br>from $19.95

Link to comment
Share on other sites

Ok, this image is what I am looking to do. Hope this helps for someone to help me out. Please :)

Image1.jpg

 

I tried with defining a boarder in style.css, but did not work. I think the problem is that I defined in the <tr> as opposed to a <td> tag.

 

TR.accountHistory-odd, TR.addressBook-odd, TR.alsoPurchased-odd, TR.payment-odd, TR.productListing-odd, TR.productReviews-odd, TR.upcomingProducts-odd, TR.shippingOptions-odd {
background: #f8f8f9;
border-bottom-color: #000000;
border-bottom-style: solid;
border-bottom-width: thin;
}

TR.accountHistory-even, TR.addressBook-even, TR.alsoPurchased-even, TR.payment-even, TR.productListing-even, TR.productReviews-even, TR.upcomingProducts-even, TR.shippingOptions-even {
 background: #f8f8f9;
}

 

using a different background color for TR.productListing-even will change the background color on alternate rows, giving a visual separation of the items.

GEOTEX from Houston, TX

 

(George)

Link to comment
Share on other sites

I tried with defining a boarder in style.css, but did not work. I think the problem is that I defined in the <tr> as opposed to a <td> tag.

 

TR.accountHistory-odd, TR.addressBook-odd, TR.alsoPurchased-odd, TR.payment-odd, TR.productListing-odd, TR.productReviews-odd, TR.upcomingProducts-odd, TR.shippingOptions-odd {
background: #f8f8f9;
border-bottom-color: #000000;
border-bottom-style: solid;
border-bottom-width: thin;
}

TR.accountHistory-even, TR.addressBook-even, TR.alsoPurchased-even, TR.payment-even, TR.productListing-even, TR.productReviews-even, TR.upcomingProducts-even, TR.shippingOptions-even {
 background: #f8f8f9;
}

 

using a different background color for TR.productListing-even will change the background color on alternate rows, giving a visual separation of the items.

 

I changed this and it is not working :(

Link to comment
Share on other sites

  • 1 month later...

Okay.. I just read through 95+/- pages, and may have missed this, but...

 

 

I am trying to set up my store like this and I thought this contribution would do it for me (it still might, but I'm braindead and clueless at this point. In fact, this contribution is what brought me over from ZenCart, which is what I've always used.

 

What I am attempting to accomplish here is to create a "master product", which is nothing more than a "header" for the "sub products". The master will have the description and picture of the slaves, but that's it. No price, no "buy now", etc. It is not available as a "set".

 

In addition, I'm trying to figure out how to limit the columns on the slave product listings... I only want/need "Model", "Name", "Qty" and "Price".

 

 

Does any of this make any sense? I hope so.. and I hope someone can help.

 

Oh, and I can't add slaves to the cart.

 

Thanks, and great contribution.

 

Jon

Link to comment
Share on other sites

What I am attempting to accomplish here is to create a "master product", which is nothing more than a "header" for the "sub products". The master will have the description and picture of the slaves, but that's it. No price, no "buy now", etc. It is not available as a "set".

 

In addition, I'm trying to figure out how to limit the columns on the slave product listings... I only want/need "Model", "Name", "Qty" and "Price".

Does any of this make any sense? I hope so.. and I hope someone can help.

 

Oh, and I can't add slaves to the cart.

 

Thanks, and great contribution.

 

Jon

 

kind of like this?

This is a test site, so not glamorous. But, does show some of the different things I've integrated.

 

If you can't add orders to the cart, check your coding. You missed something. Setting what is displayed is easy, just need to make changes in your admin panel under configuration slaves. Set to 0 stuff you don't want to show.

Edited by Geotex

GEOTEX from Houston, TX

 

(George)

Link to comment
Share on other sites

kind of like this?

This is a test site, so not glamorous. But, does show some of the different things I've integrated.

 

If you can't add orders to the cart, check your coding. You missed something. Setting what is displayed is easy, just need to make changes in your admin panel under configuration slaves. Set to 0 stuff you don't want to show.

 

Geo.. thank you so much.. yup, you've got that set up exactly as I had envisioned (well, maybe some different pictures..) :-)

 

Any suggestions where I should look for the not-being-added-to-the-cart thing? I've got a clean install of OSC and a clean install of MS..

 

Thank for your help. :-)

 

 

Jon

Link to comment
Share on other sites

Geo.. thank you so much.. yup, you've got that set up exactly as I had envisioned (well, maybe some different pictures..) :-)

 

Any suggestions where I should look for the not-being-added-to-the-cart thing? I've got a clean install of OSC and a clean install of MS..

 

Thank for your help. :-)

Jon

 

The most likely areas are product_info.php because this contribution changes the form name. Next is includes/application_top.php because the defines for entering slave products are here. Also, if you are using RC1 or RC2, it might not work at all. I don't know if anyone has tested Master/Slave on these platforms. I had to do some changes to get it to work with 2.2ms 06-08-17, and did a bunch of database rewrites moving compatibility of my carts to PHP 5.1.x and mySQL 5.0.x. As to exactly what, I don't recall because I have heavily modified carts, and most contributions don't work "out of the box" even on a clean install.

 

Once you get it working as it is supposed to (and it does, that's why I suggested you check your code carefully!) post here or pm me and I will tell you how to easily remove the price/buy now from the main screen.

 

(spelling edit)

Edited by Geotex

GEOTEX from Houston, TX

 

(George)

Link to comment
Share on other sites

The most likely areas are product_info.php because this contribution changes the form name. Next is includes/application_top.php because the defines for entering slave products are here. Also, if you are using RC1 or RC2, it might not work at all. I don't know if anyone has tested Master/Slave on these platforms. I had to do some changes to get it to work with 2.2ms 06-08-17, and did a bunch of database rewrites moving compatibility of my carts to PHP 5.1.x and mySQL 5.0.x. As to exactly what, I don't recall because I have heavily modified carts, and most contributions don't work "out of the box" even on a clean install.

 

Once you get it working as it is supposed to (and it does, that's why I suggested you check your code carefully!) post here or pm me and I will tell you how to easily remove the price/buy now from the main screen.

 

(spelling edit)

 

 

I'll post here, in case anyone else runs into the same issues as I have...

 

I checked the code over in those two files.. the only real discrepancy I found was a missing /form tag.. then again, I'm not a php programmer.

 

I am, in fact using v2.2 RC2.

 

From here I guess I'll search the forum outside of this thread for issues with the shopping cart.

 

Thanks. :-)

Link to comment
Share on other sites

Edited -- never mind... found the answer in the forums almost as soon as I had asked... thank you very much... the answer is here

http://www.oscommerce.com/forums/index.php?s=&...t&p=1167467

 

 

Forgive me if this is covered someplace in this forum, but I've been looking and am not sure what to search on... anyway, I have Master Products installed and for the most part, it is working correctly, however, we have a weird situation in that sometimes the slave will show up under the wrong Master, even though it is assigned to the correct Master. I'm trying to narrow down why/how this happens but so far, it's a mystery.

 

The one interesting clue I've noticed is when it happens the product id's are similar (for example, if I have a product id of 98, it is also showing the slaves for product id 198, but not vice versa)

 

Has anybody seen this before and can you point me in the right direction for bug fixing? Meanwhile, I'll keep plugging away...

 

Many thanks,

Janet

Edited by janetgot
Link to comment
Share on other sites

Lovely.

 

I wiped everything clean and started over. I'm now stuck with this error:

 

Fatal error: Call to a member function add_current_page() on a non-object in /[all the domain stuff]/includes/application_top.php on line 312

 

 

Yes, I'm sure I did something wrong during my cut & paste. I've searched the forums and found many people with this same problem, but no fixes.

 

I know someone here has had this issue and has fixed it.. would really appreciate a filename at least, not just a "check your code".

 

Thanks.

Link to comment
Share on other sites

I wiped out all the files (again), sis a clean install of 2.2 RC2, worked like a champ. I uploaded the MP files and am now getting a "FATAL ERROR: register_globals is disabled in php.ini, please enable it!" error.

 

That, and the email from the ex wife informing me what a loser I am.

 

Been a great day. I give up on this web crap.

Edited by mainestratman
Link to comment
Share on other sites

I wiped out all the files (again), sis a clean install of 2.2 RC2, worked like a champ. I uploaded the MP files and am now getting a "FATAL ERROR: register_globals is disabled in php.ini, please enable it!" error.

 

That, and the email from the ex wife informing me what a loser I am.

 

Been a great day. I give up on this web crap.

 

Appears that your hosting company has done you a "favor" and set register globals off. In your catalog directory, you will find a file called .htaccess. Replace it with the code below. It may clear up the problems of using current software on late-model operating systems with older versions of mods. Don't be surprised if the global problem goes away only to be replaced by all or some pages throwing up a database error.

 

# $Id: .htaccess 1739 2007-12-20 00:52:16Z hpdl $
#
# This is used with Apache WebServers
#
# For this to work, you must include the parameter 'Options' to
# the AllowOverride configuration
#
# Example:
#
# <Directory "/usr/local/apache/htdocs">
#   AllowOverride Options
# </Directory>
#
# 'All' with also work. (This configuration is in the
# apache/conf/httpd.conf file)

# The following makes adjustments to the SSL protocol for Internet
# Explorer browsers

#<IfModule mod_setenvif.c>
#  <IfDefine SSL>
#	SetEnvIf User-Agent ".*MSIE.*" \
#			 nokeepalive ssl-unclean-shutdown \
#			 downgrade-1.0 force-response-1.0
#  </IfDefine>
#</IfModule>

# If Search Engine Friendly URLs do not work, try enabling the
# following Apache configuration parameter

# AcceptPathInfo On

# Fix certain PHP values
# (commented out by default to prevent errors occuring on certain
# servers)

# php_value session.use_trans_sid 0
php_value register_globals 1

 

ps: I know all about how the (h)ex can make your day. Maybe she will do you a favor like mine did and get married to a real loser. :rolleyes: :rolleyes:

GEOTEX from Houston, TX

 

(George)

Link to comment
Share on other sites

Appears that your hosting company has done you a "favor" and set register globals off. In your catalog directory, you will find a file called .htaccess. Replace it with the code below. It may clear up the problems of using current software on late-model operating systems with older versions of mods. Don't be surprised if the global problem goes away only to be replaced by all or some pages throwing up a database error.

 

snip

 

ps: I know all about how the (h)ex can make your day. Maybe she will do you a favor like mine did and get married to a real loser. :rolleyes: :rolleyes:

 

 

Hey Geo...

 

The store works fine until I install MS2.. then the global register thing freaks out.

 

During install of osc, the install reports the registers are off, and has a green checkmark to it.

 

You'd mentioned that MS2 may not be compatible with v2.2 RC2... what are you running to make it work?

Link to comment
Share on other sites

Hey Geo...

 

The store works fine until I install MS2.. then the global register thing freaks out.

 

During install of osc, the install reports the registers are off, and has a green checkmark to it.

 

You'd mentioned that MS2 may not be compatible with v2.2 RC2... what are you running to make it work?

 

Did you change the .htaccess file to set the register-globals flag to on? If that doesn't work, check with your tech support, they may be able to help you with a script that will work. If they won't/can't, hope you have a short term contract so you can move your site to a host that is familiar with osCommerce. Just a side thought, but what version of PHP is your server using? the RC2 only requires register globals on for PHP versions before 4.3 re

 

My biggest concern is that if you have all the files properly copied and installed, you will get database errors, and I will need to know exactly what they are and probably a copy of the page causing the error since I don't know what other changes than Master/Slave might have been made.

 

As to my "setup" -- Not a smart Alec answer, but the only way I can put it is "highly modified". I started on whatever was out in 2003, then started clean when MS2.2 was originally released. I've added the updates to my original since it is generally easier to merge updates than to try to install and rewrite all the already rewritten great ideas, lousy code contributions, plus another 50 or so I wrote to handle custom needs. Right now, I am merging a lot of the RC2 code into my set up, which is already running well on PHP 5.2.x and mySQL 5.0.x, but still have some old stuff that breaks with register globals off.

 

btw.. if you are using other than an osCommerce distribution (oscmax, or one of the other forks), you will have to use their forums for help, and good luck on getting any.

Edited by Geotex

GEOTEX from Houston, TX

 

(George)

Link to comment
Share on other sites

Did you change the .htaccess file to set the register-globals flag to on? If that doesn't work, check with your tech support, they may be able to help you with a script that will work. If they won't/can't, hope you have a short term contract so you can move your site to a host that is familiar with osCommerce. Just a side thought, but what version of PHP is your server using? the RC2 only requires register globals on for PHP versions before 4.3 re

 

My biggest concern is that if you have all the files properly copied and installed, you will get database errors, and I will need to know exactly what they are and probably a copy of the page causing the error since I don't know what other changes than Master/Slave might have been made.

 

As to my "setup" -- Not a smart Alec answer, but the only way I can put it is "highly modified". I started on whatever was out in 2003, then started clean when MS2.2 was originally released. I've added the updates to my original since it is generally easier to merge updates than to try to install and rewrite all the already rewritten great ideas, lousy code contributions, plus another 50 or so I wrote to handle custom needs. Right now, I am merging a lot of the RC2 code into my set up, which is already running well on PHP 5.2.x and mySQL 5.0.x, but still have some old stuff that breaks with register globals off.

 

btw.. if you are using other than an osCommerce distribution (oscmax, or one of the other forks), you will have to use their forums for help, and good luck on getting any.

 

Geo..

 

"Yes" on the .htaccess file... although before I went and screwed up my initial installation with another contribution (overwrote the files *after* overwriting them for MP.. that was the first scrapped install), MP was working fine, with the exception that slaves weren't being added to the cart.. no changes to .htaccess necessary.

 

registers have always been off on this server.. and I'm running v5.2.3.

 

As for which page is causing the error.. it is apparently index.php. I can log into the admin side just dandy.

 

Oh boy.. looks like mySQL server is going on strike.. LOL How do I get myself into these messes? I'm packing it in for the night. Hopefully the server will figure out what it wants to do come morning.

Link to comment
Share on other sites

Geo..

 

"Yes" on the .htaccess file... although before I went and screwed up my initial installation with another contribution (overwrote the files *after* overwriting them for MP.. that was the first scrapped install), MP was working fine, with the exception that slaves weren't being added to the cart.. no changes to .htaccess necessary.

 

registers have always been off on this server.. and I'm running v5.2.3.

 

As for which page is causing the error.. it is apparently index.php. I can log into the admin side just dandy.

 

Oh boy.. looks like mySQL server is going on strike.. LOL How do I get myself into these messes? I'm packing it in for the night. Hopefully the server will figure out what it wants to do come morning.

 

Try a couple of tests. In your browser, go directly to mysite.com/catalog/privacy.php and mysite.com/catalog/products_new.php.

 

If neither of the pages load, the problem is most likely in includes/application_top.php.

GEOTEX from Houston, TX

 

(George)

Link to comment
Share on other sites

Try a couple of tests. In your browser, go directly to mysite.com/catalog/privacy.php and mysite.com/catalog/products_new.php.

 

If neither of the pages load, the problem is most likely in includes/application_top.php.

 

I wiped everything out again last night.. and got it all working... Kind of.. I was able to integrate the STS with the MP, and everything works as advertised, except I'm still having the "slaves not getting added to the cart" thing.

 

 

I thought I'd replaced all the "add_products" to "add_slaves" though.

 

Ugh.. this is frustrating, but not nearly as bad as yesterday. :-)

Link to comment
Share on other sites

I wiped everything out again last night.. and got it all working... Kind of.. I was able to integrate the STS with the MP, and everything works as advertised, except I'm still having the "slaves not getting added to the cart" thing.

I thought I'd replaced all the "add_products" to "add_slaves" though.

 

Ugh.. this is frustrating, but not nearly as bad as yesterday. :-)

 

Check this section in catalog/includes/application_top.php against yours:

 

// Shopping cart actions
 if (isset($HTTP_GET_VARS['action'])) {
// redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled
if ($session_started == false) {
  tep_redirect(tep_href_link(FILENAME_COOKIE_USAGE));
}

if (DISPLAY_CART == 'true') {
  $goto =  FILENAME_SHOPPING_CART;
  $parameters = array('action', 'cPath', 'products_id', 'pid');
} else {
  $goto = basename($PHP_SELF);
  if ($HTTP_GET_VARS['action'] == 'buy_now') {
	$parameters = array('action', 'pid', 'products_id');
  } else {
	$parameters = array('action', 'pid');
  }
}
switch ($HTTP_GET_VARS['action']) {
  // customer wants to update the product quantity in their shopping cart
  case 'update_product' : for ($i=0, $n=sizeof($HTTP_POST_VARS['products_id']); $i<$n; $i++) {
							if (in_array($HTTP_POST_VARS['products_id'][$i], (is_array($HTTP_POST_VARS['cart_delete']) ? $HTTP_POST_VARS['cart_delete'] : array()))) {
							  $cart->remove($HTTP_POST_VARS['products_id'][$i]);
							} else {
							  if (PHP_VERSION < 4) {
								// if PHP3, make correction for lack of multidimensional array.
								reset($HTTP_POST_VARS);
								while (list($key, $value) = each($HTTP_POST_VARS)) {
								  if (is_array($value)) {
									while (list($key2, $value2) = each($value)) {
									  if (ereg ("(.*)\]\[(.*)", $key2, $var)) {
										$id2[$var[1]][$var[2]] = $value2;
									  }
									}
								  }
								}
								$attributes = ($id2[$HTTP_POST_VARS['products_id'][$i]]) ? $id2[$HTTP_POST_VARS['products_id'][$i]] : '';
							  } else {
								$attributes = ($HTTP_POST_VARS['id'][$HTTP_POST_VARS['products_id'][$i]]) ? $HTTP_POST_VARS['id'][$HTTP_POST_VARS['products_id'][$i]] : '';
							  }
							  $cart->add_cart($HTTP_POST_VARS['products_id'][$i], $HTTP_POST_VARS['cart_quantity'][$i], $attributes, false);
							}
						  }
						  tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
						  break;
  // customer adds a product from the products page
  case 'add_product' :	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']))+$quantity, $HTTP_POST_VARS['id']);
						  }
						  tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
						  break;
 //Master Products
 // customer adds multiple products from the master_listing page
  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;
 //Master Products EOF
  // performed by the 'buy now' button in product listings and review page
  case 'buy_now' :		if (isset($HTTP_GET_VARS['products_id'])) {
							if (tep_has_product_attributes($HTTP_GET_VARS['products_id'])) {
							  tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id']));
							} else {
							  $cart->add_cart($HTTP_GET_VARS['products_id'], $cart->get_quantity($HTTP_GET_VARS['products_id'])+1);
							}
						  }
						  tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
						  break;
  case 'notify' :		 if (tep_session_is_registered('customer_id')) {
							if (isset($HTTP_GET_VARS['products_id'])) {
							  $notify = $HTTP_GET_VARS['products_id'];
							} elseif (isset($HTTP_GET_VARS['notify'])) {
							  $notify = $HTTP_GET_VARS['notify'];
							} elseif (isset($HTTP_POST_VARS['notify'])) {
							  $notify = $HTTP_POST_VARS['notify'];
							} else {
							  tep_redirect(tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'notify'))));
							}
							if (!is_array($notify)) $notify = array($notify);
							for ($i=0, $n=sizeof($notify); $i<$n; $i++) {
							  $check_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . $notify[$i] . "' and customers_id = '" . $customer_id . "'");
							  $check = tep_db_fetch_array($check_query);
							  if ($check['count'] < 1) {
								tep_db_query("insert into " . TABLE_PRODUCTS_NOTIFICATIONS . " (products_id, customers_id, date_added) values ('" . $notify[$i] . "', '" . $customer_id . "', now())");
							  }
							}
							tep_redirect(tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'notify'))));
						  } else {
							$navigation->set_snapshot();
							tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
						  }
						  break;
  case 'notify_remove' :  if (tep_session_is_registered('customer_id') && isset($HTTP_GET_VARS['products_id'])) {
							$check_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . $HTTP_GET_VARS['products_id'] . "' and customers_id = '" . $customer_id . "'");
							$check = tep_db_fetch_array($check_query);
							if ($check['count'] > 0) {
							  tep_db_query("delete from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . $HTTP_GET_VARS['products_id'] . "' and customers_id = '" . $customer_id . "'");
							}
							tep_redirect(tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action'))));
						  } else {
							$navigation->set_snapshot();
							tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
						  }
						  break;
  case 'cust_order' :	 if (tep_session_is_registered('customer_id') && isset($HTTP_GET_VARS['pid'])) {
							if (tep_has_product_attributes($HTTP_GET_VARS['pid'])) {
							  tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['pid']));
							} else {
							  $cart->add_cart($HTTP_GET_VARS['pid'], $cart->get_quantity($HTTP_GET_VARS['pid'])+1);
							}
						  }
						  tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
						  break;
}
 }

GEOTEX from Houston, TX

 

(George)

Link to comment
Share on other sites

Check this section in catalog/includes/application_top.php against yours:

 

 <snip>

 

 

Well, interestingly enough, I'm missing the section

	 //Master Products
 // customer adds multiple products from the master_listing page
  case 'add_slave' :

 

Upon adding it, I get a happy little new error when adding items to the cart:

 

Fatal error: Call to undefined method currencies::calculate_price() in /home/blahblahblah/includes/classes/shopping_cart.php on line 272

 

It doesn't come up when I'm using it in a different browser (ie. one that doesn't have any active cookies for the site), but that error has completely disabled the whole site for my cookie.

 

Upon reloading the original osc file (because my dumb ass didn't make a back-up first), I get a different error:

Fatal error: Call to a member function image() on a non-object in /home/blahblahblah/includes/functions/html_output.php on line 78

 

and upon loading the MS2 version of the file, I get that annoying register globals error.

Link to comment
Share on other sites

snip

 

Upon adding it, I get a happy little new error when adding items to the cart:

 

Fatal error: Call to undefined method currencies::calculate_price() in /home/blahblahblah/includes/classes/shopping_cart.php on line 272

 

It doesn't come up when I'm using it in a different browser (ie. one that doesn't have any active cookies for the site), but that error has completely disabled the whole site for my cookie.

 

and upon loading the MS2 version of the file, I get that annoying register globals error.

 

You were close. It appears that you might have a mix of files on your server from different versions? the error noted is a call to a function listed in includes/classes/currencies.php. That was a simple fix, just being sure you had the proper version of currencies.php in your classes directory.

 

I do not know how you are adding files, but let me make a suggestion that will certainly reduce the severity of the headaches you are causing yourself.

 

I noted in an earlier post that you are using sts. If you have not done so, download the latest ver. 4.5.8 for all versions.

 

Make a copy of the entire current cart with Master/slave installed.

 

Install sts 4.5.8 on a plain vanilla RC2 per instructions. Put on your server to verify that it works properly. By working properly, I mean that you tested with the sts set in your admin panel to false (don't use), and again perform all tests with sts set in your admin panel to true (or use).

 

Then, if it works, make a copy of the full cart to another directory on your local hard drive.

 

If you do not have a file comparison utility such as Beyond Compare, google it and find a free one you can download.

 

Compare each file that has Master/Slave changes to the working copy of RC2/STS, do the merges for ONLY the M/S contribution using the file comparison utility then upload and try.

 

You really should have no errors after following that procedure. If you do, recheck all your changes made to add Master/Slave.

 

It really isn't rocket science. It is just persistence and double checking all your work. Since you already obviously had it working once, except for a missing routine which was not part of the STS or M/S, you are close to a solution.

 

When you have done all of the above, and know that you have all correct, you may have a minor db call error here or there due to incompatibilities between mySQL 5.x.x and mySQL 3.23.x/4.x.x where the original db calls in the contribution were written before the introduction of mySQL 5.x.x. If you cannot find the solution in this forum for the minor db errors or whatever, PM me, as I have too much mail coming in to keep a timely track of this thread.

GEOTEX from Houston, TX

 

(George)

Link to comment
Share on other sites

Hi Geo,

 

I tried it again... following your directions to the letter, and it's still not working.

 

I will have to find a different solution.

 

Thanks for all your help though. :-)

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