Jump to content

Add another visibility option


Roman168140

Recommended Posts

Hey.I want do add another option to product visibility (in product informations) because i have products that may appears in special places only. I made changes at

 

  • informations.tpl where i add
<option value="related" {if $product->visibility == 'related'}selected="selected"{/if} >{l s='Related only'}</option>
  • In Validation file isProductVisibility:
return preg_match('/^both|catalog|search|related|none$/i', $s);
  • and in /classes/Product.php
'visibility' =>                 array('type' => self::TYPE_STRING, 'shop' => true, 'validate' => 'isProductVisibility', 'values' => array('both', 'catalog', 'search','related', 'none'), 'default' => 'both'),
  • and changed in DB ps_product Enum field 'visibility' that it accept 'related'

 

Saving works fine. In db it shows "related". But in AdminContrroller (BackOffice, front i can handle) on this product page( in informations tab ) there is no correct population because product->visibility =''

Why!?. Thanks in advance. 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...