October 25, 20179 yr I want to check the product visibility in the product template (product.tpl). In product class there's the variable $visibility which stores a string: /** @var string ENUM('both', 'catalog', 'search', 'none') front office visibility */ public $visibility; And I've tried to access that variable directly fron product.tpl with no success. Is there a way to check if a class variable is passed to the controller? Or what do I need to do to have that variable available in the smarty template? Thanks in advance.
October 25, 20179 yr Author Thanks, Michael. I'm checking the string value like this, but it's not rendering the p tag :S {if $product->visiblity == 'both'} visibility is both {/if}
October 25, 20179 yr Author Oh, lol. Didn't notice that one. Let's mark this as solved then. I hope this is useful for somebody else.
Create an account or sign in to comment