Category attribute's value does not get updated when in store emulation modeGet category Display ModeRearranged Subcategory Does not Reflect Store ViewCreate categories through installer$category->getChildren(); does not work?Remove store level value for category attributeGet custom attribute's value in Index (cms, home page)Get custom category attribute valueMagento2 - create new/update category programmatically for specific storeView not workingMulti-select value does not store empty valuesMagento 2 category updated programmatically not working

Efficient Algorithm for the boundary of a set of tiles

How can I tell if I'm being too picky as a referee?

How to cut a climbing rope?

How did NASA Langley end up with the first 737?

How to politely tell someone they did not hit "reply to all" in an email?

Is Jon Snow the last of his House?

Is "cool" appropriate or offensive to use in IMs?

What could a self-sustaining lunar colony slowly lose that would ultimately prove fatal?

Is the Indo-European language family made up?

First Match - awk

Is there an online tool which supports shared writing?

Value of a binomial series

Which European Languages are not Indo-European?

How to patch glass cuts in a bicycle tire?

In the 3D Zeldas, is it faster to roll or to simply walk?

Did this character show any indication of wanting to rule before S8E6?

What is a Power on Reset IC?

Is this statement about cut time correct?

What is the function of the corrugations on a section of the Space Shuttle's external tank?

Question in discrete mathematics about group permutations

When the Torah was almost lost and one (or several) Rabbis saved it?

Where have Brexit voters gone?

Why didn't Thanos use the Time Stone to stop the Avengers' plan?

Remove CiviCRM and Drupal links / banner on profile form



Category attribute's value does not get updated when in store emulation mode


Get category Display ModeRearranged Subcategory Does not Reflect Store ViewCreate categories through installer$category->getChildren(); does not work?Remove store level value for category attributeGet custom attribute's value in Index (cms, home page)Get custom category attribute valueMagento2 - create new/update category programmatically for specific storeView not workingMulti-select value does not store empty valuesMagento 2 category updated programmatically not working






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I am trying to update some category attribute's value for a specific store, and i need to do it in emulation mode.



So i do something like this:



$appEmulation = Mage::getSingleton("core/app_emulation");
$initialEnvironmentInfo = $appEmulation->startEnvironmentEmulation(4);
$category = Mage::getModel("catalog/category");
$category->load(381);
$category->addData(['name'=>'help', 'description'=>'ffff']);
$category->save();
$appEmulation->stopEnvironmentEmulation($initialEnvironmentInfo);


I expect it to update values for this category's attributes passed to addData function, but values stay as they were in the database.



print_r($category->getData(), 1)



Exception: Array
(
[entity_id] => 381
[parent_id] => 2
[created_at] => 2016-02-13 16:37:40
[updated_at] => 2019-05-18 21:30:32
[path] => 1/2/381
[position] => 1
[level] => 2
[children_count] => 267
[store_id] => 1
[all_children] =>
[available_sort_by] =>
[breadcrumbs_priority] =>
[category_seo_name] =>
[children] =>
[custom_apply_to_products] => 0
[custom_design] =>
[custom_design_from] =>
[custom_design_to] =>
[custom_layout_update] =>
[custom_use_parent_settings] => 0
[default_sort_by] =>
[description] =>
[display_mode] => PRODUCTS
[exclude_from_crosslinking] => 0
[exclude_from_html_sitemap] => 0
[exclude_from_sitemap] => 0
[fb_translate] => 1
[filter_price_range] =>
[hint] =>
[image] =>
[include_in_menu] => 1
[is_active] => 1
[is_anchor] => 0
[landing_page] =>
[menu_popular_categories] =>
[meta_description] =>
[meta_keywords] =>
[meta_robots] =>
[meta_title] =>
[name] => tratat
[page_layout] =>
[path_in_store] =>
[redirect_priority] =>
[seo_text] =>
[tags] => оборудование
[thumbnail] => --__138.jpg
[url_key] => oborudovanie
[url_path] => oborudovanie.html
)




So, as you can see store_id = 4 which means that it fetches from the store that i passed to the startEnvironmentEmulation function, but it looks like the data does not get saved.



If i remove the emulation the data gets saved correctly but for all stores, which is not what i want.










share|improve this question






























    0















    I am trying to update some category attribute's value for a specific store, and i need to do it in emulation mode.



    So i do something like this:



    $appEmulation = Mage::getSingleton("core/app_emulation");
    $initialEnvironmentInfo = $appEmulation->startEnvironmentEmulation(4);
    $category = Mage::getModel("catalog/category");
    $category->load(381);
    $category->addData(['name'=>'help', 'description'=>'ffff']);
    $category->save();
    $appEmulation->stopEnvironmentEmulation($initialEnvironmentInfo);


    I expect it to update values for this category's attributes passed to addData function, but values stay as they were in the database.



    print_r($category->getData(), 1)



    Exception: Array
    (
    [entity_id] => 381
    [parent_id] => 2
    [created_at] => 2016-02-13 16:37:40
    [updated_at] => 2019-05-18 21:30:32
    [path] => 1/2/381
    [position] => 1
    [level] => 2
    [children_count] => 267
    [store_id] => 1
    [all_children] =>
    [available_sort_by] =>
    [breadcrumbs_priority] =>
    [category_seo_name] =>
    [children] =>
    [custom_apply_to_products] => 0
    [custom_design] =>
    [custom_design_from] =>
    [custom_design_to] =>
    [custom_layout_update] =>
    [custom_use_parent_settings] => 0
    [default_sort_by] =>
    [description] =>
    [display_mode] => PRODUCTS
    [exclude_from_crosslinking] => 0
    [exclude_from_html_sitemap] => 0
    [exclude_from_sitemap] => 0
    [fb_translate] => 1
    [filter_price_range] =>
    [hint] =>
    [image] =>
    [include_in_menu] => 1
    [is_active] => 1
    [is_anchor] => 0
    [landing_page] =>
    [menu_popular_categories] =>
    [meta_description] =>
    [meta_keywords] =>
    [meta_robots] =>
    [meta_title] =>
    [name] => tratat
    [page_layout] =>
    [path_in_store] =>
    [redirect_priority] =>
    [seo_text] =>
    [tags] => оборудование
    [thumbnail] => --__138.jpg
    [url_key] => oborudovanie
    [url_path] => oborudovanie.html
    )




    So, as you can see store_id = 4 which means that it fetches from the store that i passed to the startEnvironmentEmulation function, but it looks like the data does not get saved.



    If i remove the emulation the data gets saved correctly but for all stores, which is not what i want.










    share|improve this question


























      0












      0








      0








      I am trying to update some category attribute's value for a specific store, and i need to do it in emulation mode.



      So i do something like this:



      $appEmulation = Mage::getSingleton("core/app_emulation");
      $initialEnvironmentInfo = $appEmulation->startEnvironmentEmulation(4);
      $category = Mage::getModel("catalog/category");
      $category->load(381);
      $category->addData(['name'=>'help', 'description'=>'ffff']);
      $category->save();
      $appEmulation->stopEnvironmentEmulation($initialEnvironmentInfo);


      I expect it to update values for this category's attributes passed to addData function, but values stay as they were in the database.



      print_r($category->getData(), 1)



      Exception: Array
      (
      [entity_id] => 381
      [parent_id] => 2
      [created_at] => 2016-02-13 16:37:40
      [updated_at] => 2019-05-18 21:30:32
      [path] => 1/2/381
      [position] => 1
      [level] => 2
      [children_count] => 267
      [store_id] => 1
      [all_children] =>
      [available_sort_by] =>
      [breadcrumbs_priority] =>
      [category_seo_name] =>
      [children] =>
      [custom_apply_to_products] => 0
      [custom_design] =>
      [custom_design_from] =>
      [custom_design_to] =>
      [custom_layout_update] =>
      [custom_use_parent_settings] => 0
      [default_sort_by] =>
      [description] =>
      [display_mode] => PRODUCTS
      [exclude_from_crosslinking] => 0
      [exclude_from_html_sitemap] => 0
      [exclude_from_sitemap] => 0
      [fb_translate] => 1
      [filter_price_range] =>
      [hint] =>
      [image] =>
      [include_in_menu] => 1
      [is_active] => 1
      [is_anchor] => 0
      [landing_page] =>
      [menu_popular_categories] =>
      [meta_description] =>
      [meta_keywords] =>
      [meta_robots] =>
      [meta_title] =>
      [name] => tratat
      [page_layout] =>
      [path_in_store] =>
      [redirect_priority] =>
      [seo_text] =>
      [tags] => оборудование
      [thumbnail] => --__138.jpg
      [url_key] => oborudovanie
      [url_path] => oborudovanie.html
      )




      So, as you can see store_id = 4 which means that it fetches from the store that i passed to the startEnvironmentEmulation function, but it looks like the data does not get saved.



      If i remove the emulation the data gets saved correctly but for all stores, which is not what i want.










      share|improve this question
















      I am trying to update some category attribute's value for a specific store, and i need to do it in emulation mode.



      So i do something like this:



      $appEmulation = Mage::getSingleton("core/app_emulation");
      $initialEnvironmentInfo = $appEmulation->startEnvironmentEmulation(4);
      $category = Mage::getModel("catalog/category");
      $category->load(381);
      $category->addData(['name'=>'help', 'description'=>'ffff']);
      $category->save();
      $appEmulation->stopEnvironmentEmulation($initialEnvironmentInfo);


      I expect it to update values for this category's attributes passed to addData function, but values stay as they were in the database.



      print_r($category->getData(), 1)



      Exception: Array
      (
      [entity_id] => 381
      [parent_id] => 2
      [created_at] => 2016-02-13 16:37:40
      [updated_at] => 2019-05-18 21:30:32
      [path] => 1/2/381
      [position] => 1
      [level] => 2
      [children_count] => 267
      [store_id] => 1
      [all_children] =>
      [available_sort_by] =>
      [breadcrumbs_priority] =>
      [category_seo_name] =>
      [children] =>
      [custom_apply_to_products] => 0
      [custom_design] =>
      [custom_design_from] =>
      [custom_design_to] =>
      [custom_layout_update] =>
      [custom_use_parent_settings] => 0
      [default_sort_by] =>
      [description] =>
      [display_mode] => PRODUCTS
      [exclude_from_crosslinking] => 0
      [exclude_from_html_sitemap] => 0
      [exclude_from_sitemap] => 0
      [fb_translate] => 1
      [filter_price_range] =>
      [hint] =>
      [image] =>
      [include_in_menu] => 1
      [is_active] => 1
      [is_anchor] => 0
      [landing_page] =>
      [menu_popular_categories] =>
      [meta_description] =>
      [meta_keywords] =>
      [meta_robots] =>
      [meta_title] =>
      [name] => tratat
      [page_layout] =>
      [path_in_store] =>
      [redirect_priority] =>
      [seo_text] =>
      [tags] => оборудование
      [thumbnail] => --__138.jpg
      [url_key] => oborudovanie
      [url_path] => oborudovanie.html
      )




      So, as you can see store_id = 4 which means that it fetches from the store that i passed to the startEnvironmentEmulation function, but it looks like the data does not get saved.



      If i remove the emulation the data gets saved correctly but for all stores, which is not what i want.







      magento-1.9 category environment-emulation






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited May 19 at 8:56







      Asadov Kamran

















      asked May 18 at 21:47









      Asadov KamranAsadov Kamran

      6619




      6619




















          0






          active

          oldest

          votes












          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "479"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f275144%2fcategory-attributes-value-does-not-get-updated-when-in-store-emulation-mode%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Magento Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f275144%2fcategory-attributes-value-does-not-get-updated-when-in-store-emulation-mode%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

          Circuit construction for execution of conditional statements using least significant bitHow are two different registers being used as “control”?How exactly is the stated composite state of the two registers being produced using the $R_zz$ controlled rotations?Efficiently performing controlled rotations in HHLWould this quantum algorithm implementation work?How to prepare a superposed states of odd integers from $1$ to $sqrtN$?Why is this implementation of the order finding algorithm not working?Circuit construction for Hamiltonian simulationHow can I invert the least significant bit of a certain term of a superposed state?Implementing an oracleImplementing a controlled sum operation

          Magento 2 “No Payment Methods” in Admin New OrderHow to integrate Paypal Express Checkout with the Magento APIMagento 1.5 - Sales > Order > edit order and shipping methods disappearAuto Invoice Check/Money Order Payment methodAdd more simple payment methods?Shipping methods not showingWhat should I do to change payment methods if changing the configuration has no effects?1.9 - No Payment Methods showing upMy Payment Methods not Showing for downloadable/virtual product when checkout?Magento2 API to access internal payment methodHow to call an existing payment methods in the registration form?