New answers tagged

0

Working code: Create a mixin for the default payment method view: app/code/MageWorx/Checkout/view/frontend/requirejs-config.js var config = { config: { mixins: { 'Magento_OfflinePayments/js/view/payment/method-renderer/purchaseorder-method': { 'MageWorx_Checkout/js/view/payment/method-renderer/purchaseorder-method-...


0

Using theme: You can copy corresponding template in your theme (saving original path) and change data in template according your needs. copy original template vendor/magento/module-checkout/view/frontend/web/template/payment-methods/list.html in your theme app/design/frontend/{VendorName}/{themeName}/{packageName}/Magento_Checkout/web/template/...


0

I found that the best way to change the input type is to add a different template to the LayoutProcessor and change the input type in there. protected function updateElementTmpls(&$jsLayoutResult) { $shippingAddress = &$jsLayoutResult['components']['checkout']['children']['steps']['children']['shipping-step']['children']['shippingAddress']['...


0

You can try this module app/code/Sanne/Js/etc/module.xml <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd"> <module name="Sanne_Js" setup_version="1.0.0"> <sequence> <module name="Magento_Checkout" /></sequence> </...


2

You need to pass it to your component via the PHTML file, add this to your PHTML file: <script type="text/x-magento-init"> { ".yourSelector": { "yourComponentAliasORPath": { "galleryImagesJson": <?= /* @noEscape */ $block->getGalleryImagesJson() ?>, } } } </script> Then in ...


1

You want to use the value KO binding. The value binding links the associated DOM element’s value with a property on your view model. This is typically useful with form elements such as , and . When the user edits the value in the associated form control, it updates the value on your view model. Likewise, when you update the value in your view model, ...


0

I managed to add errorPlacement code in the JS file where validation function is called. Before validate: function() { return $(form).validation() && $(form).validation('isValid'); }, After validate: function() { return $(form).validation({errorPlacement: function(error, element) { error.appendTo('.input-error'); }})...


1

render image using knockout js <img data-bind="attr: {src: imagePath, alt: $t('Acceptance Mark')}" class="image-icon"/>


2

I think a ko tags must be closed, like: <!-- ko rvStorage() --><!-- /ko --> <!-- ko foreach: { data: recently(), as: 'productView' } --> <li class="product-item" > </li> <!-- /ko --> <!-- ko rvCarousel() --><!-- /ko --> and must look like <!-- ko --><!-- /ko --> From the ...


Top 50 recent answers are included