Updating product price from code not reflect in frontend category page until I save from adminMagento Enterprise: catalog_product_attribute not reindexed on product saveMagento 2 : Configurable Product Page Price ChangeProduct attributes not updating for configurable productsWhy products are not displayed on category page in Magento2.2.0?How many product details are loaded to a category page in Magento 2?Magento 2.2.1 Product Import Not Updating Assigned CategoriesMagento 2: Category name/url/desc not updatingAfter Data Migration Product Listing Not ShowingMagento 2 configurable product priceMagento 2.2.5 - The price attribute and visibility attributes are not visible in admin panel product editing page

Is it okay to fade a human face just to create some space to place important content over it?

Movie in a trailer park named Paradise and a boy playing a video game then being recruited by aliens to fight in space

What exactly did Ant-Man see that made him say that their plan worked?

Why was Mal so quick to drop Bester in favour of Kaylee?

What is the purpose of putting a capacitor on the primary side of a step-down transformer?

Donkey as Democratic Party symbolic animal

Symbol for "not absolutely continuous" in Latex

Is there reliable evidence that depleted uranium from the 1999 NATO bombing is causing cancer in Serbia?

What could a reptilian race tell by candling their eggs?

Indexes getting highly fragmented during normal usage of system

Prime parity peregrination

Is the location of an aircraft spoiler really that vital?

Does a return economy-class seat between London and San Francisco release 5.28 t of CO2e?

How can I deal with extreme temperatures in a hotel room?

How exactly is a normal force exerted, at the molecular level?

What does the phrase "building hopping chop" mean here?

Different budgets within roommate group

Why do I need two parameters in an HTTP parameter pollution attack?

How is this practical and very old scene shot?

What's the safest way to inform a new user of their password on an invite-only website?

Meaning of じゃないんじゃない?

Should I share with a new service provider a bill from its competitor?

Adjective for 'made of pus' or 'corrupted by pus' or something of something of pus

Could a Weapon of Mass Destruction, targeting only humans, be developed?



Updating product price from code not reflect in frontend category page until I save from admin


Magento Enterprise: catalog_product_attribute not reindexed on product saveMagento 2 : Configurable Product Page Price ChangeProduct attributes not updating for configurable productsWhy products are not displayed on category page in Magento2.2.0?How many product details are loaded to a category page in Magento 2?Magento 2.2.1 Product Import Not Updating Assigned CategoriesMagento 2: Category name/url/desc not updatingAfter Data Migration Product Listing Not ShowingMagento 2 configurable product priceMagento 2.2.5 - The price attribute and visibility attributes are not visible in admin panel product editing page






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








0















We are updating the product prices every 10min using cron. The prices are pulled from a external API.



We are using the following way to update the price,



$this->updateProductAttribute('price', $productId, $price);


Then we are doing reindex for the updated items,



$categoryIndexer->reindexList(array_unique(array_keys($products)));


After the price update, Product detail page showing correct updated price. But the Category page still showing the old price. If I refresh the cache or save the product from admin then category page showing updated price.



Instead of using updateProductAttribute if I save the product from code then category page works.



Whether it advisable to save 100 of products every 10min programmatically?



Or, Do we have any other way to handle the category page cache issue?










share|improve this question




























    0















    We are updating the product prices every 10min using cron. The prices are pulled from a external API.



    We are using the following way to update the price,



    $this->updateProductAttribute('price', $productId, $price);


    Then we are doing reindex for the updated items,



    $categoryIndexer->reindexList(array_unique(array_keys($products)));


    After the price update, Product detail page showing correct updated price. But the Category page still showing the old price. If I refresh the cache or save the product from admin then category page showing updated price.



    Instead of using updateProductAttribute if I save the product from code then category page works.



    Whether it advisable to save 100 of products every 10min programmatically?



    Or, Do we have any other way to handle the category page cache issue?










    share|improve this question
























      0












      0








      0








      We are updating the product prices every 10min using cron. The prices are pulled from a external API.



      We are using the following way to update the price,



      $this->updateProductAttribute('price', $productId, $price);


      Then we are doing reindex for the updated items,



      $categoryIndexer->reindexList(array_unique(array_keys($products)));


      After the price update, Product detail page showing correct updated price. But the Category page still showing the old price. If I refresh the cache or save the product from admin then category page showing updated price.



      Instead of using updateProductAttribute if I save the product from code then category page works.



      Whether it advisable to save 100 of products every 10min programmatically?



      Or, Do we have any other way to handle the category page cache issue?










      share|improve this question














      We are updating the product prices every 10min using cron. The prices are pulled from a external API.



      We are using the following way to update the price,



      $this->updateProductAttribute('price', $productId, $price);


      Then we are doing reindex for the updated items,



      $categoryIndexer->reindexList(array_unique(array_keys($products)));


      After the price update, Product detail page showing correct updated price. But the Category page still showing the old price. If I refresh the cache or save the product from admin then category page showing updated price.



      Instead of using updateProductAttribute if I save the product from code then category page works.



      Whether it advisable to save 100 of products every 10min programmatically?



      Or, Do we have any other way to handle the category page cache issue?







      magento2.2 product-attribute






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jun 19 at 12:02









      seeniseeni

      6648 silver badges21 bronze badges




      6648 silver badges21 bronze badges




















          1 Answer
          1






          active

          oldest

          votes


















          0














          Magento 1 and magento 2 are both not great at this. They're just not designed for rapid data change.



          My best advice is to handle your 100 product update as fast as you can and then refresh the cache programatically after the update just the once. You wont need to clear all of the caches but it will be trial and error which one



          You will probably have to do a price update hourly though.



          That's the closest you are going to get to realtime prices.



          Or completely different solution. Refresh your prices via ajax on page load. Make sure your ajax controller is uncached.






          share|improve this answer

























            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%2f278870%2fupdating-product-price-from-code-not-reflect-in-frontend-category-page-until-i-s%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            Magento 1 and magento 2 are both not great at this. They're just not designed for rapid data change.



            My best advice is to handle your 100 product update as fast as you can and then refresh the cache programatically after the update just the once. You wont need to clear all of the caches but it will be trial and error which one



            You will probably have to do a price update hourly though.



            That's the closest you are going to get to realtime prices.



            Or completely different solution. Refresh your prices via ajax on page load. Make sure your ajax controller is uncached.






            share|improve this answer



























              0














              Magento 1 and magento 2 are both not great at this. They're just not designed for rapid data change.



              My best advice is to handle your 100 product update as fast as you can and then refresh the cache programatically after the update just the once. You wont need to clear all of the caches but it will be trial and error which one



              You will probably have to do a price update hourly though.



              That's the closest you are going to get to realtime prices.



              Or completely different solution. Refresh your prices via ajax on page load. Make sure your ajax controller is uncached.






              share|improve this answer

























                0












                0








                0







                Magento 1 and magento 2 are both not great at this. They're just not designed for rapid data change.



                My best advice is to handle your 100 product update as fast as you can and then refresh the cache programatically after the update just the once. You wont need to clear all of the caches but it will be trial and error which one



                You will probably have to do a price update hourly though.



                That's the closest you are going to get to realtime prices.



                Or completely different solution. Refresh your prices via ajax on page load. Make sure your ajax controller is uncached.






                share|improve this answer













                Magento 1 and magento 2 are both not great at this. They're just not designed for rapid data change.



                My best advice is to handle your 100 product update as fast as you can and then refresh the cache programatically after the update just the once. You wont need to clear all of the caches but it will be trial and error which one



                You will probably have to do a price update hourly though.



                That's the closest you are going to get to realtime prices.



                Or completely different solution. Refresh your prices via ajax on page load. Make sure your ajax controller is uncached.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jun 19 at 19:26









                Dominic XigenDominic Xigen

                2,0401 gold badge3 silver badges12 bronze badges




                2,0401 gold badge3 silver badges12 bronze badges



























                    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%2f278870%2fupdating-product-price-from-code-not-reflect-in-frontend-category-page-until-i-s%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?