Skip to main content

Questions tagged [knockoutjs]

Denotes questions related to Knockout use in Magento2

Filter by
Sorted by
Tagged with
-1 votes
1 answer
21 views

jQuery.Deferred exception: Unable to process binding "click: function(){return someFunction }" in magento2.4.7

jQuery.Deferred exception: Unable to process binding "click: function(){return someFunction }" in magento2.4.7
Pinkesh Kuwal's user avatar
0 votes
1 answer
64 views

JQuery.Deferred exception: Unable to process binding in magento 2.4.6

I am trying to add a form after shipping methods. But I am facing JQuery.Deferred exception When I remove knockout js code like if or foreach , the template is rendered but when I add if or foreach it ...
Usama's user avatar
  • 1
1 vote
1 answer
139 views

Magento 2 : Error of cookieMessagesObservable is not defined

I have updated the Magento to 2.4.7 recently and updated it to the staging server. I am getting the error that cookieMessagesObservable is not defined in the console and due to this Minicart is not ...
Aman Mamdani's user avatar
0 votes
0 answers
22 views

Uncaught TypeError: t.options.map is not a function (Magento 2.4.4p4)

I'm encountering the following error when accessing Magento 2.4.4p4: ds.min.js:1 Uncaught TypeError: t.options.map is not a function at u (ds.min.js:1:1998) at ds.min.js:1:2563 at Array.map (<...
Mohd Farhan Bin Ramli's user avatar
0 votes
1 answer
23 views

Magento 2 How to create order on user demand

Hi I have one requirement where user visit on the website and upload their product image(Like some tool image, Some kind of machinery part etc.) and select some attribute like size,colour,material etc ...
Ajay Tiwari's user avatar
0 votes
1 answer
112 views

getting error "Cannot read properties of undefined (reading 'push')" for knockout observable variable

I just called the custom method inside the knockout js initialize function to show the list of customers by default in my custom module. I can return the data, but I'm getting the error "Cannot ...
Bojjaiah's user avatar
  • 3,762
0 votes
1 answer
68 views

Magneto 2 - Show related products to mini-cart

Good afternoon everyone, I am looking to show related products under the products in the Magento2 mini-cart. I have added related products to the product page no problem and added cross sells to the ...
Baber's user avatar
  • 192
0 votes
3 answers
99 views

How to hide admin product form tabs for specific admin user?

I want to have an admin user who would only be able to view the 'Images And Videos' and 'Search Engine Optimiation' in the admin product edit form. I tried the following. Created app/code/Vendor/...
Aniruddha Ray's user avatar
0 votes
1 answer
40 views

Magento2. KnockoutJs. Define Scope and call function on the same html node

I have a very simple Component define([ 'uiComponent', 'Magento_Customer/js/customer-data' ], function (Component, customerData) { 'use strict'; return Component.extend({ /** @...
vitoriodachef's user avatar
0 votes
4 answers
65 views

Redirect link for multiple store

I have a small problem and don't know how to implement redirect based on selected language (as a multiple store views there are few languages: en, lt,lv). The file located in app/design/frontend/...
Veronika Petkeviča's user avatar
1 vote
3 answers
414 views

Magento 2 Google language translate script not working

The script was functional on our Magento 2 website until last week. However, for the past four days, we've been encountering JavaScript and Knockout.js errors in the console when this script is active....
Keval Chauhan's user avatar
0 votes
0 answers
33 views

Where is this.address() defined in vendor/magento/module-checkout/view/frontend/web/js/view/shipping-address/address-renderer/default.js?

I try to figure out where this.address() is defined in vendor/magento/module-checkout/view/frontend/web/js/view/shipping-address/address-renderer/default.js ? /** * Copyright © Magento, Inc. All ...
Black's user avatar
  • 3,390
2 votes
2 answers
136 views

How to set radio buttons in custom payment method as required

So, I have set up a payment method (Leasing) - when chosen, you have the choice between different leasing providers. It is working so far, as the providers are shown in the checkout, I can click them ...
Mario's user avatar
  • 478
0 votes
0 answers
35 views

How to add custom checkout fileds fetched from DB?

How can I make a new, custom, checkout fields fetched from DB? I have created a new table where I keep fields names, also I created a Model, Resources, ResourceModel (admin can modify or add new one ...
miguelsantos69's user avatar
0 votes
2 answers
96 views

How to use click event on page load in knockout

<div class="free-sample" id="free-sample-component" data-bind="scope:'free_Sample_Component'"> <button id="get-free-sample" data-bind="click:...
Mital Shah's user avatar
1 vote
0 answers
19 views

Get category data from id in knockout html template

State of the art Using a custom type for the page builder, i'm generating this html <div class="gamme-content"> <h3 data-element="title">Discover our others ...
Claims's user avatar
  • 1,211
1 vote
0 answers
60 views

How to show preview selected options of multiselect attribute in magento2 product form?

I am trying to extend the Magento multiselect element to show the preview of options selected as per below screenshot. https://i.sstatic.net/uUYtR.png I tried to override Template file and js file as ...
Yogendra - eCommerce Developer's user avatar
0 votes
0 answers
146 views

Knockout Error: Found End Comment Without a Matching opening comment, as child of [object Text]

I'm getting a KO error complaining about a missing opening tag regarding the following code. I don't know much about KO but it looks like the the KO tags all match up. <!-- ko if: (visibleAddress)--...
totneschap's user avatar
2 votes
1 answer
272 views

check condition in foreach loop with dynamic variable in knockout js

I have html file at the path /var/www/html/nelson-avnet-app/code/vendor/module/view/frontend/web/template/shipping-address/list.html <!-- ko if: (visible)--> <div class="field addresses&...
divyang asodiya's user avatar
0 votes
0 answers
88 views

Magento 2: Add custom value to $parent in checkout summary

I want to add a custom value to the items in the order summary during checkout ($parent). I followed all the other howtos on how to do it: Create plugin for Magento\Checkout\Model\...
omsta's user avatar
  • 698
0 votes
2 answers
158 views

Magento 2 / Knockout js add image in form field notice

I want to add html tags to the notice of a specific field, I tried in LayoutProcessor but it does not interpret the image tags, I know it is possible from the field.html file, but it did not work for ...
Diego Castro's user avatar
0 votes
1 answer
218 views

how to add Strike through on original price and show cart rule discounted price

add strike through on the price and show the discounted price after strick through price on the checkout shipping step summary section
Nabeel shahbaz's user avatar
0 votes
0 answers
162 views

How to update grandtotal using knockout JS in Magento 2 checkout page

I've added a text field where customers can enter a coupon code. When click the "Apply Coupon" button, I am fetching the value of the coupon. I want to use this coupon value to adjust the ...
manoj kumar's user avatar
0 votes
0 answers
32 views

Pre-Select checkboxes based on custom condition in Magento 2 using KnockoutJS

I want to override a third party module's knockoutJS template (below) and want to pre-select the checkboxes based on my custom condition. Can anyone help me with code to how to do that? And if ...
Shahzad Hasan's user avatar
1 vote
0 answers
92 views

totals.getSegment('giftcardaccount') returning null

I'm about at my whits end. I still consider myself a relative novice with Magento, but this one literally has me baffled. I've also tossed it around to some senior devs at my work, and they are ...
Drew's user avatar
  • 141
0 votes
0 answers
62 views

Magento 2 getting errors on all page Unable to process binding "attr: function

I am getting errors on all pages anyone knows please give me solutions on how to fix it. Please check screenshot Errors:- Uncaught ReferenceError: Unable to process binding "attr: function(){...
Mohamad Irshad Alam's user avatar
0 votes
2 answers
653 views

Minicart: failed to load template

I'm using a custom template and having an issue with the minicart rendering. The minicart pop-up renders, but does not gather any data with 2 errors in the console. So the popup does open when you ...
BroodjeBE's user avatar
0 votes
2 answers
543 views

Magento 2 - Get location of view model of knockoutjs .html template

For example, how can I find out where the model / view model for this template is located at? vendor/magento/module-checkout/view/frontend/web/template/minicart/item/default.html
Black's user avatar
  • 3,390
0 votes
1 answer
481 views

Magento 2: How to show error inside payment method?

I am using Magento 2.3.5 and i need to show the error message on checkout page inside the payment method component, how can achieve that? Actually shows this way (Top of the page) I want to to show ...
Carlos A Magaña Perez's user avatar
1 vote
0 answers
365 views

How to get selected shipping address from js component in Magento 2?

I'm very new to the Magento world and I'm trying to figure out how do I get the currently selected shipping address in Magento 2. The goal is to only display the selected shipping address in the ...
Danil Hendra's user avatar
1 vote
2 answers
1k views

Magento 2: Custom component fails to load when implementing Magento_Checkout/js/model/totals

I have created a custom Knockout-Component that so far does not do anything. It is just the basic skeleton but it already fails to load. Template: <div class="my-module" data-bind="...
omsta's user avatar
  • 698
0 votes
1 answer
213 views

How to make Shipping address search function in checkout?

I want to make a function where users can search for the address from the shipping address list at the checkout page. Right now there are many B2B Magento stores globally. So Might they have a huge ...
Pragnesh Boghani's user avatar
2 votes
0 answers
423 views

Magento 2 : Codazon Fastest Theme js not loading propperly

I Have Installed Codazon Fastest Theme on my Manto2 site.i am facing an issue with js loading. here is my system configuration below. magento version : 2.4.5 PHP: 8.0 theme: Codazon Fastest Theme ...
sandip memariya's user avatar
1 vote
1 answer
112 views

How to add new section below shipping method and above next button on checkout page - Magento 2.4

I searched for the reference URL from that I can able to add above the "Shipping Method" or below "Next". But Not able to add the text box between "Shipping Method" and &...
Kushal Dani's user avatar
  • 2,134
1 vote
2 answers
725 views

Translate dynamic text in magento 2 javascript

i have a text like within %1 days %1 is dynamic how to translate using data-bind:i18n in html template magento 2.4 <span data-bind="text:methoddata[key].delivery_days_text"></span&...
we testers's user avatar
2 votes
0 answers
607 views

How to allow to upload mp4 video on page-builder in magento 2

I am trying to create a custom component for upload mp4 video like image uploading component. Video is uploading and save fine and also show on front cms-page but after the save video will be remove ...
Divya Rawat's user avatar
0 votes
1 answer
169 views

Magento 2.4.4: Attach event handler to Province dropdown to reload the checkout page

We developed a custom shipping module that displays shipping methods and the rates in Firecheckout page. The issue is the Shipping Method block in the firecheckout page doesn't refresh if one changes ...
CodeForGood's user avatar
0 votes
0 answers
107 views

Magento2 : How to save chosen dropdown list from template to the database

The selected option is not being save in the databse, please help what i did wrong? I'm running magento 2.4.4 with php 8.1 event.xml <?xml version="1.0"?> <config xmlns:xsi="...
Bayzel's user avatar
  • 187
0 votes
1 answer
343 views

can anyone find out the error in this knockout js code

this is phtml file located in Namespace_ModuleName/view/adminhtml/templates/js_time.phtml <div> <h4>Current Time is:</h4><span id="time_show" data-bind="text: ...
mrshiam's user avatar
  • 15
0 votes
1 answer
235 views

Base price, discounted price and percentage discount in the summary checkout

I need to have the discounted, base, and percentage off prices in the summary checkout. I found the file that prints and it is this checkout/summary/item/price/row_excl_tax.html but I can't retrieve ...
yavonz15's user avatar
  • 417
0 votes
1 answer
51 views

How to learn knockout js. Please help to learn about js,

**How to learn knockout js. Please help to learn about js.
Ayush Gupta's user avatar
2 votes
1 answer
46 views

Magento 2 change the addtocart button text on detail page based on the product increment

I am doing customisation on PDP page as per my client requirement, For my requirement i am using the grouped product, also added a option to increase/decrease each product quantity count, when ...
senthil's user avatar
  • 1,729
0 votes
1 answer
148 views

How to initialise Magento Requisition over AJAX?

I have tried several ways to initialize Magento RequisitionList after AJAX call. First I tried with data-mage-init Please correct me if there is anything wrong. I have used the underscore JS template ...
Pragnesh Boghani's user avatar
0 votes
1 answer
311 views

Find Javascript Merge Knockout Error In Extensions Uncaught Error: Cannot find closing comment tag to match: ko template:

Magento 2.4.3 Apache Nginx MariaDB Hello Thanks for taking the time to read this. We have a dev site we are trying to enable Swissup Pagespeed Extension however it is getting 1 error - the merge ...
nem3943's user avatar
  • 43
1 vote
1 answer
608 views

Unable to access custom data section using customerData.get() inside KnockoutJS component

I am following this in order to create new section https://developer.adobe.com/commerce/php/development/cache/page/private-content/ All is working if I request '{localhost}/customer/section/load', the ...
Ilja Polanskis's user avatar
1 vote
1 answer
165 views

Customize Checkout Html Templates

Im customizing the checkout of Magento and having some issue in html templates. I copy the cart-items.html from the magento-checkout module in my theme but, when i change the template structure the js ...
Lukan Dos Santos Pinto's user avatar
0 votes
1 answer
406 views

How can I resolve the JavaScript error after upgrade magenta from M 2.4.3 to 2.4.5 in Magento 2??

Here I upgrade Magento from 2.4.3 to 2.4.5 so getting a javascript error can anyone help me how can I resolve this error? Can not find out what excatly issue
Jay Parmar's user avatar
1 vote
0 answers
561 views

Magento 2.4.4 checkout knockout 'Unable to process binding'

No customisation on Magento frontend Message component (Magento_Theme/js/view/messages"), but I got this error after M2.4.4 update. knockout.js:3753 Uncaught TypeError: Unable to process binding &...
Rita555-Simon's user avatar
2 votes
1 answer
852 views

Magento 2.4 Failed to load the knockout component

Good morning, could someone help me with the error "Error loading the component "Custom_Module/js/customer-lines" that occurs to me when loading a JS knockout file, the error appears a ...
GStiven's user avatar
  • 41
0 votes
2 answers
2k views

Minicart component not working after 2.4.5 upgrade

After recently upgrading a magento 2 install from 2.3.3 to 2.4.5 I'm having problems with the minicart UI Component not rendering anything. After some investigation, it appears that component is ...
fin's user avatar
  • 71

1
2 3 4 5
17