Trying to get my online store up & running, but I'm having issues with the stock aspect of Store.

I'm using the default code that came with Store for individual products, aside from having removed the SKU section. When I create a product entry, I'm selecting "Limit Stock", then selecting the checkbox under that & inputting the qty. of product I have. (Let's say 8.) I go about the rest of my business, creating the product post - publish it, refresh the page, and where Stock is located in the form, it's outputting absolutely nothing. Should there not be "8" next to "Stock"?

Here's the snippet of code for that particular area, as well as the URL where you can see what I'm talking about:

<div class="control-group">
<label class="control-label">Stock Qty:</label>
<div class="controls">
<span class="store_product_stock">
<!-- automatically set -->

Product Dev

(That commented out part that says "automatically set" was there when the module propagated the templates.)

I've tried putting the following in it's place, but I still get an empty result.

{if total_stock > 5}
In Stock
{if:elseif total_stock <= 5 && total_stock != 0}
Low Stock
Out of Stock

I suppose I really don't understand how it's supposed to work, and your help would be greatly appreciated. Thank you! :)

2 Answers 2


Stock is calculated based upon the modifiers selected in your template. For example lets saying I am selling t-shirts in 3 different colors and 4 different sizes.

When I load the page I won't see a stock number using the classes until I select Med Green shirt which might have 8 in stock, if I then select red instead of green it would change to 3 since I only have 3 medium red shirts in stock.


From the comments below.

The Store javascript that handles the span class to show things like price or stock based upon modifier selection you will need to make sure that you have jQuery is included on your pages with Store tags.

  • Hmm....OK. That's a tricky one, because basically, it's soap. I make small batches, which yield appx. 10 bars per batch. I'm trying to achieve the customer's ability to see that, yes, there are 10 bars fully stocked (or 3 or 5), then "Out of Stock" if there are zero. There are no modifiers; it's a simple product. Do you have any advice or ideas on how to work around that? Thank you so much! I appreciate your help!
    – C.A
    Commented Jul 23, 2015 at 23:05
  • Products without modifiers should show on initial page load. What version of Store and EE are you using? Can you check your console to see if you have any JS/CSS errors Commented Jul 23, 2015 at 23:08
  • I'm using EE 2.9.3 (I downgraded from 2.10 because of the new coding they've implemented that requires my host to implement a feature that is ONLY available on VPS servers, and I can't afford a VPS), and Store version 2.5.1. The product does show, but not the quantity of the product that I have available. As far as checking for CSS/JS errors, where do I look for those? They don't render on the site, so I presume there are none. :) Thank you so much!
    – C.A
    Commented Jul 24, 2015 at 2:10
  • You would need to use something like Firebug or Chrome Developer Tools. On a mac in Safari you would hit Command + Option + C for example Commented Jul 24, 2015 at 3:33
  • Thanks Justin! OK, the only one that pops up in Firebug is this: >ReferenceError: jQuery is not defined store.js:184:0
    – C.A
    Commented Jul 24, 2015 at 12:44

Common practice in modern sites is that all .js files are loaded at the end of page. How to fix problem with store.js then? EE checks if "store.js?v=" is present then adds it if not. If you load all JS files at the end of page with actual store.js file in it, script will never find it and will add it just above those files. If you add all files as snippet (to maintain page easily) then you have duplicates and of course error: jQuery is not defined

Any news how to solve this issue?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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