Categories
CMS Magento Mastering Development

how to solve 401 redirect on REST API on Custom tab between shipping and Payment option

I have created some steps between shipping and Payment form and add some field between then and applied ajax on that but i have facing an issue for not logged in user it will gave an error of 401 and redirect on login page on saving first field. Will anyone help me how to successfully […]

Categories
CMS Magento Mastering Development

Use custom js in Checkout Input field

I added my custom js in my module js file. But I need to use the functionality in the checkout input field. But I don’t know how I can let my .html file use that custom js function. Below are my code My Custom JS is located in app/code/Vendor/Module/view/frontend/web/js/ecard-checker.js /** * Copyright © Magento, Inc. […]

Categories
CMS Magento Mastering Development

Use custom js in Checkout Input field

I added my custom js in my module js file. But I need to use the functionality in the checkout input field. But I don’t know how I can let my .html file use that custom js function. Below are my code My Custom JS is located in app/code/Vendor/Module/view/frontend/web/js/ecard-checker.js /** * Copyright © Magento, Inc. […]

Categories
CMS Magento Mastering Development

Use custom js in Checkout Input field

I added my custom js in my module js file. But I need to use the functionality in the checkout input field. But I don’t know how I can let my .html file use that custom js function. Below are my code My Custom JS is located in app/code/Vendor/Module/view/frontend/web/js/ecard-checker.js /** * Copyright © Magento, Inc. […]

Categories
CMS Magento Mastering Development

Jquery callback function cannot read property of undefined using knockout js

1.lets assume placeOrderClick function is called.within this there is a eprotect API success callback function called submitAfterEprotect. i’m trying to call placeorder function using self in submitAfterEprotect callback function. but it is throwing an error. cannot read property of undefined placeorder. Could you please help me on this? It is related to Knockout js. but […]

Categories
CMS Magento Mastering Development

Magento 2 Show Messages at Checkout

I am trying to show a message at checkout based on a Store ID. So for different stores I show different messages either with the shipping method or the payment method. Here is what I have: — Sorry, I couldn’t get the code blocks below to work consistently. view/frontend/layout/checkout_index_index_xml <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <referenceBlock name="checkout.root"> […]

Categories
CMS Magento Mastering Development

Magento 2 – Create repeatable field in checkout and saving the data to model

I am trying to create fields for each product in the cart. Some extra data needs to be filled in per product and the wish was for it to be found in the address section of the checkout form. I can create the fields correctly with the following view elements: define( [ ‘jquery’, ‘ko’, ‘uiComponent’, […]

Categories
CMS Magento Mastering Development

Magento2.3.5 Custom checkout field custom validation Amazon Error

I have a custom field and customScope added with LayoutProcessor which works fine! But I need to add custom validation stop submission if my custom doesn’t meet the requirements : Is just trowing amazon error for some reason: Uncaught TypeError: setShippingInformationAction(…).done is not a function at setShippingInformationAmazon (shipping.js:60) at UiClass.setShippingInformation (shipping.js:76) at HTMLFormElement.<anonymous> (knockout.js:4640) at […]

Categories
CMS Magento Mastering Development

Error when i add custom field to checkout

i have just started using magento2 (2.3.1) and WAMP (php 7.2.25) on Windows10, and i’m trying to add new custom fields to Checkout page.I’m following the ufficial doc and this question. I created: module.xml registration.xml Setup/InstallSchema.php etc/frontend/di.xml etc/extension_attributes.xml Model/Plugin/Checkout/LayoutProcessorPlugin view/frontend/requirejs-config.js view/frontend/web/js/action/set-shipping-information-mixin.js I see the new fields on Checkout shipping-step frontend but when i click on […]

Categories
CMS Magento Mastering Development

Checkout address custom attributes don’t get rendered in address information components

I have to add a new customer address attribute apellido2, this field is a second lastname and must be present in both shipping and billing address. So i after reading a few posts, i started with my custom module: app/code/Vendor/Module/etc/extension_attributes.xml <?xml version=”1.0″?> <config xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”urn:magento:framework:Api/etc/extension_attributes.xsd”> <extension_attributes for=”Magento\Customer\Api\Data\AddressInterface”> <attribute code=”apellido2″ type=”string” /> </extension_attributes> </config> app/code/Vendor/Module/etc/di.xml <?xml […]