My first real forray into Javascript.
I want to put a wrapper around a Product Layout to check the real time stock level. If it is <= Suspend Level then I want it to write a DIV with display:none. i.e if real time stock level is at or below suspend level then I want to hide the product from the customer.
I've got this far :
which seems to work.
But I'm not sure it's checking the real time stock level.
I'm beginning to think I'm being a bit simplistic. Am I going in the right direction?
thanks
Goz.
I want to put a wrapper around a Product Layout to check the real time stock level. If it is <= Suspend Level then I want it to write a DIV with display:none. i.e if real time stock level is at or below suspend level then I want to hide the product from the customer.
I've got this far :
Code:
<script language=Javascript1.2> if ( <actinic:variable name="StockLevel" /> <= <actinic:variable name="StockSuspendLevel" /> ) // out of stock { document.write('<div style="display:none;">'); } else { document.write('<div>'); } </script>
But I'm not sure it's checking the real time stock level.
I'm beginning to think I'm being a bit simplistic. Am I going in the right direction?
thanks
Goz.
Comment