Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Call to a member function on a non-object MVS + IPS


Recommended Posts

Wondering if anyone can point out what I think is a small syntax problem in the following.


I have Individual Product Shipping working with Multi Vendor, but the problem I run into in the code is where in the class I specify that if IPS_status is set, only show IPS. The regular shipping class has it set up like this:


if (tep_get_configuration_key_value('MODULE_SHIPPING_INDVSHIP_STATUS') and $shiptotal) {
		$include_modules[] = array('class' => 'indvship', 'file' => 'indvship.php');
	  } else {
						  foreach ($installed_modules_array as $value) {
		  $class = substr($value, 0, strrpos($value, '.'));
		  // Don't show Individual Shipping Module
		  if ($class != 'indvship')  {
			$include_modules[] = array('class' => $class, 'file' => $value);


I put this into my vendor_shipping and after 3 days of hacking, I think it is almost working, but it is returning this error every time:


Fatal error: Call to a member function on a non-object


It works perfectly in the regular shipping class. My question is, do I need to define something somewhere or is there some reason that it cannot identify:


$include_modules[] = array('class' => 'indvship', 'file' => 'indvship.php');


If I replace that line with:


$include_modules[] = array('class' => $class, 'file' => $value);


It will work, returning all of the vendor's shipping options, but I need it to say "If an IPS is set, only show that, if it is not set, return all other options.


I am so close, someone please help!!! :(



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.

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