Questions tagged [knockout]

The tag has no usage guidance.

23 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
1answer
637 views

Pass data to child template in cart-items of checkout page

My site is a market place site where vendors(sellers can sell their product). Now i want to customize the to group items in cart by each vendor like this: http://prntscr.com/hmsam6 ...
2
votes
0answers
23 views

How to use ko.observable on change of data and run a js function Magento 2

How can I run a js function on change of data, So I have heard of knockoutjs ko.observable define([ 'uiComponent', 'ko', 'Magento_Checkout/js/model/totals' ], function (Component, ko, totals) { '...
2
votes
0answers
45 views

How to move next button in checkout to sidebar and keep it's behaviour. Magento 2.3

As in question title. Button is placed in Magento_Checkout/view/frontend/web/template/shipping.html I need to move it under sidebar section or create new button which will act the same like old one. ...
1
vote
0answers
16 views

Magento 2 - Add new attribute (delivery_time) to recently viewed widget

What files need to be changed to display additional attributes in recently view products widget? In the widget settings there is only name, price, image and learn_more available. For the product ...
1
vote
0answers
24 views

Knockout Js get value from Config

I want to see if my module is enabled in config are through html using Knockout JS. ko if: module_enabled ==1 show a button if not don't show a button But i get this following error Uncaught ...
1
vote
0answers
23 views

Magento 2 : on tab click ko js and template render

In my module, there are tab structure same like mentioned in this below image tab structure. I want to do like that, when on tab click at that time, ko template and ko js should be render. How to do ...
1
vote
1answer
150 views

Knockout js : Read parent of parent's data

I want to read the parent of parent elements data. But, I can't able to read it properly. My Array Screenshot : My Code : <!-- ko foreach: { data: Object.keys($parent.optionParam()[main_id]), as:...
1
vote
0answers
98 views

Magento 2 : add google map in checkout

I want to add google map in Magento 2 checkout page. Added API url and key to phtml using below code <referenceContainer name="after.body.start"> <block class="Test\Vendor\Block\...
1
vote
0answers
66 views

Magento 2 Knockout Component after initialize hook or method

In the knockout component I have initialize: function () { this._super(); var self = this; ....some code.... } I want to move the ....some code.... part into afterInitilize() method, ...
1
vote
0answers
32 views

how to set dropdown in magento2?

How to set drop down field in minicart qty place file path view/frontend/web/template/minicart/item/default.html file if anyone knows please explain me
0
votes
0answers
14 views

How to apply bindings and subscribe on change of discount amount totals.totals().items in Magento 2

In my checkout page, on applying and removing promo code, it changes the discount key in totals.totals().items. How to apply bindings and subscribe in knockoutjs, so that I can call my function which ...
0
votes
0answers
18 views

How to call a function on change of window.checkoutConfig data Magento 2

So, I am using window.checkoutConfig data in my js for some calculation. the function works well when called from HTML, but it doesn't run on itself when window.checkoutConfig data is changed. HTML ...
0
votes
0answers
12 views

How to update product details(details.html) in checkout on applying promo code Magento 2

on the checkout page when the promo code is applied, I need to update the item details on the basis of some calculation of promo code for final sale I have to show final sale text dynamically when ...
0
votes
1answer
24 views

Get config value in html using knockoutjs

I am trying to get config value to html file. My aim is to check if the config value is enabled of it is show a button and if it’s continue normally with out button the button. I am not sure how to ...
0
votes
0answers
38 views

Magento 2 - Load knockout content in modal popup

I want to load knockout content in modal popup on the cart page.
0
votes
0answers
33 views

Magento 2 : pagination using knockout

I want to develop pagination of custom collection using knockout. How to implement it? Any help would be appreciated. Thanks.
0
votes
0answers
154 views

Magento 2: Knockout js dynamic content binding repeats the same element

I have created a custom form in checkout page. It contains a drop down field and one ul list. By default there is few li tags(For example,4). When we change the dropdown the li tags will be changed( ...
0
votes
1answer
351 views

Magento 2 : knockout data-bind:click not working

I added phtml file using ajax response. There are two buttons available in that phtml file. Buttons.phtml : <div id="rh-buttons-temp" class="actions" data-bind="scope:'rh-buttons'"> <!--...
0
votes
0answers
65 views

Magento 2 : Bind data on ajax response using knockout not working proper

I want to call phtml file and on button click that function call from knockout js file. buttons.phtml : (File call in ajax response) <div class="actions"> <button type="button" title="...
0
votes
0answers
44 views

Magento 2: How to use 2 minicarts with same knockout template?

In my site are use 2 minicarts (in header and sidebar) with same knockout template: app/design/frontend/Vendor/Theme/Magento_Checkout/web/template/minicart/content.html I want to adjust small fixes,...
0
votes
1answer
520 views

Magento 2: Update specific input field class via Knockout

I would like to update / add a class to a specific text input field via Knockout (as opposed to just using JQuery). For example, I'd like to add another class to the input below. And, more ...
0
votes
0answers
277 views

shipping address is missing out on checkout

I don't know why but i get an error js on checkout. When I'm on the payment step, The shipping address Below the choice of method of payment is absent. The problem come from an error with Knockout. ...
0
votes
0answers
296 views

KnockoutJs tab In magento 2

I am using Magento 2.1.0, and i am trying to create tab on frontend by using knockout js. i checked so many tutorial, in which one i refer http://jsfiddle.net/NLGm8/32/ I created Phtml file <...