Adding custom option while creating order programmatically is not workingAdd Option or Custom Option To Cart Without Adding It To Product In Admin ProgramaticallyCE 1.8.1 order Item_id find optionAdd custom options while adding grouped product to cartMagento2 programmatically adding a custom optionHow to add product with custom option type file to cart programmaticallyAdding custom option programaticallyPlease specify product's required option(s) magento 2Programmatically added quote item Option [additional_options] showing in cart but not showing in order details on front and adminMagento 2 custom option not showing created programmaticallyOnly 1 product adding to order when creating orders programmatically in Magento 2

iPad being using in wall mount battery swollen

How do conventional missiles fly?

Short story with a alien planet, government officials must wear exploding medallions

How much of data wrangling is a data scientist's job?

Is there an expression that means doing something right before you will need it rather than doing it in case you might need it?

What is the most common color to indicate the input-field is disabled?

Why didn't Miles's spider sense work before?

How to add frame around section using titlesec?

Is "remove commented out code" correct English?

What's the in-universe reasoning behind sorcerers needing material components?

How would I stat a creature to be immune to everything but the Magic Missile spell? (just for fun)

How dangerous is XSS?

Calculating entropy change: reversible vs irreversible process

What is a romance in Latin?

Can mass be shunted off into hyperspace, but the matter remains?

Unlock My Phone! February 2018

How do I gain back my faith in my PhD degree?

How can saying a song's name be a copyright violation?

How to compactly explain secondary and tertiary characters without resorting to stereotypes?

One verb to replace 'be a member of' a club

How do I deal with an unproductive colleague in a small company?

CAST throwing error when run in stored procedure but not when run as raw query

Forming a German sentence with/without the verb at the end

Ambiguity in the definition of entropy



Adding custom option while creating order programmatically is not working


Add Option or Custom Option To Cart Without Adding It To Product In Admin ProgramaticallyCE 1.8.1 order Item_id find optionAdd custom options while adding grouped product to cartMagento2 programmatically adding a custom optionHow to add product with custom option type file to cart programmaticallyAdding custom option programaticallyPlease specify product's required option(s) magento 2Programmatically added quote item Option [additional_options] showing in cart but not showing in order details on front and adminMagento 2 custom option not showing created programmaticallyOnly 1 product adding to order when creating orders programmatically in Magento 2













0















I need to create an order programmatically.



I tried this code:



$params = array(
'product' => $productId,
'qty' => 1,
'options[99]' =>time(),
);
$cart = Mage::getSingleton('checkout/cart');
$product = new Mage_Catalog_Model_Product();
$product->load($productId);
$product->setSpecialPrice(250);
$cart->addProduct($product, $params);
$cart->save();


But it is not adding custom option value.



Also I tried this code:



$params = array(
'product' => $productId,
'qty' => 1,
'options_99' =>time(),
);


But no luck, can someone suggest?










share|improve this question
















bumped to the homepage by Community 24 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.



















    0















    I need to create an order programmatically.



    I tried this code:



    $params = array(
    'product' => $productId,
    'qty' => 1,
    'options[99]' =>time(),
    );
    $cart = Mage::getSingleton('checkout/cart');
    $product = new Mage_Catalog_Model_Product();
    $product->load($productId);
    $product->setSpecialPrice(250);
    $cart->addProduct($product, $params);
    $cart->save();


    But it is not adding custom option value.



    Also I tried this code:



    $params = array(
    'product' => $productId,
    'qty' => 1,
    'options_99' =>time(),
    );


    But no luck, can someone suggest?










    share|improve this question
















    bumped to the homepage by Community 24 mins ago


    This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.

















      0












      0








      0








      I need to create an order programmatically.



      I tried this code:



      $params = array(
      'product' => $productId,
      'qty' => 1,
      'options[99]' =>time(),
      );
      $cart = Mage::getSingleton('checkout/cart');
      $product = new Mage_Catalog_Model_Product();
      $product->load($productId);
      $product->setSpecialPrice(250);
      $cart->addProduct($product, $params);
      $cart->save();


      But it is not adding custom option value.



      Also I tried this code:



      $params = array(
      'product' => $productId,
      'qty' => 1,
      'options_99' =>time(),
      );


      But no luck, can someone suggest?










      share|improve this question
















      I need to create an order programmatically.



      I tried this code:



      $params = array(
      'product' => $productId,
      'qty' => 1,
      'options[99]' =>time(),
      );
      $cart = Mage::getSingleton('checkout/cart');
      $product = new Mage_Catalog_Model_Product();
      $product->load($productId);
      $product->setSpecialPrice(250);
      $cart->addProduct($product, $params);
      $cart->save();


      But it is not adding custom option value.



      Also I tried this code:



      $params = array(
      'product' => $productId,
      'qty' => 1,
      'options_99' =>time(),
      );


      But no luck, can someone suggest?







      magento-1.9 orders custom-options






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 23 '17 at 5:48









      Wasiq Shahrukh

      3651223




      3651223










      asked Mar 22 '17 at 8:55









      ButterflyButterfly

      79342149




      79342149





      bumped to the homepage by Community 24 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







      bumped to the homepage by Community 24 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.






















          1 Answer
          1






          active

          oldest

          votes


















          0














          Below reolved my issue,



           $params = array(
          'product' => $productId,
          'qty' => 1,
          'options' => array(
          99 => time()
          )
          );
          $cart = Mage::getSingleton('checkout/cart');
          $product = new Mage_Catalog_Model_Product();
          $product->load($productId);
          $product->setSpecialPrice(250);

          $cart->addProduct($product, $params);
          $cart->save();





          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%2f165542%2fadding-custom-option-while-creating-order-programmatically-is-not-working%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














            Below reolved my issue,



             $params = array(
            'product' => $productId,
            'qty' => 1,
            'options' => array(
            99 => time()
            )
            );
            $cart = Mage::getSingleton('checkout/cart');
            $product = new Mage_Catalog_Model_Product();
            $product->load($productId);
            $product->setSpecialPrice(250);

            $cart->addProduct($product, $params);
            $cart->save();





            share|improve this answer



























              0














              Below reolved my issue,



               $params = array(
              'product' => $productId,
              'qty' => 1,
              'options' => array(
              99 => time()
              )
              );
              $cart = Mage::getSingleton('checkout/cart');
              $product = new Mage_Catalog_Model_Product();
              $product->load($productId);
              $product->setSpecialPrice(250);

              $cart->addProduct($product, $params);
              $cart->save();





              share|improve this answer

























                0












                0








                0







                Below reolved my issue,



                 $params = array(
                'product' => $productId,
                'qty' => 1,
                'options' => array(
                99 => time()
                )
                );
                $cart = Mage::getSingleton('checkout/cart');
                $product = new Mage_Catalog_Model_Product();
                $product->load($productId);
                $product->setSpecialPrice(250);

                $cart->addProduct($product, $params);
                $cart->save();





                share|improve this answer













                Below reolved my issue,



                 $params = array(
                'product' => $productId,
                'qty' => 1,
                'options' => array(
                99 => time()
                )
                );
                $cart = Mage::getSingleton('checkout/cart');
                $product = new Mage_Catalog_Model_Product();
                $product->load($productId);
                $product->setSpecialPrice(250);

                $cart->addProduct($product, $params);
                $cart->save();






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 23 '17 at 5:05









                ButterflyButterfly

                79342149




                79342149



























                    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%2f165542%2fadding-custom-option-while-creating-order-programmatically-is-not-working%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

                    Best approach to update all entries in a list that is paginated?Best way to add items to a paginated listChoose Your Country: Best Usability approachUpdate list when a user is viewing the list without annoying themWhen would the best day to update your webpage be?What should happen when I add a Row to a paginated, sorted listShould I adopt infinite scrolling or classical pagination?How to show user that page objects automatically updateWhat is the best location to locate the comments section in a list pageBest way to combine filtering and selecting items in a listWhen one of two inputs must be updated to satisfy a consistency criteria, which should you update (if at all)?

                    Вунгтау (аеропорт) Загальні відомості | Див. також | Посилання | Навігаційне меню10°22′00″ пн. ш. 107°05′00″ сх. д. / 10.36667° пн. ш. 107.08333° сх. д. / 10.36667; 107.0833310°22′00″ пн. ш. 107°05′00″ сх. д. / 10.36667° пн. ш. 107.08333° сх. д. / 10.36667; 107.083337731608Vinh AirportVinh airport facelift improves serviceвиправивши або дописавши їївиправивши або дописавши їїр

                    Тонконіг бульбистий Зміст Опис | Поширення | Екологія | Господарське значення | Примітки | Див. також | Література | Джерела | Посилання | Навігаційне меню1114601320038-241116202404kew-435458Poa bulbosaЭлектронный каталог сосудистых растений Азиатской России [Електронний каталог судинних рослин Азіатської Росії]Малышев Л. Л. Дикие родичи культурных растений. Poa bulbosa L. - Мятлик луковичный. [Малишев Л. Л. Дикі родичи культурних рослин. Poa bulbosa L. - Тонконіг бульбистий.]Мятлик (POA) Сем. Злаки (Мятликовые) [Тонконіг (POA) Род. Злаки (Тонконогові)]Poa bulbosa Linnaeus, Sp. Pl. 1: 70. 1753. 鳞茎早熟禾 lin jing zao shu he (Description from Flora of China) [Poa bulbosa Linnaeus, Sp. Pl. 1: 70. 1753. 鳞茎早熟禾 lin jing zao shu he (Опис від Флора Китаю)]Poa bulbosa L. – lipnice cibulkatá / lipnica cibulkatáPoa bulbosa в базі даних Poa bulbosa на сайті Poa bulbosa в базі даних «Global Biodiversity Information Facility» (GBIF)Poa bulbosa в базі даних «Euro + Med PlantBase» — інформаційному ресурсі для Євро-середземноморського розмаїття рослинPoa bulbosa L. на сайті «Плантариум»