Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Error Message Needed If Size Isn't Selected


Recommended Posts

I'm using this script for an air filter store. When purchasing a filter the needed size should be selected, which each filter has a set of "Option Values" sizes to choose from. Currently the first size listed in the pulldown menu will be selected when ordered if the person ordering the filter doesn't choose a different size. The problem is that some of the people who are ordering don't select the size needed and the wrong size is sent to them. What I would like to have is for the first listing in the menu to be something like "-- Choose Size Here --", and if a size isn't selected a pop error message saying so.


This is one of the products showing the drop down menu of sizes:





Link to comment
Share on other sites

Thanks a bunch, that looks exactly what I need.


I've downloaded it and it looks simple to install but I'm receiving an error. Would anyone know what this error means?


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();


within code:

//BoF CB Enforce attribute selection
                              if (is_array($HTTP_POST_VARS['id']) ) {
                                while (list($option, $value) = each($HTTP_POST_VARS['id'])) {
                                 //if (($value == 9) or ($value == 10) or ($value == 999) ) {
                                 // 9 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'));
                              } 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']));
                              //EoF CB



Btw, my "-select-" value is 22.


Thank you for any help!,


Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...