Magento 1 - Change Magento custom options date valuesCustom Options configCustom options across sites+ Option in custom optionsHow to change the custom options priceHow to change Magento Custom Options title for all productsCustom options with start and end dateRestricting Dates Using Custom Options - Input Type DateBulk change custom optionshow to add a new customizable product optionMagento 2 change special price from / to date to date time format

Should I simplify my writing in a foreign country?

My large rocket is still flipping over

How do I allocate more memory to an app on Sheepshaver running Mac OS 9?

Which "exotic salt" can lower water's freezing point by –70 °C?

How can I decipher which graph belongs to which equation?

Constitutional limitation of criminalizing behavior in US law?

Where did Lovecraft write about Carcosa?

Should homeowners insurance cover the cost of the home?

How do I, as a DM, handle a party that decides to set up an ambush in a dungeon?

Is there precedent or are there procedures for a US president refusing to concede to an electoral defeat?

Speed up this NIntegrate

When did England stop being a Papal fief?

How to preserve a rare version of a book?

How to remap repeating commands i.e. <number><command>?

Is space itself expanding or is it just momentum from the Big Bang carrying things apart?

Is there a word for food that's gone 'bad', but is still edible?

Is throwing dice a stochastic or a deterministic process?

GitLab account hacked and repo wiped

Has the Hulk always been able to talk?

Motion-trail-like lines

All superlinear runtime algorithms are asymptotically equivalent to convex function?

Is any special diet an effective treatment of autism?

Can my 2 children, aged 10 and 12, who are US citizens, travel to the USA on expired American passports?

Is it normal for gliders not to have attitude indicators?



Magento 1 - Change Magento custom options date values


Custom Options configCustom options across sites+ Option in custom optionsHow to change the custom options priceHow to change Magento Custom Options title for all productsCustom options with start and end dateRestricting Dates Using Custom Options - Input Type DateBulk change custom optionshow to add a new customizable product optionMagento 2 change special price from / to date to date time format






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








0















Hello I am simply trying to find the array of defaults for the product custom-option date



my goal is to change the month from "01,02,03....12" to a string with the month name "Jan. , Feb. , Mar. - Dec."



I believe I found the date custom-option file in



app/code/core/Mage/Catalog/Model/Product/Option/Type/Date.php


and in there you see the 'month' array being called but I can't find the declaration file.



I am new to this stuff so pardon my ignorance if this is obvious or I am making it more convoluted.










share|improve this question






























    0















    Hello I am simply trying to find the array of defaults for the product custom-option date



    my goal is to change the month from "01,02,03....12" to a string with the month name "Jan. , Feb. , Mar. - Dec."



    I believe I found the date custom-option file in



    app/code/core/Mage/Catalog/Model/Product/Option/Type/Date.php


    and in there you see the 'month' array being called but I can't find the declaration file.



    I am new to this stuff so pardon my ignorance if this is obvious or I am making it more convoluted.










    share|improve this question


























      0












      0








      0








      Hello I am simply trying to find the array of defaults for the product custom-option date



      my goal is to change the month from "01,02,03....12" to a string with the month name "Jan. , Feb. , Mar. - Dec."



      I believe I found the date custom-option file in



      app/code/core/Mage/Catalog/Model/Product/Option/Type/Date.php


      and in there you see the 'month' array being called but I can't find the declaration file.



      I am new to this stuff so pardon my ignorance if this is obvious or I am making it more convoluted.










      share|improve this question
















      Hello I am simply trying to find the array of defaults for the product custom-option date



      my goal is to change the month from "01,02,03....12" to a string with the month name "Jan. , Feb. , Mar. - Dec."



      I believe I found the date custom-option file in



      app/code/core/Mage/Catalog/Model/Product/Option/Type/Date.php


      and in there you see the 'month' array being called but I can't find the declaration file.



      I am new to this stuff so pardon my ignorance if this is obvious or I am making it more convoluted.







      magento-1 custom-options datetime






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 25 '16 at 6:39









      MrTo-Kane

      1,83662465




      1,83662465










      asked Dec 10 '14 at 20:25









      KiltRentalUSAKiltRentalUSA

      12




      12




















          2 Answers
          2






          active

          oldest

          votes


















          0














          The month select is generated in the method Mage_Catalog_Block_Product_View_Options_Type_Date::getDropDownsDateHtml by the line $monthsHtml = $this->_getSelectFromToHtml('month', 1, 12);.

          You can change that to something that fits your needs.



          or you can do an ugly thing and change the dropdown texts via some javascript after the page loads.






          share|improve this answer






























            0














            Go to




            appcodecoreMageCatalogBlockProductViewOptionsTypeDate.php




            and add the below code into Date.php file.




            Mage_Catalog_Block_Product_View_Options_Type_Date (its better to rewrite it in local)




            protected function _getMonthSelectFromToHtml($name, $from, $to, $value = null)

            $options = array(
            array('value' => '', 'label' => '-')
            );
            for ($i = $from; $i <= $to; $i++)
            $options[] = array('value' => $i, 'label' => Zend_Locale::getTranslation($i, 'Month', Mage::app()->getLocale()->getLocaleCode()));

            return $this->_getHtmlSelect($name, $value)
            ->setOptions($options)
            ->getHtml();



            then find out



            $monthsHtml = $this->_getSelectFromToHtml('month', 1, 12);


            and replace with below code:



            $monthsHtml = $this->_getMonthSelectFromToHtml('month', 1, 12);


            Hope this helps.






            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%2f46965%2fmagento-1-change-magento-custom-options-date-values%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














              The month select is generated in the method Mage_Catalog_Block_Product_View_Options_Type_Date::getDropDownsDateHtml by the line $monthsHtml = $this->_getSelectFromToHtml('month', 1, 12);.

              You can change that to something that fits your needs.



              or you can do an ugly thing and change the dropdown texts via some javascript after the page loads.






              share|improve this answer



























                0














                The month select is generated in the method Mage_Catalog_Block_Product_View_Options_Type_Date::getDropDownsDateHtml by the line $monthsHtml = $this->_getSelectFromToHtml('month', 1, 12);.

                You can change that to something that fits your needs.



                or you can do an ugly thing and change the dropdown texts via some javascript after the page loads.






                share|improve this answer

























                  0












                  0








                  0







                  The month select is generated in the method Mage_Catalog_Block_Product_View_Options_Type_Date::getDropDownsDateHtml by the line $monthsHtml = $this->_getSelectFromToHtml('month', 1, 12);.

                  You can change that to something that fits your needs.



                  or you can do an ugly thing and change the dropdown texts via some javascript after the page loads.






                  share|improve this answer













                  The month select is generated in the method Mage_Catalog_Block_Product_View_Options_Type_Date::getDropDownsDateHtml by the line $monthsHtml = $this->_getSelectFromToHtml('month', 1, 12);.

                  You can change that to something that fits your needs.



                  or you can do an ugly thing and change the dropdown texts via some javascript after the page loads.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Apr 10 '15 at 5:36









                  MariusMarius

                  169k28324695




                  169k28324695























                      0














                      Go to




                      appcodecoreMageCatalogBlockProductViewOptionsTypeDate.php




                      and add the below code into Date.php file.




                      Mage_Catalog_Block_Product_View_Options_Type_Date (its better to rewrite it in local)




                      protected function _getMonthSelectFromToHtml($name, $from, $to, $value = null)

                      $options = array(
                      array('value' => '', 'label' => '-')
                      );
                      for ($i = $from; $i <= $to; $i++)
                      $options[] = array('value' => $i, 'label' => Zend_Locale::getTranslation($i, 'Month', Mage::app()->getLocale()->getLocaleCode()));

                      return $this->_getHtmlSelect($name, $value)
                      ->setOptions($options)
                      ->getHtml();



                      then find out



                      $monthsHtml = $this->_getSelectFromToHtml('month', 1, 12);


                      and replace with below code:



                      $monthsHtml = $this->_getMonthSelectFromToHtml('month', 1, 12);


                      Hope this helps.






                      share|improve this answer





























                        0














                        Go to




                        appcodecoreMageCatalogBlockProductViewOptionsTypeDate.php




                        and add the below code into Date.php file.




                        Mage_Catalog_Block_Product_View_Options_Type_Date (its better to rewrite it in local)




                        protected function _getMonthSelectFromToHtml($name, $from, $to, $value = null)

                        $options = array(
                        array('value' => '', 'label' => '-')
                        );
                        for ($i = $from; $i <= $to; $i++)
                        $options[] = array('value' => $i, 'label' => Zend_Locale::getTranslation($i, 'Month', Mage::app()->getLocale()->getLocaleCode()));

                        return $this->_getHtmlSelect($name, $value)
                        ->setOptions($options)
                        ->getHtml();



                        then find out



                        $monthsHtml = $this->_getSelectFromToHtml('month', 1, 12);


                        and replace with below code:



                        $monthsHtml = $this->_getMonthSelectFromToHtml('month', 1, 12);


                        Hope this helps.






                        share|improve this answer



























                          0












                          0








                          0







                          Go to




                          appcodecoreMageCatalogBlockProductViewOptionsTypeDate.php




                          and add the below code into Date.php file.




                          Mage_Catalog_Block_Product_View_Options_Type_Date (its better to rewrite it in local)




                          protected function _getMonthSelectFromToHtml($name, $from, $to, $value = null)

                          $options = array(
                          array('value' => '', 'label' => '-')
                          );
                          for ($i = $from; $i <= $to; $i++)
                          $options[] = array('value' => $i, 'label' => Zend_Locale::getTranslation($i, 'Month', Mage::app()->getLocale()->getLocaleCode()));

                          return $this->_getHtmlSelect($name, $value)
                          ->setOptions($options)
                          ->getHtml();



                          then find out



                          $monthsHtml = $this->_getSelectFromToHtml('month', 1, 12);


                          and replace with below code:



                          $monthsHtml = $this->_getMonthSelectFromToHtml('month', 1, 12);


                          Hope this helps.






                          share|improve this answer















                          Go to




                          appcodecoreMageCatalogBlockProductViewOptionsTypeDate.php




                          and add the below code into Date.php file.




                          Mage_Catalog_Block_Product_View_Options_Type_Date (its better to rewrite it in local)




                          protected function _getMonthSelectFromToHtml($name, $from, $to, $value = null)

                          $options = array(
                          array('value' => '', 'label' => '-')
                          );
                          for ($i = $from; $i <= $to; $i++)
                          $options[] = array('value' => $i, 'label' => Zend_Locale::getTranslation($i, 'Month', Mage::app()->getLocale()->getLocaleCode()));

                          return $this->_getHtmlSelect($name, $value)
                          ->setOptions($options)
                          ->getHtml();



                          then find out



                          $monthsHtml = $this->_getSelectFromToHtml('month', 1, 12);


                          and replace with below code:



                          $monthsHtml = $this->_getMonthSelectFromToHtml('month', 1, 12);


                          Hope this helps.







                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited Jul 20 '18 at 18:33









                          Michael Jones

                          207




                          207










                          answered Sep 17 '15 at 9:48









                          AddWeb Solution Pvt LtdAddWeb Solution Pvt Ltd

                          25716




                          25716



























                              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%2f46965%2fmagento-1-change-magento-custom-options-date-values%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

                              Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

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

                              Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form