2

I'm having an issue where customers can order items that are out of stock. Looking for a solution in the Store docs and here on EESE i've come across Dynamic Product Variables. Unfortunately, I can't get them working consistently. The issue appears to be getting the 'Limit Stock' checkbox to stay consistently checked in the corresponding product's entry in EE:

EE entry view

Anytime i check that box, then save the entry, and go directly to the front-end, the dynamic variable works as it should. If the given product combination (color + size) is out of stock, it shows the dynamic variable (store_product_out_of_stock). If i go to any other entry in EE, then check that box for that product, then go back to view the first product on the front end, the dynamic variable shows no matter what. Going back into the first entry in EE shows that the box has been un-checked! Is there some-sort of persistance issue with the checkbox? Is this even important or merely a coincidence?

I'm on EE 2.5.3 and Store 1.6.3.

Thanks in advance for any help.

  • 1
    The checkbox you're referring to is to "select all", so will never remain ticked. On each row (modifier/variant) it shows that the tick boxes are all ticked and stock levels shown. Beyond that I think you need to supply more information: what does "first product no longer works" mean? Frontend? backend? What fails? – Peter Lewis Mar 26 '13 at 21:51
  • Thanks Peter, that makes sense. I added some additional details above to explain what i meant by "first product no longer works". Very vague initially, my apologies! Any further thoughts on why this dynamic variable doesn't appear to be behaving properly? – Pat Brumfield Mar 26 '13 at 23:29
  • Issue solved! Had to move jquery into the head of the page from the bottom. Must have been an issue of jquery not loading before Store's calls. And just a happy accident when it did work. – Pat Brumfield Mar 27 '13 at 5:48
  • Ah, nice catch! Can you post that as an answer so others can find it easily? – Adrian Macneil Mar 27 '13 at 12:06
2

The solution was to move the jquery call to the head of the page to initiate it prior to the store template tags

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.