How to grab variable from database and write an if statement

osman9

New Member
So, I'm using OpenCart 1.4.9.What I want to do is grab a variable made by a custom shipping product.The table in which it's coming from is 'product' and the row is 'shipping_by_product'As you can see here: http://i.imgur.com/beQxEdp.pngI want to add a little picture when browsing through the categories so they can see it's free shipping.Now, I was able to add this in the product listing (category.tpl template): http://i.imgur.com/HIY9yqQ.pngUsing this code:\[code\]<?php if($product_info['shipping_by_product'] == '0.0000'){ ?> <img src="http://stackoverflow.com/questions/15908759/LINK HERE" alt="Recommended by MADNESS"><br /><?php} ?>\[/code\]But that code doesn't work in category.tpl (The category template)I get an undefined index error for $product_info and for shipping_by_product.So I was thinking of just running a query to grab the information from the database and then add the conditional, or what other way can I do it?
 
Top