Cart Stopped Working for New SesssionsMagento 2.1 ui_component form module not workingDeleting from minicart...

What is this waxed root vegetable?

Find the next monthly expiration date

Why is working on the same position for more than 15 years not a red flag?

How to deny access to SQL Server to certain login over SSMS, but allow over .Net SqlClient Data Provider

How can atoms be electrically neutral when there is a difference in the positions of the charges?

Equivalent to "source" in OpenBSD?

How to mitigate "bandwagon attacking" from players?

How to count words in a line

Use comma instead of & in table

Most significant research articles for practical investors with research perspectives

How to tighten battery clamp?

Can you use a beast's innate abilities while polymorphed?

What if I store 10TB on azure servers and then keep the vm powered off?

Which aircraft had such a luxurious-looking navigator's station?

I am on the US no-fly list. What can I do in order to be allowed on flights which go through US airspace?

Understanding Kramnik's play in game 1 of Candidates 2018

How to properly claim credit for peer review?

"Murder!" The knight said

Logistics of a hovering watercraft in a fantasy setting

When was drinking water recognized as crucial in marathon running?

How to approximate rolls for potions of healing using only d6's?

How can I handle a player who pre-plans arguments about my rulings on RAW?

Borrowing Characters

Replacement ford fiesta radiator has extra hose



Cart Stopped Working for New Sesssions


Magento 2.1 ui_component form module not workingDeleting from minicart items causing issueMagento 2 An error occurred on the server. Please try to place the order againNot able to add/update magento2 category post upgrade from 1.9 to 2.1.0Magento 2 Fatal error: Uncaught Error: Class not foundFatal error: Uncaught TypeError: Argument 1 passedVertex generation doesn't exist …?PHP fatal error: Uncaught TypeError: Argument 2 passed to MagentoCatalogPluginBlockTopmenuUpdate quantity showing error in magento 2.1













0















I had a complaint about the cart stopping working on a Magento 2.2.3 instance and noticed the following errors showing within php logs:



[Fri Apr 06 15:28:54.964616 2018] 
[:error] [pid 58985] [client 77.96.38.47:55599] PHP Fatal error: Uncaught Error: Call to a member function getThumbnail() on null in /home/sites/magento/public_html/vendor/magento/module-configurable-product/CustomerData/ConfigurableItem.php:63
Stack trace:
#0
/home/sites/magento/public_html/vendor/magento/module-checkout/CustomerData/DefaultItem.php(66): MagentoConfigurableProductCustomerDataConfigurableItem->getProductForThumbnail()
#1
/home/sites/magento/public_html/vendor/magento/module-checkout/CustomerData/AbstractItem.php(31): MagentoCheckoutCustomerDataDefaultItem->doGetItemData()
#2
/home/sites/magento/public_html/vendor/magento/module-checkout/CustomerData/ItemPool.php(63): MagentoCheckoutCustomerDataAbstractItem->getItemData(Object(MagentoQuoteModelQuoteItem))
#3
/home/sites/magento/public_html/vendor/magento/module-checkout/CustomerData/Cart.php(167): MagentoCheckoutCustomerDataItemPool->getItemData(Object(MagentoQuoteModelQuoteItem))
#4
/home/sites/magento/public_html/vendor/magento/module-checkout/CustomerData/Cart.php(98): MagentoCheckou in /home/sites/magento/public_html/vendor/magento/module-configurable-product/CustomerData/ConfigurableItem.php on line 63


Cart seemed to be working for most people except a new user who had just started and a few customers seemed to have been having the issues from looking over the logs.



I flushed the redis cache as felt it was session related and this was handled by redis. This stopped the issue occurring for now however am worried it will come back so was wondering if anyone can suggest what may have gone wrong here?



Redis does not have any memory limits configured and there were no errors in Redis logs so feel that is fine but am out of ideas of how this has happened.










share|improve this question





























    0















    I had a complaint about the cart stopping working on a Magento 2.2.3 instance and noticed the following errors showing within php logs:



    [Fri Apr 06 15:28:54.964616 2018] 
    [:error] [pid 58985] [client 77.96.38.47:55599] PHP Fatal error: Uncaught Error: Call to a member function getThumbnail() on null in /home/sites/magento/public_html/vendor/magento/module-configurable-product/CustomerData/ConfigurableItem.php:63
    Stack trace:
    #0
    /home/sites/magento/public_html/vendor/magento/module-checkout/CustomerData/DefaultItem.php(66): MagentoConfigurableProductCustomerDataConfigurableItem->getProductForThumbnail()
    #1
    /home/sites/magento/public_html/vendor/magento/module-checkout/CustomerData/AbstractItem.php(31): MagentoCheckoutCustomerDataDefaultItem->doGetItemData()
    #2
    /home/sites/magento/public_html/vendor/magento/module-checkout/CustomerData/ItemPool.php(63): MagentoCheckoutCustomerDataAbstractItem->getItemData(Object(MagentoQuoteModelQuoteItem))
    #3
    /home/sites/magento/public_html/vendor/magento/module-checkout/CustomerData/Cart.php(167): MagentoCheckoutCustomerDataItemPool->getItemData(Object(MagentoQuoteModelQuoteItem))
    #4
    /home/sites/magento/public_html/vendor/magento/module-checkout/CustomerData/Cart.php(98): MagentoCheckou in /home/sites/magento/public_html/vendor/magento/module-configurable-product/CustomerData/ConfigurableItem.php on line 63


    Cart seemed to be working for most people except a new user who had just started and a few customers seemed to have been having the issues from looking over the logs.



    I flushed the redis cache as felt it was session related and this was handled by redis. This stopped the issue occurring for now however am worried it will come back so was wondering if anyone can suggest what may have gone wrong here?



    Redis does not have any memory limits configured and there were no errors in Redis logs so feel that is fine but am out of ideas of how this has happened.










    share|improve this question



























      0












      0








      0


      1






      I had a complaint about the cart stopping working on a Magento 2.2.3 instance and noticed the following errors showing within php logs:



      [Fri Apr 06 15:28:54.964616 2018] 
      [:error] [pid 58985] [client 77.96.38.47:55599] PHP Fatal error: Uncaught Error: Call to a member function getThumbnail() on null in /home/sites/magento/public_html/vendor/magento/module-configurable-product/CustomerData/ConfigurableItem.php:63
      Stack trace:
      #0
      /home/sites/magento/public_html/vendor/magento/module-checkout/CustomerData/DefaultItem.php(66): MagentoConfigurableProductCustomerDataConfigurableItem->getProductForThumbnail()
      #1
      /home/sites/magento/public_html/vendor/magento/module-checkout/CustomerData/AbstractItem.php(31): MagentoCheckoutCustomerDataDefaultItem->doGetItemData()
      #2
      /home/sites/magento/public_html/vendor/magento/module-checkout/CustomerData/ItemPool.php(63): MagentoCheckoutCustomerDataAbstractItem->getItemData(Object(MagentoQuoteModelQuoteItem))
      #3
      /home/sites/magento/public_html/vendor/magento/module-checkout/CustomerData/Cart.php(167): MagentoCheckoutCustomerDataItemPool->getItemData(Object(MagentoQuoteModelQuoteItem))
      #4
      /home/sites/magento/public_html/vendor/magento/module-checkout/CustomerData/Cart.php(98): MagentoCheckou in /home/sites/magento/public_html/vendor/magento/module-configurable-product/CustomerData/ConfigurableItem.php on line 63


      Cart seemed to be working for most people except a new user who had just started and a few customers seemed to have been having the issues from looking over the logs.



      I flushed the redis cache as felt it was session related and this was handled by redis. This stopped the issue occurring for now however am worried it will come back so was wondering if anyone can suggest what may have gone wrong here?



      Redis does not have any memory limits configured and there were no errors in Redis logs so feel that is fine but am out of ideas of how this has happened.










      share|improve this question
















      I had a complaint about the cart stopping working on a Magento 2.2.3 instance and noticed the following errors showing within php logs:



      [Fri Apr 06 15:28:54.964616 2018] 
      [:error] [pid 58985] [client 77.96.38.47:55599] PHP Fatal error: Uncaught Error: Call to a member function getThumbnail() on null in /home/sites/magento/public_html/vendor/magento/module-configurable-product/CustomerData/ConfigurableItem.php:63
      Stack trace:
      #0
      /home/sites/magento/public_html/vendor/magento/module-checkout/CustomerData/DefaultItem.php(66): MagentoConfigurableProductCustomerDataConfigurableItem->getProductForThumbnail()
      #1
      /home/sites/magento/public_html/vendor/magento/module-checkout/CustomerData/AbstractItem.php(31): MagentoCheckoutCustomerDataDefaultItem->doGetItemData()
      #2
      /home/sites/magento/public_html/vendor/magento/module-checkout/CustomerData/ItemPool.php(63): MagentoCheckoutCustomerDataAbstractItem->getItemData(Object(MagentoQuoteModelQuoteItem))
      #3
      /home/sites/magento/public_html/vendor/magento/module-checkout/CustomerData/Cart.php(167): MagentoCheckoutCustomerDataItemPool->getItemData(Object(MagentoQuoteModelQuoteItem))
      #4
      /home/sites/magento/public_html/vendor/magento/module-checkout/CustomerData/Cart.php(98): MagentoCheckou in /home/sites/magento/public_html/vendor/magento/module-configurable-product/CustomerData/ConfigurableItem.php on line 63


      Cart seemed to be working for most people except a new user who had just started and a few customers seemed to have been having the issues from looking over the logs.



      I flushed the redis cache as felt it was session related and this was handled by redis. This stopped the issue occurring for now however am worried it will come back so was wondering if anyone can suggest what may have gone wrong here?



      Redis does not have any memory limits configured and there were no errors in Redis logs so feel that is fine but am out of ideas of how this has happened.







      magento2 checkout cart






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 9 '18 at 15:10







      harri

















      asked Apr 9 '18 at 15:05









      harriharri

      2,9791553




      2,9791553






















          2 Answers
          2






          active

          oldest

          votes


















          0














          This issue because the function $this->getChildProduct() is empty or this product is not available now, there are two files use this:



          vendor/magento/module-configurable-product/Block/Cart/Item/Renderer/Configurable.php line 71

          vendor/magento/module-configurable-product/CustomerData/ConfigurableItem.php line 63


          I add a new condition as below:



          vendor/magento/module-configurable-product/Block/Cart/Item/Renderer/Configurable.php:71

          if (empty($this->getChildProduct()) && ($this->_scopeConfig->getValue(
          self::CONFIG_THUMBNAIL_SOURCE,
          MagentoStoreModelScopeInterface::SCOPE_STORE
          ) == ThumbnailSource::OPTION_USE_PARENT_IMAGE ||
          !($this->getChildProduct()->getThumbnail() && $this->getChildProduct()->getThumbnail() != 'no_selection'))
          ) {
          $product = $this->getProduct();
          } else {
          $product = $this->getChildProduct();
          }
          return $product;


          vendor/magento/module-configurable-product/CustomerData/ConfigurableItem.php:63



          $product = $config == empty($this->getChildProduct()) && (ThumbnailSource::OPTION_USE_PARENT_IMAGE
          || (!$this->getChildProduct()->getThumbnail() || $this->getChildProduct()->getThumbnail() == 'no_selection'))
          ? $this->getProduct()
          : $this->getChildProduct();


          Now it is working properly you can use override block on Magento to do this.






          share|improve this answer

































            0














            I have seen and implemented your suggestions and seems it's perfect solutions, i just want to modify some more detail, i faced this issue in Magento 2.2.5 and i have used some more corrections to resolve the issue.







            You can see the following code which can help you to get rid the mentioned issue

            PHP Fatal error: Uncaught Error: Call to a member function getThumbnail()

            /vendor/magento/module-configurable-product/Block/Cart/Item/Renderer/Configurable.php



            public function getChildProduct(){
            $option = $this->getItem()->getCustomOption('simple_product');

            if ($option !== null ) {
            return $option->getProduct();
            }
            return $this->getProduct();
            }





            And in the following file, you can modify the code and this issue will be resolved.

            /vendor/magento/module-catalog/Block/Product/ImageBuilder.php



             public function create() {
            $simpleOption = $this->product->getCustomOption('simple_product');
            if ($simpleOption !== null) {
            $optionProduct = $simpleOption->getProduct();
            //$this->setProduct($optionProduct);
            if ($optionProduct->getThumbnail() !== null) {
            $this->setProduct($optionProduct);
            }
            }




            share








            New contributor




            Zahid Bashir is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.




















              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%2f221607%2fcart-stopped-working-for-new-sesssions%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              0














              This issue because the function $this->getChildProduct() is empty or this product is not available now, there are two files use this:



              vendor/magento/module-configurable-product/Block/Cart/Item/Renderer/Configurable.php line 71

              vendor/magento/module-configurable-product/CustomerData/ConfigurableItem.php line 63


              I add a new condition as below:



              vendor/magento/module-configurable-product/Block/Cart/Item/Renderer/Configurable.php:71

              if (empty($this->getChildProduct()) && ($this->_scopeConfig->getValue(
              self::CONFIG_THUMBNAIL_SOURCE,
              MagentoStoreModelScopeInterface::SCOPE_STORE
              ) == ThumbnailSource::OPTION_USE_PARENT_IMAGE ||
              !($this->getChildProduct()->getThumbnail() && $this->getChildProduct()->getThumbnail() != 'no_selection'))
              ) {
              $product = $this->getProduct();
              } else {
              $product = $this->getChildProduct();
              }
              return $product;


              vendor/magento/module-configurable-product/CustomerData/ConfigurableItem.php:63



              $product = $config == empty($this->getChildProduct()) && (ThumbnailSource::OPTION_USE_PARENT_IMAGE
              || (!$this->getChildProduct()->getThumbnail() || $this->getChildProduct()->getThumbnail() == 'no_selection'))
              ? $this->getProduct()
              : $this->getChildProduct();


              Now it is working properly you can use override block on Magento to do this.






              share|improve this answer






























                0














                This issue because the function $this->getChildProduct() is empty or this product is not available now, there are two files use this:



                vendor/magento/module-configurable-product/Block/Cart/Item/Renderer/Configurable.php line 71

                vendor/magento/module-configurable-product/CustomerData/ConfigurableItem.php line 63


                I add a new condition as below:



                vendor/magento/module-configurable-product/Block/Cart/Item/Renderer/Configurable.php:71

                if (empty($this->getChildProduct()) && ($this->_scopeConfig->getValue(
                self::CONFIG_THUMBNAIL_SOURCE,
                MagentoStoreModelScopeInterface::SCOPE_STORE
                ) == ThumbnailSource::OPTION_USE_PARENT_IMAGE ||
                !($this->getChildProduct()->getThumbnail() && $this->getChildProduct()->getThumbnail() != 'no_selection'))
                ) {
                $product = $this->getProduct();
                } else {
                $product = $this->getChildProduct();
                }
                return $product;


                vendor/magento/module-configurable-product/CustomerData/ConfigurableItem.php:63



                $product = $config == empty($this->getChildProduct()) && (ThumbnailSource::OPTION_USE_PARENT_IMAGE
                || (!$this->getChildProduct()->getThumbnail() || $this->getChildProduct()->getThumbnail() == 'no_selection'))
                ? $this->getProduct()
                : $this->getChildProduct();


                Now it is working properly you can use override block on Magento to do this.






                share|improve this answer




























                  0












                  0








                  0







                  This issue because the function $this->getChildProduct() is empty or this product is not available now, there are two files use this:



                  vendor/magento/module-configurable-product/Block/Cart/Item/Renderer/Configurable.php line 71

                  vendor/magento/module-configurable-product/CustomerData/ConfigurableItem.php line 63


                  I add a new condition as below:



                  vendor/magento/module-configurable-product/Block/Cart/Item/Renderer/Configurable.php:71

                  if (empty($this->getChildProduct()) && ($this->_scopeConfig->getValue(
                  self::CONFIG_THUMBNAIL_SOURCE,
                  MagentoStoreModelScopeInterface::SCOPE_STORE
                  ) == ThumbnailSource::OPTION_USE_PARENT_IMAGE ||
                  !($this->getChildProduct()->getThumbnail() && $this->getChildProduct()->getThumbnail() != 'no_selection'))
                  ) {
                  $product = $this->getProduct();
                  } else {
                  $product = $this->getChildProduct();
                  }
                  return $product;


                  vendor/magento/module-configurable-product/CustomerData/ConfigurableItem.php:63



                  $product = $config == empty($this->getChildProduct()) && (ThumbnailSource::OPTION_USE_PARENT_IMAGE
                  || (!$this->getChildProduct()->getThumbnail() || $this->getChildProduct()->getThumbnail() == 'no_selection'))
                  ? $this->getProduct()
                  : $this->getChildProduct();


                  Now it is working properly you can use override block on Magento to do this.






                  share|improve this answer















                  This issue because the function $this->getChildProduct() is empty or this product is not available now, there are two files use this:



                  vendor/magento/module-configurable-product/Block/Cart/Item/Renderer/Configurable.php line 71

                  vendor/magento/module-configurable-product/CustomerData/ConfigurableItem.php line 63


                  I add a new condition as below:



                  vendor/magento/module-configurable-product/Block/Cart/Item/Renderer/Configurable.php:71

                  if (empty($this->getChildProduct()) && ($this->_scopeConfig->getValue(
                  self::CONFIG_THUMBNAIL_SOURCE,
                  MagentoStoreModelScopeInterface::SCOPE_STORE
                  ) == ThumbnailSource::OPTION_USE_PARENT_IMAGE ||
                  !($this->getChildProduct()->getThumbnail() && $this->getChildProduct()->getThumbnail() != 'no_selection'))
                  ) {
                  $product = $this->getProduct();
                  } else {
                  $product = $this->getChildProduct();
                  }
                  return $product;


                  vendor/magento/module-configurable-product/CustomerData/ConfigurableItem.php:63



                  $product = $config == empty($this->getChildProduct()) && (ThumbnailSource::OPTION_USE_PARENT_IMAGE
                  || (!$this->getChildProduct()->getThumbnail() || $this->getChildProduct()->getThumbnail() == 'no_selection'))
                  ? $this->getProduct()
                  : $this->getChildProduct();


                  Now it is working properly you can use override block on Magento to do this.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Jun 6 '18 at 4:02









                  Rama Chandran M

                  2,73781530




                  2,73781530










                  answered Jun 6 '18 at 3:39









                  Tuan Bui QuangTuan Bui Quang

                  111




                  111

























                      0














                      I have seen and implemented your suggestions and seems it's perfect solutions, i just want to modify some more detail, i faced this issue in Magento 2.2.5 and i have used some more corrections to resolve the issue.







                      You can see the following code which can help you to get rid the mentioned issue

                      PHP Fatal error: Uncaught Error: Call to a member function getThumbnail()

                      /vendor/magento/module-configurable-product/Block/Cart/Item/Renderer/Configurable.php



                      public function getChildProduct(){
                      $option = $this->getItem()->getCustomOption('simple_product');

                      if ($option !== null ) {
                      return $option->getProduct();
                      }
                      return $this->getProduct();
                      }





                      And in the following file, you can modify the code and this issue will be resolved.

                      /vendor/magento/module-catalog/Block/Product/ImageBuilder.php



                       public function create() {
                      $simpleOption = $this->product->getCustomOption('simple_product');
                      if ($simpleOption !== null) {
                      $optionProduct = $simpleOption->getProduct();
                      //$this->setProduct($optionProduct);
                      if ($optionProduct->getThumbnail() !== null) {
                      $this->setProduct($optionProduct);
                      }
                      }




                      share








                      New contributor




                      Zahid Bashir is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.

























                        0














                        I have seen and implemented your suggestions and seems it's perfect solutions, i just want to modify some more detail, i faced this issue in Magento 2.2.5 and i have used some more corrections to resolve the issue.







                        You can see the following code which can help you to get rid the mentioned issue

                        PHP Fatal error: Uncaught Error: Call to a member function getThumbnail()

                        /vendor/magento/module-configurable-product/Block/Cart/Item/Renderer/Configurable.php



                        public function getChildProduct(){
                        $option = $this->getItem()->getCustomOption('simple_product');

                        if ($option !== null ) {
                        return $option->getProduct();
                        }
                        return $this->getProduct();
                        }





                        And in the following file, you can modify the code and this issue will be resolved.

                        /vendor/magento/module-catalog/Block/Product/ImageBuilder.php



                         public function create() {
                        $simpleOption = $this->product->getCustomOption('simple_product');
                        if ($simpleOption !== null) {
                        $optionProduct = $simpleOption->getProduct();
                        //$this->setProduct($optionProduct);
                        if ($optionProduct->getThumbnail() !== null) {
                        $this->setProduct($optionProduct);
                        }
                        }




                        share








                        New contributor




                        Zahid Bashir is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                        Check out our Code of Conduct.























                          0












                          0








                          0







                          I have seen and implemented your suggestions and seems it's perfect solutions, i just want to modify some more detail, i faced this issue in Magento 2.2.5 and i have used some more corrections to resolve the issue.







                          You can see the following code which can help you to get rid the mentioned issue

                          PHP Fatal error: Uncaught Error: Call to a member function getThumbnail()

                          /vendor/magento/module-configurable-product/Block/Cart/Item/Renderer/Configurable.php



                          public function getChildProduct(){
                          $option = $this->getItem()->getCustomOption('simple_product');

                          if ($option !== null ) {
                          return $option->getProduct();
                          }
                          return $this->getProduct();
                          }





                          And in the following file, you can modify the code and this issue will be resolved.

                          /vendor/magento/module-catalog/Block/Product/ImageBuilder.php



                           public function create() {
                          $simpleOption = $this->product->getCustomOption('simple_product');
                          if ($simpleOption !== null) {
                          $optionProduct = $simpleOption->getProduct();
                          //$this->setProduct($optionProduct);
                          if ($optionProduct->getThumbnail() !== null) {
                          $this->setProduct($optionProduct);
                          }
                          }




                          share








                          New contributor




                          Zahid Bashir is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.










                          I have seen and implemented your suggestions and seems it's perfect solutions, i just want to modify some more detail, i faced this issue in Magento 2.2.5 and i have used some more corrections to resolve the issue.







                          You can see the following code which can help you to get rid the mentioned issue

                          PHP Fatal error: Uncaught Error: Call to a member function getThumbnail()

                          /vendor/magento/module-configurable-product/Block/Cart/Item/Renderer/Configurable.php



                          public function getChildProduct(){
                          $option = $this->getItem()->getCustomOption('simple_product');

                          if ($option !== null ) {
                          return $option->getProduct();
                          }
                          return $this->getProduct();
                          }





                          And in the following file, you can modify the code and this issue will be resolved.

                          /vendor/magento/module-catalog/Block/Product/ImageBuilder.php



                           public function create() {
                          $simpleOption = $this->product->getCustomOption('simple_product');
                          if ($simpleOption !== null) {
                          $optionProduct = $simpleOption->getProduct();
                          //$this->setProduct($optionProduct);
                          if ($optionProduct->getThumbnail() !== null) {
                          $this->setProduct($optionProduct);
                          }
                          }





                          share








                          New contributor




                          Zahid Bashir is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.








                          share


                          share






                          New contributor




                          Zahid Bashir is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.









                          answered 8 mins ago









                          Zahid BashirZahid Bashir

                          11




                          11




                          New contributor




                          Zahid Bashir is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.





                          New contributor





                          Zahid Bashir is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.






                          Zahid Bashir is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.






























                              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%2f221607%2fcart-stopped-working-for-new-sesssions%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

                              “%fieldName is a required field.”, in Magento2 REST API Call for GET Method Type The Next...

                              How to change City field to a dropdown in Checkout step Magento 2Magento 2 : How to change UI field(s)...

                              夢乃愛華...