Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9201909
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:07:54+00:00 2026-06-17T23:07:54+00:00

I am currently making a module so that users see on the checkout page

  • 0

I am currently making a module so that users see on the checkout page something like: “People who purchased product X also purchased Y, Z and T”.

I made a cronjob to calculate which are the related products for each product, and I added an attribute to products in the install script.

I decided (for simplicity) – to store the most related 5 products, so I want to store something like: 123-3-5543-1290-9911. But I don’t want the administrator to see this anywhere, and I tried the following:

$setup->addAttribute('catalog_product', $attrCode, array(
    // more stuff
    'type' => 'hidden',
    'input' => 'text',
    'visible' => 0,
    // more stuff
));

I looked here: http://blog.chapagain.com.np/magento-adding-attribute-from-mysql-setup-file/ and I found some interesting stuff, but not how to completely hide this field.

The alternative would be to create my own table, but this seems to be a slightly more elegant solution.

What do you think? Is it better to create my own table, or to add an attribute and hide it?

Thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T23:07:56+00:00Added an answer on June 17, 2026 at 11:07 pm

    Setting the ‘is_visible’ property to 0 for catalog attributes will hide them from the admin forms in the backend, as can be seen from this code (Mage_Adminhtml_Block_Widget_Form::_setFieldset()):

     protected function _setFieldset($attributes, $fieldset, $exclude=array())
        {
            $this->_addElementTypes($fieldset);
            foreach ($attributes as $attribute) {
                /* @var $attribute Mage_Eav_Model_Entity_Attribute */
                if (!$attribute || ($attribute->hasIsVisible() && !$attribute->getIsVisible())) {
                    continue;
                }
    

    So execute

     $setup->updateAttribute('catalog_product', $attrCode, 'is_visible', '0');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm making a drupal 7 module that contains a form and I would like
I am currently making a program that will send an email if the date
I'm making use of the Favorites module, in order to allow my users to
I am currently making an Opencart site. And I want to something a little
Im currently making a firefox extension that will let you choose what tabs you
Currently making a global volunteer site, and the webpages will more or less have
I'm currently making changes to an older version of my app for customers still
I am currently making a program which is supposed to prompt the user to
I'm currently making an application with Backbone.js and some JQuery libraries. Today I work
so i am currently making a game (a huge one over 3500 lines of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.