0

In one of the project i saw visibility as orphaned as far i know there is no by default functionality to set visibility as orphaned.

I trying to know how this option is created because when we set a product as orphaned its visible in frontend even in configurable associated product.

magento product

I found a plugin which override at /app/code/community/GPMD/SEOPack/Model/Product/Visibility.php

const VISIBILITY_ORPHANED = 5;
public function getVisibleInSiteIds()
    {
        return array(self::VISIBILITY_IN_SEARCH, self::VISIBILITY_IN_CATALOG, self::VISIBILITY_BOTH, self::VISIBILITY_ORPHANED);
    }

but i dont know how its affects the search functionality?

What is the use of ( in /app/code/core/Mage/Catalog/Model/Product/Visibility.php )

Do i need to add the  **VISIBILITY_ORPHANED** in these function 

     /**
         * Retrieve visible in search ids array
         *
         * @return array
         */
        public function getVisibleInSearchIds()
        {
            return array(self::VISIBILITY_IN_SEARCH, self::VISIBILITY_BOTH);
        }
     /**
         * Retrieve visible in site ids array
         *
         * @return array
         */
        public function getVisibleInSiteIds()
        {
            return array(self::VISIBILITY_IN_SEARCH, self::VISIBILITY_IN_CATALOG, self::VISIBILITY_BOTH);
        }
1

I think that from one of the module new value for Visibility has been created using script.

You can see the visibility in Visibility.php file

Mage_Catalog_Model_Product_Visibility

There are constants available for its value like

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

Might be some one override this file and added custom visibility option type.

| improve this answer | |
  • I found the file – inrsaurabh Oct 12 '18 at 6:54
  • Which file? Is that file override and added new option type inside it? – Dipak Bhambhani Oct 12 '18 at 6:55
  • yes , at /app/code/community/GPMD/SEOPack/Model/Product/Visibility.php – inrsaurabh Oct 12 '18 at 6:58
  • Okay Great!! Now you can do changes as per your requirement. – Dipak Bhambhani Oct 12 '18 at 6:59
  • pastebin.com/gmDGrgTs here is the file which overrided, as far i know its just adding the new option here, but not able to trace how it affects the search behaviour – inrsaurabh Oct 12 '18 at 6:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.