Skip to main content
25 votes
Accepted

Magento 2: How to make the phone number optional?

To change phone number into optional follow the below configuration setup Go to Admin Login -> Stores -> (Settings) Configuration -> Customers(Tab) -> Customer Configuration -> Name ...
Thangam's user avatar
  • 500
22 votes
Accepted

Magento 2: Pass data in checkout

You have to just override getConfig() function of checkout module. app/code/Packagename/Checkout/etc/frontend/di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/...
Rakesh Jesadiya's user avatar
19 votes
Accepted

Magento 2.2 Input field validation on Checkout page

I'll show you how to do this on the example of validating a company name. Create the file : NameSpace/Module/view/frontend/layout/checkout_index_index.xml In it, I will insert rules for ...
Eugene Kapelko's user avatar
9 votes
Accepted

How to call phtml file from html in Magento 2?

We create our phtml: app/design/frontend/{Vendor}/{theme}/Magento_Checkout/templates/html/my-custom.phtml <?= /* @escapeNotVerified */ __('My html is loaded') ?> <h3>successfully !</...
PЯINCƎ's user avatar
  • 11.7k
8 votes

How to add css only for checkout page of rwd theme in Magento 1.9.0

You are using the wrong handler <checkout_cart_index> Will add css to cart page not in check out page replace with <checkout_onepage_index> this will add content to checkout page
Murtuza Zabuawala's user avatar
7 votes
Accepted

Magento 2 : How to get postcode from selected shipping addresses in checkout page?

For this first you have to override core functionality in your custom module Go to Namespace/ModuleName/view/frontend/requirejs-config.js var config = { map: { '*': { ...
Vivek Singh's user avatar
6 votes
Accepted

Working of discount coupons on the checkout page in Magento 2.2.2

1) For customer account: /V1/carts/mine/coupons/:couponCode I just explain how sale rules work for customer logged a) Set coupon: vendor/magento/module-quote/etc/webapi.xml <route url="/V1/...
Khoa TruongDinh's user avatar
6 votes

Magento 2.4 Checkout error Failed to load the "Magento_Checkout/shipping" template

check your custom shipping.html file: app/code/YOUR_VENDOR/MODULE_NAME/view/frontend/web/template/shipping.html In this file something is not correct. The newest Magento 2.4.x seems to be more strict ...
magento4u_com's user avatar
5 votes
Accepted

Extend checkout order summary section in Magento 2

File path should be below vendor/magento/module-tax/view/frontend/web/template/checkout/summary/shipping.‌​html file Add your custom <span class="title">Custom Text</span> text like ...
Suresh Chikani's user avatar
5 votes

Magento 2 : How to get postcode from selected shipping addresses in checkout page?

You can try this way. protected $_checkoutSession; public function __construct ( \Magento\Checkout\Model\Session $_checkoutSession ) { $this->_checkoutSession = $_checkoutSession; } ...
Ramkishan Suthar's user avatar
5 votes

How to display order summary sidebar in shipping step of checkout page in magento 2?

UPDATED ANSWER As @badwi noted, the old answer started creating an error. Here is the new way to do it using magento best practices. This is tested as working in M2.3.6. I'm creating these files in my ...
Cypher909's user avatar
  • 308
4 votes

How to add a custom form in a custom payment method

app/code/Ktpl/Ordercomment/etc/frontned/di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:...
Riddhish Bhayani's user avatar
4 votes

Extend checkout order summary section in Magento 2

In order to answer your question, please answer these questions yourself: Do you have any virtual products in this quote? Do you check if the shipping.html able to generate as your expectation (try ...
Toan Nguyen's user avatar
  • 3,059
4 votes

Magento2 : How to add state options for UAE

Here is the way you can insert new states to your Magento 2 via the setup file just follow the below steps Create a new module at Magento_root/app/code/{Vendor}/{Module} create below files into it as ...
Abhishek Tripathi's user avatar
4 votes
Accepted

How to override checkout cart page in custom theme magento 2?

Create below path in your custom theme: app/design/frontend/{{your package}}/{{your theme}}/Magento_Checkout/ Copy the required template, layout or web files to be modified from vendor/magento/...
Himmat Paliwal's user avatar
4 votes
Accepted

Magento 2 checkout login with mobile number or email

For Login with the customer, First you need to make mobile number required field in customer Registration form. Whenever customer register, At that time you need to add a field like mobile no. and ...
Muhammad Hasham's user avatar
4 votes
Accepted

Magento 2 : How to remove _required class for region and region_id in shipping address?

You can make the region field optional from admin, follow below steps. Step 1 Login to the back end of Magento 2. On the Admin sidebar, navigate to Stores > Settings > Configuration. Under the panel ...
Sanjay Gohil's user avatar
  • 2,200
4 votes

Uncaught ReferenceError: Unable to process binding "if: function(){return isExcludingDisplayed() }" After Magento 2.3.4 Upgrade Checkout Cart Page

The problem might be caused due to the incorrect value or no value available for the isExcludingDisplayed() and haveToShowCoupon() functions. These two functions are available in shipping.js file ...
Sathishkumar's user avatar
4 votes
Accepted

How to get Data from system.xml file

You should pass system.xml data to customer by CompositeConfigProvider. define CompositeConfigProvider in your di.xml file app/code/{{Vendorname}}/{Modulename}/etc/frontend/di.xml <?xml version=&...
S.P's user avatar
  • 1,554
3 votes

Magento 2.2.2 - how to remove company and zipcode from billing address from checkout

You can remove Company from the Magento dashboard. Go to Stores > Configuration > Customers > Customer Configuration > Name and Address Options But if you want to remove them from the layout ...
Adrian Z.'s user avatar
  • 707
3 votes
Accepted

Magento 2: Add a custom link in checkout

Override /vendor/magento/module-checkout/view/frontend/web/template/shipping.html in your custom theme app/design/frontend/Test/test/Magento_Checkout/web/template/shipping.html OR If you have ...
Prince Patel's user avatar
  • 22.8k
3 votes

Magento 2: Add a custom link in checkout

Override /vendor/magento/module-checkout/view/frontend/web/template/shipping.html and add a link before the button. <div class="actions-toolbar" id="shipping-method-buttons-container"> ...
Mike's user avatar
  • 1,148
3 votes
Accepted

Magento 2 how to get product attribute options on checkout cart

Create a module Override the configurable model in VENDOR/MODULENAME/Model/Product/Type/Configurable.php namespace VENDOR\MODULENAME\Model\Product\Type; use Magento\ConfigurableProduct\Model\...
lavanya's user avatar
  • 199
3 votes
Accepted

How can i add an information message to the checkout

You can add text before shipping method from this file: vendor/magento/module-checkout/view/frontend/web/template/shipping.html Override this core file to your custom theme at app/design/frontend/...
Prince Patel's user avatar
  • 22.8k
3 votes

magento2 remove lastname from checkoutpage

magento\vendor\magento\module-customer\view\frontend\templates\widget\name.phtml Paste above file in-to your theme. And You will find a class named field-name-lastname remove this complete div for ...
Aditya Shah's user avatar
  • 7,627
3 votes

magento2 remove lastname from checkoutpage

Run below query into phpMyAdmin UPDATE eav_attribute SET is_required = 0 WHERE attribute_code = 'lastname' and `entity_type_id` = 1 Please overwrite theme below theme file. magento\vendor\magento\...
Mayur Rathod's user avatar
3 votes
Accepted

Magento2: breadcrumbs are not shown in checkout page

Compare your code with given below code. IF in theme already have a checkout_index_index.xml file then add below code. <referenceBlock name="breadcrumbs"> <action method="addCrumb"> <...
Chirag Patel's user avatar
  • 6,136
3 votes
Accepted

how to show Promo code or coupon code on Checkout page in magento 1.9

You can call coupon code at checkout by following code: <div class="custom-coupan"> <?php echo $this->getLayout()->createBlock('checkout/cart_coupon') ->setTemplate('checkout/...
Pawan's user avatar
  • 5,906
3 votes

Magento 2 How to remove template in checkout page?

Add your block in default.xml and in checkout_index_index.xml write below code: <referenceBlock name="form.subscribe.home" remove="true" /> Hope it solve your issue.
temper's user avatar
  • 1,014
3 votes

How to get checkout cart URL on checkout page in shipping.html template file?

I have got the solution. It is very simple like javascript variable window.checkoutConfig contains many other variables and checkout details. To get checkout cart URL, use window.checkoutConfig....
Kazim Noorani's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible