If any of the shuffle options are enabled, pressing the "add to cart" button will sometimes have no effect. Because of the way the form API works, the form must exist at the '#action' URL. However shuffling the products means that the needed form_id will only be present by chance.

Comments

grendzy’s picture

Status: Active » Needs review
StatusFileSize
new1.67 KB
torgospizza’s picture

Cool, thanks for the patch. I'll review ASAP.

torgospizza’s picture

Status: Needs review » Fixed

Looks good, committing to Dev. Will be in the next release of 1.x and will roll into 2.0 as well. (Right now they are the same code...)

grendzy’s picture

Status: Fixed » Needs work

whoops, I left a @TODO in that patch, the form key uc_product_add_to_cart_form_N is only for "add to cart" button. I haven't tried it, but I assume the same issue would manifest if using a "buy now" button. Should be a quick adjustment, just adding an extra condition to the if statement.

Thanks for committing this!

torgospizza’s picture

Yeah, it's a minor edit, just added an OR condition to look for strpos of uc_catalog_buy_it_now_form_ (instead of add_to_cart_form_).. seems to work :)

torgospizza’s picture

Status: Needs work » Needs review
StatusFileSize
new1.04 KB

Here's a patch against the latest Dev. (It replaces your patch.)

grendzy’s picture

I haven't tried it, but that looks right.

torgospizza’s picture

Status: Needs review » Fixed

Committed to CVS.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.