Jump to content

BUG FIX - Option Sets that are Required can be Bypassed


bsmither

Recommended Posts

Not sure when product Option Sets were introduced (I think as of CC520), but it has been discovered that from the View Category page and the Latest Products area of the Homepage, a product with required options that were assigned via Option Sets can be added to the basket without first making the required selections. What is supposed to happen is the customer is to be taken to the View Product page with an 'error message' that says, "Please select required options before adding to your basket."

 

Here is the fix:

In the file /classes/catalogue.class.php, find the function getProductOptions, near line 512. About eleven lines down, find:

foreach ($groups as $group) {

On a new blank line after that, add this:

if ($group['option_required']) $this->_option_required = true;

Then, read this conversation beginning with post#7:

http://forums.cubecart.com/topic/46859-resolved-required-product-options-error/

 

 

Test thoroughly!

Link to comment
Share on other sites

  • 3 months later...
Guest
This topic is now closed to further replies.
×
×
  • Create New...