OK I know I said PHP but I changed it to Javascript, I am now working on the PHP version.
I am working on our own custom out of stock system, I know there a way of doing it in the advanced guild but I dont want to do it that way, what I like to do is add my own system using PHP or Javascript.
I can get it to display the out of stock message oK but when it comes to adding the add to cart button I am having a few problems.
Can any one give me any advice.
I tried this in javascript:
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
var stockl=<actinic:variable name="StockLevel" />;
var outstock=0
if (stockl == outstock) {
document.write("Out of stock")
}
else {
document.write ("<actinic:variable name="AddToCartButton" />");
}
</script>
and almost simalert in PHP but not sure how to tell it to wright the add to cart button so that it works.
I know a javascript pritty well a bit of a new commer to php but I am picking that up quick but not sure how to proced with the actinic veriables wright back.
ta
Darren
Comment