I created an extra field in checkout. Also created input with a button. When you click on the button, the field in checkout is overwritten with the value that was in input. Faced such a problem: How do I get this value from input when I click on the button to write to the value of the field that I created. For example: Enter 3.00 into the input, it redirects us to: app/code/vendor/Module/view/frontend/web/js/view/extra-fee-checkout-form.js How do I write this value here? order.totals().total_segments he has this object example:


console: "{code: extrafee, title: extrafee, value: 0}"

but i think write like that:

order.totals().total_segments[5].value = '123123'

<- bad idea

  • You need to create the backend logic. – Khoa TruongDinh Sep 12 '19 at 4:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.