moy2010 Posted October 25, 2017 Share Posted October 25, 2017 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. Link to comment Share on other sites More sharing options...
moy2010 Posted October 25, 2017 Author Share Posted October 25, 2017 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} Link to comment Share on other sites More sharing options...
moy2010 Posted October 25, 2017 Author Share Posted October 25, 2017 Oh, lol. Didn't notice that one. Let's mark this as solved then. I hope this is useful for somebody else. 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