Skip to content
View in the app

A better way to browse. Learn more.

thirty bees forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How to check product visibility in product template

Featured Replies

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.

  • 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}

  • 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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.