Jump to content

[SOLVED]Question about code in my product.tpl - regarding available stock.


Recommended Posts

I have been unable to get my stock quantities to display. I re-installed 1.4.7, but still no stock quantities were showing (using new template) until, by accident, I put a space in my code. Now my stock quantities are displayed. If I take the space out, the quantities are gone again. This is beyond me -- I do not know code. Can someone please explain this to me?

 

<p id="pQuantityAvailable"> stock quantities will not display (fresh install)

 

<p id=pQuantityAvailable" > adding the space before the > makes my stock quantities display.

 

I hope someone can explain this to me.

 

Is anyone else having a problem getting their stock quantities to display?

 

Hope someone will respond. Thank you! Dixie stitchbin.com

Link to comment
Share on other sites

<p id="pQuantityAvailable">

<p id=pQuantityAvailable">

The second example you give missing the opening quote. Is this deliberate? Space should not matter. Quantities are there but are hidden by a CSS rule. Check the following setting:</p>

 

Back Office > Preferences > Products > Display available quantities on product page:

Link to comment
Share on other sites

Thank you so much for answering my plea for help! I copied more of my code for you to look at. The code is as it was when I installed the program -- I didn't make any edits. Hope you can see what the problem is. If you go to my website, you can view the code, also. When I use Firebug to view the code, and add the space before the >, my available stock will display - delete the space, and it no longer displays. This is way beyond me. My website: stitchbin.com My site is not live yet. Thank you! Also, I don't know what "opening code" is -- sorry.

 

<p id="availability_statut" style="display: none;">

 

 

<span id="availability_label">Availability:</span>

 

<span id="availability_value"> </span>

</p>

 

<img class="twisty " role="presentation" /><p id="pQuantityAvailable" style="display: block;">

 

 

<span id="quantityAvailable">2</span>

 

<span id="quantityAvailableTxt" style="display: none;">item in stock</span>

 

<span id="quantityAvailableTxtMultiple">items in stock</span>

</p>

 

<p id="oosHook" style="display: none;"></p>

 

<p id="last_quantities" class="warning_inline" style="display: none;">Only one left in stock!</p>

</div>

Link to comment
Share on other sites

As I said,

 

Go to Back Office > Preferences > Products > Display available quantities on product page and select YES

 

It has nothing to do with the space you are adding. The element has a CSS rule => display: none. When you manipulate the code in firebug you are invalidating the CSS rule hence the hidden element is displayed.

Link to comment
Share on other sites

Yeah! That fixed it. Now my stock quantities are displayed. Is this a bug, or something that I should have known to do? There must be other non coders that have the same issue. I have been trying to figure this out for over a week. Can't thank you enough.

 

Dixie

Link to comment
Share on other sites

You're welcome.

Is this a bug

No, it is the way the theme is authored. Why it is hidden by a CSS rule while there is a setting for it in BO, I don't know. you'll need to ask the theme developer.

, or something that I should have known to do?

Not necessarily.

There must be other non coders that have the same issue

who will be thankful to you for asking here :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...