Prestashop 1.7 Change quantities from INT to FLOAT











up vote
0
down vote

favorite












I made the following:





  1. In DATABASE I changed everywhere where quantities/qty/minimal_quantity column is present from INT to DECIMAL(17.2)




    • When adding a product and if I set to minimal quantity 0.22, it saves in DB 0.22



  2. I changes In classes/controllers everywhere where quantities/qty/minimal_quantity is present from INT to FLOAT


  3. I cleaned the cache



The problem is:




  1. In Admin when saving product with decimal quantity it saves but after refresh is displays INT (however in DB it is decimal)


  2. In Font it shows INT (if in DB it is 0.22 for minimal quantity in front office it is 0)



I did those modification successful on Prestashop 1.6.X But cant make it done in PRESTASHOP 1.7. Maybe someone who knows PS1.7 better knows where else I should look?



By the way, I checked all files in SRC folder...










share|improve this question


























    up vote
    0
    down vote

    favorite












    I made the following:





    1. In DATABASE I changed everywhere where quantities/qty/minimal_quantity column is present from INT to DECIMAL(17.2)




      • When adding a product and if I set to minimal quantity 0.22, it saves in DB 0.22



    2. I changes In classes/controllers everywhere where quantities/qty/minimal_quantity is present from INT to FLOAT


    3. I cleaned the cache



    The problem is:




    1. In Admin when saving product with decimal quantity it saves but after refresh is displays INT (however in DB it is decimal)


    2. In Font it shows INT (if in DB it is 0.22 for minimal quantity in front office it is 0)



    I did those modification successful on Prestashop 1.6.X But cant make it done in PRESTASHOP 1.7. Maybe someone who knows PS1.7 better knows where else I should look?



    By the way, I checked all files in SRC folder...










    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I made the following:





      1. In DATABASE I changed everywhere where quantities/qty/minimal_quantity column is present from INT to DECIMAL(17.2)




        • When adding a product and if I set to minimal quantity 0.22, it saves in DB 0.22



      2. I changes In classes/controllers everywhere where quantities/qty/minimal_quantity is present from INT to FLOAT


      3. I cleaned the cache



      The problem is:




      1. In Admin when saving product with decimal quantity it saves but after refresh is displays INT (however in DB it is decimal)


      2. In Font it shows INT (if in DB it is 0.22 for minimal quantity in front office it is 0)



      I did those modification successful on Prestashop 1.6.X But cant make it done in PRESTASHOP 1.7. Maybe someone who knows PS1.7 better knows where else I should look?



      By the way, I checked all files in SRC folder...










      share|improve this question













      I made the following:





      1. In DATABASE I changed everywhere where quantities/qty/minimal_quantity column is present from INT to DECIMAL(17.2)




        • When adding a product and if I set to minimal quantity 0.22, it saves in DB 0.22



      2. I changes In classes/controllers everywhere where quantities/qty/minimal_quantity is present from INT to FLOAT


      3. I cleaned the cache



      The problem is:




      1. In Admin when saving product with decimal quantity it saves but after refresh is displays INT (however in DB it is decimal)


      2. In Font it shows INT (if in DB it is 0.22 for minimal quantity in front office it is 0)



      I did those modification successful on Prestashop 1.6.X But cant make it done in PRESTASHOP 1.7. Maybe someone who knows PS1.7 better knows where else I should look?



      By the way, I checked all files in SRC folder...







      php prestashop prestashop-1.7






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 5 at 16:59









      AndrewS

      64921226




      64921226
























          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          It's typed in Prestashop's core, you won't be able to do that in the DB directly, a solution to your need might be to overwrite on Prestashop's end the function (override/class/Product.php and override/class/stock folder) or just consider your float as an int and consider it a multiple of 100.






          share|improve this answer





















          • Apparently he modified all classes definition: I changes In classes/controllers everywhere where quantities/qty/minimal_quantity is present from INT to FLOAT.
            – idnovate
            Nov 8 at 23:41










          • yes I did all work in classes and controllers. I now look in theme JS for PS1.6 and 1.7. In ps1.7 they made one single JS file, and there is the problem... I think it will take some time until somebody will figure it out... Because the JS code is different. Comparinf Product.j for example and the theme.js it is totally different code
            – AndrewS
            2 days ago













          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          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',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          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%2fstackoverflow.com%2fquestions%2f53158898%2fprestashop-1-7-change-quantities-from-int-to-float%23new-answer', 'question_page');
          }
          );

          Post as a guest
































          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote













          It's typed in Prestashop's core, you won't be able to do that in the DB directly, a solution to your need might be to overwrite on Prestashop's end the function (override/class/Product.php and override/class/stock folder) or just consider your float as an int and consider it a multiple of 100.






          share|improve this answer





















          • Apparently he modified all classes definition: I changes In classes/controllers everywhere where quantities/qty/minimal_quantity is present from INT to FLOAT.
            – idnovate
            Nov 8 at 23:41










          • yes I did all work in classes and controllers. I now look in theme JS for PS1.6 and 1.7. In ps1.7 they made one single JS file, and there is the problem... I think it will take some time until somebody will figure it out... Because the JS code is different. Comparinf Product.j for example and the theme.js it is totally different code
            – AndrewS
            2 days ago

















          up vote
          0
          down vote













          It's typed in Prestashop's core, you won't be able to do that in the DB directly, a solution to your need might be to overwrite on Prestashop's end the function (override/class/Product.php and override/class/stock folder) or just consider your float as an int and consider it a multiple of 100.






          share|improve this answer





















          • Apparently he modified all classes definition: I changes In classes/controllers everywhere where quantities/qty/minimal_quantity is present from INT to FLOAT.
            – idnovate
            Nov 8 at 23:41










          • yes I did all work in classes and controllers. I now look in theme JS for PS1.6 and 1.7. In ps1.7 they made one single JS file, and there is the problem... I think it will take some time until somebody will figure it out... Because the JS code is different. Comparinf Product.j for example and the theme.js it is totally different code
            – AndrewS
            2 days ago















          up vote
          0
          down vote










          up vote
          0
          down vote









          It's typed in Prestashop's core, you won't be able to do that in the DB directly, a solution to your need might be to overwrite on Prestashop's end the function (override/class/Product.php and override/class/stock folder) or just consider your float as an int and consider it a multiple of 100.






          share|improve this answer












          It's typed in Prestashop's core, you won't be able to do that in the DB directly, a solution to your need might be to overwrite on Prestashop's end the function (override/class/Product.php and override/class/stock folder) or just consider your float as an int and consider it a multiple of 100.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 5 at 18:07









          Matt Loye

          9752811




          9752811












          • Apparently he modified all classes definition: I changes In classes/controllers everywhere where quantities/qty/minimal_quantity is present from INT to FLOAT.
            – idnovate
            Nov 8 at 23:41










          • yes I did all work in classes and controllers. I now look in theme JS for PS1.6 and 1.7. In ps1.7 they made one single JS file, and there is the problem... I think it will take some time until somebody will figure it out... Because the JS code is different. Comparinf Product.j for example and the theme.js it is totally different code
            – AndrewS
            2 days ago




















          • Apparently he modified all classes definition: I changes In classes/controllers everywhere where quantities/qty/minimal_quantity is present from INT to FLOAT.
            – idnovate
            Nov 8 at 23:41










          • yes I did all work in classes and controllers. I now look in theme JS for PS1.6 and 1.7. In ps1.7 they made one single JS file, and there is the problem... I think it will take some time until somebody will figure it out... Because the JS code is different. Comparinf Product.j for example and the theme.js it is totally different code
            – AndrewS
            2 days ago


















          Apparently he modified all classes definition: I changes In classes/controllers everywhere where quantities/qty/minimal_quantity is present from INT to FLOAT.
          – idnovate
          Nov 8 at 23:41




          Apparently he modified all classes definition: I changes In classes/controllers everywhere where quantities/qty/minimal_quantity is present from INT to FLOAT.
          – idnovate
          Nov 8 at 23:41












          yes I did all work in classes and controllers. I now look in theme JS for PS1.6 and 1.7. In ps1.7 they made one single JS file, and there is the problem... I think it will take some time until somebody will figure it out... Because the JS code is different. Comparinf Product.j for example and the theme.js it is totally different code
          – AndrewS
          2 days ago






          yes I did all work in classes and controllers. I now look in theme JS for PS1.6 and 1.7. In ps1.7 they made one single JS file, and there is the problem... I think it will take some time until somebody will figure it out... Because the JS code is different. Comparinf Product.j for example and the theme.js it is totally different code
          – AndrewS
          2 days ago




















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53158898%2fprestashop-1-7-change-quantities-from-int-to-float%23new-answer', 'question_page');
          }
          );

          Post as a guest




















































































          這個網誌中的熱門文章

          Tangent Lines Diagram Along Smooth Curve

          Yusuf al-Mu'taman ibn Hud

          Zucchini