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 8273025
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T07:20:01+00:00 2026-06-08T07:20:01+00:00

I have thousands of products which have some common default values: page layout :

  • 0

I have thousands of products which have some common default values:

page layout : No layout updates; Visibility:Not Visible Individually;
categoies: empty,

Now I want to change these three attributes once like below:

page layout : 1 column; Visibility:Catalog, Search (4); categoies: 1,

I tried to finish it with below code, but it is not working.

$collection = Mage::getResourceModel('catalog/product_collection')->load();

foreach($collection as $items)
{  
    $product = Mage::getModel('catalog/product')->load($items->getId());  
    $product->setVisibility(4);  
    $product->save();
    echo $product->getId().'<br>';        
}  

Who can tell me what the problem is with my code?

I also tried to finish in database. But I do not know which table can control visibilibty, which table can control layout or category. (Using Magento 1.7)

  • 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-08T07:20:03+00:00Added an answer on June 8, 2026 at 7:20 am

    You can do this directly from the admin area:

    Catalog -> Manage Product

    Check the article you want to edit and then select “Change attributes” from “Actions” drop down menu.

    You can now massively change attribute to your product

    Cheers

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a website with several thousands of products. I've integrated my site with
I have thousands of psd files to save as png. The psd files are
I have thousands of rows that contain a zipcode attribute with four integers in.
I have thousands of photos in my hard-disk. All photo file-names consists of 4
I have thousands of IP addresses of visitors to my site, what tools can
I have thousands of files, maybe hundreds of thousands of files on a Linux
I have thousands of data points and each data point has 50 dimensions. I
Let's say I have thousands of users and I want to make the passwords
Currently we have thousands of Microsoft Word files, Excel files, PDF's, images etc stored
I have a thousands of data parsed from huge XML to be inserted into

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.