Magento 2 : How to Get Selected Bundle Option Product Details in Cart Page Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?Cart template $this->getItems() as $_item obtains configurable details not simpleGet stock values for bundled product in product gridAdding a bundled product to a cart using SOAP V2$product->getOptions() returns empty resultDynamically calculated prices save after add to cartSet custom price of product when adding to cart code not workingMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 1 with Php 7.2, add to cart error if product have optionMagento 2 add products to cart by using code?Magento 2.2.6: Programatically updating product custom options

How can I list files in reverse time order by a command and pass them as arguments to another command?

The Nth Gryphon Number

New Order #6: Easter Egg

Fit odd number of triplets in a measure?

How to name indistinguishable henchmen in a screenplay?

How to resize main filesystem

Random body shuffle every night—can we still function?

Is this Kuo-toa homebrew race balanced?

How to make an animal which can only breed for a certain number of generations?

Does the main washing effect of soap come from foam?

Pointing to problems without suggesting solutions

Table formatting with tabularx?

What criticisms of Wittgenstein's philosophy of language have been offered?

Should man-made satellites feature an intelligent inverted "cow catcher"?

What is "Lambda" in Heston's original paper on stochastic volatility models?

What does 丫 mean? 丫是什么意思?

Is the Mordenkainen's Sword spell underpowered?

Does the transliteration of 'Dravidian' exist in Hindu scripture? Does 'Dravida' refer to a Geographical area or an ethnic group?

How do you write "wild blueberries flavored"?

What is the proper term for etching or digging of wall to hide conduit of cables

Why are current probes so expensive?

Found this skink in my tomato plant bucket. Is he trapped? Or could he leave if he wanted?

Did pre-Columbian Americans know the spherical shape of the Earth?

Derived column in a data extension



Magento 2 : How to Get Selected Bundle Option Product Details in Cart Page



Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?Cart template $this->getItems() as $_item obtains configurable details not simpleGet stock values for bundled product in product gridAdding a bundled product to a cart using SOAP V2$product->getOptions() returns empty resultDynamically calculated prices save after add to cartSet custom price of product when adding to cart code not workingMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 1 with Php 7.2, add to cart error if product have optionMagento 2 add products to cart by using code?Magento 2.2.6: Programatically updating product custom options



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








0















I need to get details of selected product of a bundled product. I tried following code in cart page. But it's not working.



$objectManager = MagentoFrameworkAppObjectManager::getInstance();
$cart = $objectManager->get('MagentoCheckoutModelCart');

// get cart items
$items = $cart->getItems();

// get custom options value of cart items
foreach ($items as $item)
$options = $item->getProduct()->getTypeInstance(true)->getOptions($item->getProduct());
$customOptions = $options['options'];










share|improve this question






























    0















    I need to get details of selected product of a bundled product. I tried following code in cart page. But it's not working.



    $objectManager = MagentoFrameworkAppObjectManager::getInstance();
    $cart = $objectManager->get('MagentoCheckoutModelCart');

    // get cart items
    $items = $cart->getItems();

    // get custom options value of cart items
    foreach ($items as $item)
    $options = $item->getProduct()->getTypeInstance(true)->getOptions($item->getProduct());
    $customOptions = $options['options'];










    share|improve this question


























      0












      0








      0


      1






      I need to get details of selected product of a bundled product. I tried following code in cart page. But it's not working.



      $objectManager = MagentoFrameworkAppObjectManager::getInstance();
      $cart = $objectManager->get('MagentoCheckoutModelCart');

      // get cart items
      $items = $cart->getItems();

      // get custom options value of cart items
      foreach ($items as $item)
      $options = $item->getProduct()->getTypeInstance(true)->getOptions($item->getProduct());
      $customOptions = $options['options'];










      share|improve this question
















      I need to get details of selected product of a bundled product. I tried following code in cart page. But it's not working.



      $objectManager = MagentoFrameworkAppObjectManager::getInstance();
      $cart = $objectManager->get('MagentoCheckoutModelCart');

      // get cart items
      $items = $cart->getItems();

      // get custom options value of cart items
      foreach ($items as $item)
      $options = $item->getProduct()->getTypeInstance(true)->getOptions($item->getProduct());
      $customOptions = $options['options'];







      magento2 product cart bundled-product






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited May 24 '17 at 12:45









      Dhiren Vasoya

      4,45751844




      4,45751844










      asked May 24 '17 at 12:14









      SIBHI SSIBHI S

      1,11711536




      1,11711536




















          1 Answer
          1






          active

          oldest

          votes


















          0














          For Future Seekers:



          Try: $customOptions = $options['bundle_options']



          It will give you array list of options like this:
          (this is json representation of data)



          "bundle_options": 
          "55":
          "option_id": "55",
          "label": "Suction tips",
          "value": [

          "title": "Suction Tips (Premium Quality-100Pcs)",
          "qty": 2,
          "price": 0

          ]

          ,





          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%2f175915%2fmagento-2-how-to-get-selected-bundle-option-product-details-in-cart-page%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














            For Future Seekers:



            Try: $customOptions = $options['bundle_options']



            It will give you array list of options like this:
            (this is json representation of data)



            "bundle_options": 
            "55":
            "option_id": "55",
            "label": "Suction tips",
            "value": [

            "title": "Suction Tips (Premium Quality-100Pcs)",
            "qty": 2,
            "price": 0

            ]

            ,





            share|improve this answer





























              0














              For Future Seekers:



              Try: $customOptions = $options['bundle_options']



              It will give you array list of options like this:
              (this is json representation of data)



              "bundle_options": 
              "55":
              "option_id": "55",
              "label": "Suction tips",
              "value": [

              "title": "Suction Tips (Premium Quality-100Pcs)",
              "qty": 2,
              "price": 0

              ]

              ,





              share|improve this answer



























                0












                0








                0







                For Future Seekers:



                Try: $customOptions = $options['bundle_options']



                It will give you array list of options like this:
                (this is json representation of data)



                "bundle_options": 
                "55":
                "option_id": "55",
                "label": "Suction tips",
                "value": [

                "title": "Suction Tips (Premium Quality-100Pcs)",
                "qty": 2,
                "price": 0

                ]

                ,





                share|improve this answer















                For Future Seekers:



                Try: $customOptions = $options['bundle_options']



                It will give you array list of options like this:
                (this is json representation of data)



                "bundle_options": 
                "55":
                "option_id": "55",
                "label": "Suction tips",
                "value": [

                "title": "Suction Tips (Premium Quality-100Pcs)",
                "qty": 2,
                "price": 0

                ]

                ,






                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Jun 11 '18 at 10:04









                Chirag Patel

                2,648423




                2,648423










                answered Aug 28 '17 at 8:07









                PIYUSH JIITPIYUSH JIIT

                112




                112



























                    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%2f175915%2fmagento-2-how-to-get-selected-bundle-option-product-details-in-cart-page%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

                    Sum ergo cogito? 1 nng

                    419 nièngy_Soadمي 19bal1.5o_g

                    Queiggey Chernihivv 9NnOo i Zw X QqKk LpB