Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Must Select v1.2 - Fatal error: Call to a member function


hominid4

Recommended Posts

Hi? I'm trying to use the contribution Must Select v1.2 and it seems really simple to "install" but I keep receiving the error:

 

Fatal error: Call to a member function on a non-object in /home/...../catalog/includes/application_top.php on line 362

 

 

Line 362 is $messageStack->reset();

 

 

which is within this code:

//BoF CB Enforce attribute selection
                              if (is_array($HTTP_POST_VARS['id']) ) {
                                $messageStack->reset();                                  
                                while (list($option, $value) = each($HTTP_POST_VARS['id'])) {
                                 //if (($value == 9) or ($value == 10) or ($value == 999) ) {
                                 // 22 is the value for "-select-"
                                 if ($value == 22) {
                                    tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id'] . '&mustselect=product_info'));
                                    break;
                                 }
                                }
                              } elseif (tep_has_product_attributes($HTTP_POST_VARS['products_id'])) {
                                  tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_POST_VARS['products_id']));
                                  break;
                              } 
                              //EoF CB

 

 

My "-select-" value is 22. Is anyone here using this and if so would you know what this error means?

 

Thank you for any help!,

Wesley

Link to comment
Share on other sites

solution is to change the offending line in application_top to:

 

if (is_array($messageStack)) { $messageStack->reset(); }

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

That was it, thanks! It's working perfect and just what I needed.

 

Here's one of the pages where I inserted it:

http://garyontheair.com/store/product_info.php?products_id=3

 

 

And used the "Sorting Attributes" contribute so to sort the drop down in alphabetical order:

http://www.oscommerce.com/community/contri...Product+Options

 

 

Thanks again.

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.
Note: Your post will require moderator approval before it will be visible.

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