Jump to content

Question/solution regarding weird behaviour with out of stock items that are allowed to be ordered


mohsart
 Share

Recommended Posts

I started to carry some items that I don't keep in stock but are ordered directly from the supplier and I found this strange behaviour:
If there are no combinations for the products all is well, it's possible to order it and the text "Avalability: Delivered directly from supplier" is shown.
However, if there are combinations, underneath that the text about entering your email address to be told when it is in stock is shown. Now these items will never be in stock, so I prefered the behaviour without combinations.
So I looked in the code and found that if I inserted the if statement as below everything seems to work as it should.

{if !$allow_oosp}
   <!-- Out of stock hook -->

quantity > 0 || $allow_oosp} style="display:none;"{/if}>
   {$HOOK_PRODUCT_OOS}

{/if}


But I cannot say that I understand why.
Maybe someone with a little more understanding could enighten me, and if there are potential problems with the code, tell me.
If not, this is to be considered a tip to those who have the same problems I did. :-)

/Mats

Share this post


Link to post
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
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More