I am trying to add a tag to my products for a specific condition.
Currently, I have this coded in product-list.tpl, which allow me to show if a product is in stock or not and shows a green IN STOCK tag or a red OUT OF STOCK tag, depending on the stock.
I want to add a third, orange option (PREORDER NOW), when a specific product has quantities and Allow orders is activated in the quantities tab. By default, all my products are Deny orders when out of stock activated.
I used to have modules to handle preorders but all three of them no longer work in TB. I was able to make the tag work with the modules at the time, so I figured that we could just bypass the whole ordeal with something simple however, I have not been able to figure it out. We always know the quantities we have available for preorder ahead of time and it applies only to a very limited amount of products. We want to tag the item because the product is not readily available (the availability date of the product appears on the product page).
This is what I think would work in product-list.tpl:
{if $product.quantity >0}<div class='instock'>{l s='in stock'}</div>{else}<div class='outofstock'>{l s='out of stock'}</div>
{/if}
{if (if $product.quantity >0) && (if whatever is the allow orders variable is =1}
<div class='preorder'>{l s='PREORDER NOW!'}</div>
{/if}
So I am wondering, instead of the module conditions, which variable determines if Allow orders is activated or not? And since I am not a coder, would any of you that knows more than me about all of this think it would work?
Question
movieseals
Hello everyone,
I am trying to add a tag to my products for a specific condition.
Currently, I have this coded in product-list.tpl, which allow me to show if a product is in stock or not and shows a green IN STOCK tag or a red OUT OF STOCK tag, depending on the stock.
I want to add a third, orange option (PREORDER NOW), when a specific product has quantities and Allow orders is activated in the quantities tab. By default, all my products are Deny orders when out of stock activated.
I used to have modules to handle preorders but all three of them no longer work in TB. I was able to make the tag work with the modules at the time, so I figured that we could just bypass the whole ordeal with something simple however, I have not been able to figure it out. We always know the quantities we have available for preorder ahead of time and it applies only to a very limited amount of products. We want to tag the item because the product is not readily available (the availability date of the product appears on the product page).
This is what I think would work in product-list.tpl:
So I am wondering, instead of the module conditions, which variable determines if Allow orders is activated or not? And since I am not a coder, would any of you that knows more than me about all of this think it would work?
Thank you!
Edited by movieseals4 answers to this question
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now