- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2022
12:05 PM
04-10-2022
12:05 PM
Magento2 checkoutpage html getcode
What does this code mean in the Magento2 payment page? In particular, what does getCode mean
<div class="payment-method" data-bind="css: {'_active': (getCode() == isChecked())}"> <div class="payment-method-title field choice"> <input type="radio" name="payment[method]" class="radio" data-bind="attr: {'id': getCode()}, value: getCode(), checked: isChecked, click: selectPaymentMethod, visible: isRadioButtonVisible()"/> <label data-bind="attr: {'for': getCode()}" class="label"> </div> </div>
Labels:
4 REPLIES 4
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2022
04:54 AM
04-11-2022
04:54 AM
Re: Magento2 checkoutpage html getcode
You can get the payment method's code value using getCode()
This function can be found in JS file as mentioned below:
getCode: function () {
.............
},
Problem solved? Click Kudos and "Accept as Solution".
200+ Magento 2 Extensions for Enhanced Shopping Experience.
200+ Magento 2 Extensions for Enhanced Shopping Experience.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2022
08:34 PM
04-20-2022
08:34 PM
Re: Magento2 checkoutpage html getcode
@prepaidgiftbalance wrote:What does this code mean in the Magento2 payment page? In particular, what does getCode mean
<div class="payment-method" data-bind="css: {'_active': (getCode() == isChecked())}"> <div class="payment-method-title field choice"> <input type="radio" name="payment[method]" class="radio" data-bind="attr: {'id': getCode()}, value: getCode(), checked: isChecked, click: selectPaymentMethod, visible: isRadioButtonVisible()"/> <label data-bind="attr: {'for': getCode()}" class="label"> </div> </div>
This function can be found in JS files.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2022
12:56 AM
04-26-2022
12:56 AM
Re: Magento2 checkoutpage html getcode
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2022
09:34 PM
04-26-2022
09:34 PM