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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T00:04:17+00:00 2026-05-30T00:04:17+00:00

I have a multi-store setup – StoreA, StoreB and StoreC. And within a controller

  • 0

I have a multi-store setup – StoreA, StoreB and StoreC. And within a controller (using the StoreA url) I’m editing a product as follows:

$_product = new Mage_Catalog_Model_Product();
$_product->load($productId);
$_product->setData('attribute1','somevalue');
$_product->save();

If I then go to the Admin / Edit Product for that particular product, I find that attribute1 has been correctly set BUT I also find that if I select StoreA in the “Choose Shop View” I find that all the “Use Default Value” check-boxes (for StoreA) have been set to false.

Questions:

  1. How do I modify the code above so the “Use Default Value”
    check-boxes for StoreA remain true
  2. Once that the above code has been executed (and the “Use Default
    Value” for StoreA set to false), how do I revert the “Use Default
    Value” values back to true for StoreA?

Edit:

Added screenshot: enter image description here

  • 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-05-30T00:04:18+00:00Added an answer on May 30, 2026 at 12:04 am

    I’m not entirely clear on the ‘Use Default Value’ check-boxes you are seeing, but there are two things I noticed.

    Using The Factory Pattern

    Your code:

    $_product = new Mage_Catalog_Model_Product();
    

    Use the factory pattern, which is standard in Magento:

    $_product = Mage::getModel('catalog/product');
    

    That in itself isn’t the problem, but it’s something to keep in mind.

    Updating Only The Product Attribute

    Next, if you are only saving a specific attribute it would be quicker (and potentially avoid your problem) if you update only that attribute. Like so:

    $attribute = array('attribute_code' => 'attribute_value');
    
    Mage::getSingleton('catalog/product_action')
                ->updateAttributes($_product->getId(), $attribute, 0);
    

    Reference for the updateAttributes() method. My reasoning here is that it’s possible default values are being added by saving the entire product, and not just a specific attribute.

    If that doesn’t help, perhaps a screenshot of what you are seeing could better help me visualize the issue.

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

Sidebar

Related Questions

I have multi-store Magento installation, and different product prices are set in different stores.
I have a multi dimensional array, like this: array('name' => array('title'=>'Title','date'=>'Created')) I store it
I have a magento website with multi store and i have been able to
I have a multi-tenant application and I'm experimenting with using the i18n gem to
I have used KD-tree(libkdtree++) to store a multi-dimensional data set, and the requirements here
I have discovered an issue when trying to store a lot of keys using
Can you store an image in a PHP SESSION ? I have a multi-step
I have an app that shows store sales. It is a multi-dimensional array, so
We have multi-website(5) multi-store-view(13) shop. What we need is that only 3 store view
We have a multi-store Magento installation with stores in several countries. Today, we changed

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.