Magento – How to add custom visibility option in visibility attribute in products in magento

magento-1.7product-attribute

I want to have custom visibility option in visibility attribute in products in magento. Can anyone please tell how can I do this?

I want to add "Pending" visibility to products – Those products will not be visible in site, regardless of simple type or configurable or bundle or whatever.

I referred these posts but they do not suggest/not related with what I actually want :-

  1. Custom visibility on products
  2. Options values of attribute "visibility"
  3. How to get Product url and show in detail page even it is non visibility mode?

Best Answer

These were a constants, which is held in the class Mage_Catalog_Model_Product_Visibility you need to override that class and add your custom visibility option.

const VISIBILITY_NOT_VISIBLE    = 1;
const VISIBILITY_IN_CATALOG     = 2;
const VISIBILITY_IN_SEARCH      = 3;
const VISIBILITY_BOTH           = 4;

Here you can add your custom option and get it value.

Related Topic