handel Posted January 29, 2012 Share Posted January 29, 2012 Hello - I am trying to recreate the red "New" banner that is applied to new products and use it to mark items "off menu". I am running a food delivery service and our weekly menu is smaller than the overall menu we offer for catering and special orders. I don't want customers to have to click through to the product detail page to find out if the product is available for regular order or not; it would be easier if they could just see from the product list. I copied the span.new format in the theme/css/product_list.css and just changed the color: #product_list li span.offmenu { display: block; position: absolute; top: 15px; right:-30px; padding: 1px 4px; width: 101px; font-size:10px; color: #fff; text-align: center; text-transform: uppercase; -moz-transform: rotate(45deg); -webkit-transform: rotate(45deg); background-color: #000099 } and then tried to insert the right code into product_list.tpl {if isset($product. available_for_order) && $product.quantity == 0)}<span class="offmenu">{l s='off menu'}</span>{/if} after the code for the previous code for the span class ="new". When I refresh the product list page disappears suggesting I have the wrong code or I haven't inserted it correctly. Any guidance on what I am doing wrong would be much appreciated. If there is an easier way to get the same result (know from product list which products are in stock/out of stock) that would be great as well. Thanks in advance. Link to comment Share on other sites More sharing options...
CartExpert.net Posted January 30, 2012 Share Posted January 30, 2012 Hello, You are missing a bracket right before $product.quantity. See below the correct code: {if isset($product. available_for_order) && ($product.quantity == 0)}<span class="offmenu">{l s='off menu'}</span>{/if} Link to comment Share on other sites More sharing options...
handel Posted January 31, 2012 Author Share Posted January 31, 2012 CartExpert - Thank you for helping me out. I really appreciate it. Link to comment Share on other sites More sharing options...
peanut Posted May 1, 2012 Share Posted May 1, 2012 I'm trying to do the same but only for out of stock products to be shown as 'SOLD OUT', but it's not working. 1 Link to comment Share on other sites More sharing options...
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