Because of the way Drupal behaviors work, the ucOutOfStock behavior will be called both on page load and whenever an ahah method calls the Drupal.attachBehaviors method. So, I had a block of products on the checkout page and the out of stock message was added both on page load and when the shipping quote pane finished fetching the quotes. The attached patch just makes sure to remove any previous out of stock messages before adding new ones.

CommentFileSizeAuthor
out_of_stock_fix_multiple.patch2.15 KBjrust

Comments

summit’s picture

Status: Active » Reviewed & tested by the community

Hi, This patch is working great! Thanks for building it.
greetings, Martijn

juves’s picture

Thanks!

hanoii’s picture

Status: Reviewed & tested by the community » Fixed

I fixed this slightly different, but thanks for reporting

Status: Fixed » Closed (fixed)

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