2032 Posts in 562 Topics by 442 members
|Go to End|
29 September 2011 at 9:36am
For out of stock items on my client's site, I would like to be able to show a friendly Out of Stock message along with a link to a 'request product/enquiry form' to capture customer's details so that the client can contact them when the products are back in stock.
The client is happy to maintain the stock levels by simply ticking/unticking the "Allow product to be purchased' checkbox.
So I need to incorporate logic that if this checkbox is unticked, display out of stock message with link to form.
Any ideas where/how I could do this?
Thanks for your help.
29 September 2011 at 1:17pm
Hi Mitz, when you're in a template in the context of a product you should be able to add some simple logic i.e.
<% control Products %>
<% if AllowPurchase %>
<p><a href="link-to-buy/$ID">Buy now</a></p>
<% else %>
<p>This item is currently out of stock. You can <a href="link-to-form/$ID">request to be notified when it is available again</a>.</p>
<% end_if %>
<% end_control %>
Assuming AllowPurchase is the name of your checkbox field
|Go to Top|