Unable to process binding click: function()(Magento2) knockout.js:3012 Uncaught ReferenceError: Unable to process bindingUnable to process binding Knockout.js magento 2Magento 2 : Implement update functionality of new customer billing address on place order button in checkout pageMagento2 Order Summary - unable to process bindingMagento 2 - Update quantity and totals of cart page without page reload?Magento 2 checkout page keeps on loading.In console,$.event.props is undefined in jquery.mobile.custom.js:44:2.How to clear that?Uncaught Error: Unable to process bindingCan't validate Post Code on checkout pageknockout.js:2624 Uncaught SyntaxError: Unable to process binding "ifnot:Integrate js with button on uiComponent xml

Why A=2 and B=1 in the call signs for Spirit and Opportunity?

What is to the west of Westeros?

Merge pdfs sequentially

Possibility of faking someone's public key

Why is the Eisenstein ideal paper so great?

Toxic, harassing lab environment

Why is std::ssize() introduced in C++20

Why does Bran want to find Drogon?

Is "vegetable base" a common term in English?

Python script to extract text from PDF with images

Did Game of Thrones end the way that George RR Martin intended?

resolution bandwidth

Visual Block Mode edit with sequential number

Is there an idiom that means that you are in a very strong negotiation position in a negotiation?

I want to ask company flying me out for office tour if I can bring my fiance

How do you earn the reader's trust?

Who were the members of the jury in the Game of Thrones finale?

Piping the output of comand columns

How does the Earth's center produce heat?

Why do testers need root cause analysis?

Determine direction of mass transfer

Complications of displaced core material?

Cisco 3750X Power Cable

What is the use case for non-breathable waterproof pants?



Unable to process binding click: function()


(Magento2) knockout.js:3012 Uncaught ReferenceError: Unable to process bindingUnable to process binding Knockout.js magento 2Magento 2 : Implement update functionality of new customer billing address on place order button in checkout pageMagento2 Order Summary - unable to process bindingMagento 2 - Update quantity and totals of cart page without page reload?Magento 2 checkout page keeps on loading.In console,$.event.props is undefined in jquery.mobile.custom.js:44:2.How to clear that?Uncaught Error: Unable to process bindingCan't validate Post Code on checkout pageknockout.js:2624 Uncaught SyntaxError: Unable to process binding "ifnot:Integrate js with button on uiComponent xml






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








1















I'm trying to implement a click event in one of the button I added under the Magento_Checkout module specifically under payment.html view. Now I added the below code




File location: app/design/frontend/Vendor/Module/Magento_Checkout/web/template/payment.html




<form id="co-payment-form" class="form payments" novalidate="novalidate">
<fieldset class="fieldset">
<button type="button" data-bind="click: goBackShipping">Back from template</button>
</fieldset>
</form>


Now what I want is that the goBackShipping will be triggered using KnockoutJS functionality. But I'm getting this error




knockout.js:3391 Uncaught ReferenceError: Unable to process binding "click: function()return goBackShipping "




This goBackShipping function is added in the checkout-data.js under the folder




app/design/frontend/Vendor/Module/Magento_Checkout/web/js/checkout-data.js




and here is the code I added



/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

/**
* Checkout adapter for customer data storage
*
* @api
*/
define([
'jquery',
'Magento_Customer/js/customer-data',
'jquery/jquery-storageapi'
], function ($, storage)
'use strict';

var cacheKey = 'checkout-data',

/**
* @param Object data
*/
saveData = function (data)
storage.set(cacheKey, data);
,

// This is the newly added function
goBackShipping = function ()
alert("Preparing to go back");
window.history.back();
,

/**
* @return *
*/
initData = function ()

return ... ;
,
;
});


Honestly I have no idea why it's giving an error like that. Am I doing something wrong? (obviously yes because it's giving an error).



I would only like to implement a button click action using knockoutjs and simple javascript alert. But I can't get pass this error.










share|improve this question




























    1















    I'm trying to implement a click event in one of the button I added under the Magento_Checkout module specifically under payment.html view. Now I added the below code




    File location: app/design/frontend/Vendor/Module/Magento_Checkout/web/template/payment.html




    <form id="co-payment-form" class="form payments" novalidate="novalidate">
    <fieldset class="fieldset">
    <button type="button" data-bind="click: goBackShipping">Back from template</button>
    </fieldset>
    </form>


    Now what I want is that the goBackShipping will be triggered using KnockoutJS functionality. But I'm getting this error




    knockout.js:3391 Uncaught ReferenceError: Unable to process binding "click: function()return goBackShipping "




    This goBackShipping function is added in the checkout-data.js under the folder




    app/design/frontend/Vendor/Module/Magento_Checkout/web/js/checkout-data.js




    and here is the code I added



    /**
    * Copyright © Magento, Inc. All rights reserved.
    * See COPYING.txt for license details.
    */

    /**
    * Checkout adapter for customer data storage
    *
    * @api
    */
    define([
    'jquery',
    'Magento_Customer/js/customer-data',
    'jquery/jquery-storageapi'
    ], function ($, storage)
    'use strict';

    var cacheKey = 'checkout-data',

    /**
    * @param Object data
    */
    saveData = function (data)
    storage.set(cacheKey, data);
    ,

    // This is the newly added function
    goBackShipping = function ()
    alert("Preparing to go back");
    window.history.back();
    ,

    /**
    * @return *
    */
    initData = function ()

    return ... ;
    ,
    ;
    });


    Honestly I have no idea why it's giving an error like that. Am I doing something wrong? (obviously yes because it's giving an error).



    I would only like to implement a button click action using knockoutjs and simple javascript alert. But I can't get pass this error.










    share|improve this question
























      1












      1








      1








      I'm trying to implement a click event in one of the button I added under the Magento_Checkout module specifically under payment.html view. Now I added the below code




      File location: app/design/frontend/Vendor/Module/Magento_Checkout/web/template/payment.html




      <form id="co-payment-form" class="form payments" novalidate="novalidate">
      <fieldset class="fieldset">
      <button type="button" data-bind="click: goBackShipping">Back from template</button>
      </fieldset>
      </form>


      Now what I want is that the goBackShipping will be triggered using KnockoutJS functionality. But I'm getting this error




      knockout.js:3391 Uncaught ReferenceError: Unable to process binding "click: function()return goBackShipping "




      This goBackShipping function is added in the checkout-data.js under the folder




      app/design/frontend/Vendor/Module/Magento_Checkout/web/js/checkout-data.js




      and here is the code I added



      /**
      * Copyright © Magento, Inc. All rights reserved.
      * See COPYING.txt for license details.
      */

      /**
      * Checkout adapter for customer data storage
      *
      * @api
      */
      define([
      'jquery',
      'Magento_Customer/js/customer-data',
      'jquery/jquery-storageapi'
      ], function ($, storage)
      'use strict';

      var cacheKey = 'checkout-data',

      /**
      * @param Object data
      */
      saveData = function (data)
      storage.set(cacheKey, data);
      ,

      // This is the newly added function
      goBackShipping = function ()
      alert("Preparing to go back");
      window.history.back();
      ,

      /**
      * @return *
      */
      initData = function ()

      return ... ;
      ,
      ;
      });


      Honestly I have no idea why it's giving an error like that. Am I doing something wrong? (obviously yes because it's giving an error).



      I would only like to implement a button click action using knockoutjs and simple javascript alert. But I can't get pass this error.










      share|improve this question














      I'm trying to implement a click event in one of the button I added under the Magento_Checkout module specifically under payment.html view. Now I added the below code




      File location: app/design/frontend/Vendor/Module/Magento_Checkout/web/template/payment.html




      <form id="co-payment-form" class="form payments" novalidate="novalidate">
      <fieldset class="fieldset">
      <button type="button" data-bind="click: goBackShipping">Back from template</button>
      </fieldset>
      </form>


      Now what I want is that the goBackShipping will be triggered using KnockoutJS functionality. But I'm getting this error




      knockout.js:3391 Uncaught ReferenceError: Unable to process binding "click: function()return goBackShipping "




      This goBackShipping function is added in the checkout-data.js under the folder




      app/design/frontend/Vendor/Module/Magento_Checkout/web/js/checkout-data.js




      and here is the code I added



      /**
      * Copyright © Magento, Inc. All rights reserved.
      * See COPYING.txt for license details.
      */

      /**
      * Checkout adapter for customer data storage
      *
      * @api
      */
      define([
      'jquery',
      'Magento_Customer/js/customer-data',
      'jquery/jquery-storageapi'
      ], function ($, storage)
      'use strict';

      var cacheKey = 'checkout-data',

      /**
      * @param Object data
      */
      saveData = function (data)
      storage.set(cacheKey, data);
      ,

      // This is the newly added function
      goBackShipping = function ()
      alert("Preparing to go back");
      window.history.back();
      ,

      /**
      * @return *
      */
      initData = function ()

      return ... ;
      ,
      ;
      });


      Honestly I have no idea why it's giving an error like that. Am I doing something wrong? (obviously yes because it's giving an error).



      I would only like to implement a button click action using knockoutjs and simple javascript alert. But I can't get pass this error.







      magento2 magento2.2 magento2.3 knockoutjs






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked May 15 at 19:40









      MadzQuestioningMadzQuestioning

      2188




      2188




















          1 Answer
          1






          active

          oldest

          votes


















          2














          Your method needs to add the following class:




          vendor/magento/module-checkout/view/frontend/web/js/view/payment.js




          So overwrite this and add your method here.



          goBackShipping: function () 
          alert("Preparing to go back");
          window.history.back();
          ,





          share|improve this answer























          • Initially this is what I did but I'm still getting the error. That is why I ended up using the checkout-data.js. But the problem is neither of the two work.

            – MadzQuestioning
            May 16 at 4:23












          • @MadzQuestioning sohel's solution is perfect and it's working perfectly in mycode Please try again pasting this code and check agian

            – Rutvee Sojitra
            May 16 at 4:56












          • @MadzQuestioning you definitely made a mistake. Did you clear pub/static? IF you working on developer mode then no need to clear pub/static. Should clear browser js cache.

            – Sohel Rana
            May 16 at 5:17











          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%2f274772%2funable-to-process-binding-click-function%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









          2














          Your method needs to add the following class:




          vendor/magento/module-checkout/view/frontend/web/js/view/payment.js




          So overwrite this and add your method here.



          goBackShipping: function () 
          alert("Preparing to go back");
          window.history.back();
          ,





          share|improve this answer























          • Initially this is what I did but I'm still getting the error. That is why I ended up using the checkout-data.js. But the problem is neither of the two work.

            – MadzQuestioning
            May 16 at 4:23












          • @MadzQuestioning sohel's solution is perfect and it's working perfectly in mycode Please try again pasting this code and check agian

            – Rutvee Sojitra
            May 16 at 4:56












          • @MadzQuestioning you definitely made a mistake. Did you clear pub/static? IF you working on developer mode then no need to clear pub/static. Should clear browser js cache.

            – Sohel Rana
            May 16 at 5:17















          2














          Your method needs to add the following class:




          vendor/magento/module-checkout/view/frontend/web/js/view/payment.js




          So overwrite this and add your method here.



          goBackShipping: function () 
          alert("Preparing to go back");
          window.history.back();
          ,





          share|improve this answer























          • Initially this is what I did but I'm still getting the error. That is why I ended up using the checkout-data.js. But the problem is neither of the two work.

            – MadzQuestioning
            May 16 at 4:23












          • @MadzQuestioning sohel's solution is perfect and it's working perfectly in mycode Please try again pasting this code and check agian

            – Rutvee Sojitra
            May 16 at 4:56












          • @MadzQuestioning you definitely made a mistake. Did you clear pub/static? IF you working on developer mode then no need to clear pub/static. Should clear browser js cache.

            – Sohel Rana
            May 16 at 5:17













          2












          2








          2







          Your method needs to add the following class:




          vendor/magento/module-checkout/view/frontend/web/js/view/payment.js




          So overwrite this and add your method here.



          goBackShipping: function () 
          alert("Preparing to go back");
          window.history.back();
          ,





          share|improve this answer













          Your method needs to add the following class:




          vendor/magento/module-checkout/view/frontend/web/js/view/payment.js




          So overwrite this and add your method here.



          goBackShipping: function () 
          alert("Preparing to go back");
          window.history.back();
          ,






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered May 15 at 20:45









          Sohel RanaSohel Rana

          24.6k34663




          24.6k34663












          • Initially this is what I did but I'm still getting the error. That is why I ended up using the checkout-data.js. But the problem is neither of the two work.

            – MadzQuestioning
            May 16 at 4:23












          • @MadzQuestioning sohel's solution is perfect and it's working perfectly in mycode Please try again pasting this code and check agian

            – Rutvee Sojitra
            May 16 at 4:56












          • @MadzQuestioning you definitely made a mistake. Did you clear pub/static? IF you working on developer mode then no need to clear pub/static. Should clear browser js cache.

            – Sohel Rana
            May 16 at 5:17

















          • Initially this is what I did but I'm still getting the error. That is why I ended up using the checkout-data.js. But the problem is neither of the two work.

            – MadzQuestioning
            May 16 at 4:23












          • @MadzQuestioning sohel's solution is perfect and it's working perfectly in mycode Please try again pasting this code and check agian

            – Rutvee Sojitra
            May 16 at 4:56












          • @MadzQuestioning you definitely made a mistake. Did you clear pub/static? IF you working on developer mode then no need to clear pub/static. Should clear browser js cache.

            – Sohel Rana
            May 16 at 5:17
















          Initially this is what I did but I'm still getting the error. That is why I ended up using the checkout-data.js. But the problem is neither of the two work.

          – MadzQuestioning
          May 16 at 4:23






          Initially this is what I did but I'm still getting the error. That is why I ended up using the checkout-data.js. But the problem is neither of the two work.

          – MadzQuestioning
          May 16 at 4:23














          @MadzQuestioning sohel's solution is perfect and it's working perfectly in mycode Please try again pasting this code and check agian

          – Rutvee Sojitra
          May 16 at 4:56






          @MadzQuestioning sohel's solution is perfect and it's working perfectly in mycode Please try again pasting this code and check agian

          – Rutvee Sojitra
          May 16 at 4:56














          @MadzQuestioning you definitely made a mistake. Did you clear pub/static? IF you working on developer mode then no need to clear pub/static. Should clear browser js cache.

          – Sohel Rana
          May 16 at 5:17





          @MadzQuestioning you definitely made a mistake. Did you clear pub/static? IF you working on developer mode then no need to clear pub/static. Should clear browser js cache.

          – Sohel Rana
          May 16 at 5:17

















          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%2f274772%2funable-to-process-binding-click-function%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

          Grendel Contents Story Scholarship Depictions Notes References Navigation menu10.1093/notesj/gjn112Berserkeree

          Area configuration aggregation error after install Porto themeMagento 2.1 CE Installed but front/backend not loading/workingCSS not loading on page within Magento 2 pageCannot install module in Magento 2no commands defined in the “setup” namespace. in Magento2Magento 2: Static files are present but shows 404Why do i have to always run the commands to clean cache in Magento 2.1.8?Failure reason: 'Unable to unserialize value.'Error 500 after magento migrationIn production mode the site does not loadMagento 2 : Error 500 after installing

          Middle Expansion Olielle Resaix Definition: Uttering songs of triumph shouting with joy triumphant exulting Sejunction Journal 붙다 달 고급 품목 외출 The stretch trades the screeching tin. Definition: The act of speaking with a drawl a drawl Cough Sand Definition: An uproar a quarrel a noisy outbreak Shake Iron Publicize Horse House Baby 사과 Resaix Flaggy Jelly Temporary Unequaled Puppet A drop in the bucket Shrew 성격 회원 성질 미팅 The burn frames the tacky quality. Materialistic The smoke reduces the way. Yammoe Nondescript Cheek 얼굴 배 약하다 날리다 타다 The illegal country shows the iron. Help Rule Drearien Smoke Teaching Meaty Wasp Abraham Lincoln Jaws 진심 수리하다 Size Cork Idea Convert Think Lark John Lennon 거울 청소 군 추천하다 아이스크림