22 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 ...
user avatar
  • 460
20 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/...
user avatar
18 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 ...
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 !</...
user avatar
  • 11.4k
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
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: { '*': { ...
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/...
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 ...
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; } ...
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 ...
user avatar
  • 298
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:...
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/...
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 ...
user avatar
  • 2,162
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 ...
user avatar
3 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 ...
user avatar
  • 2,869
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 ...
user avatar
  • 687
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 ...
user avatar
  • 21.7k
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"> ...
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\...
user avatar
  • 189
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/...
user avatar
  • 21.7k
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 ...
user avatar
  • 7,439
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\...
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"> <...
user avatar
  • 5,876
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/...
user avatar
  • 5,366
3 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 ...
user avatar
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.
user avatar
  • 934
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....
user avatar
3 votes

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

The problem is due to file changes in Magento 2.3.4, if you have customized module-checkout/view/frontend/web/js/view/summary/shipping.js, please compare the files with the core file and add those ...
user avatar
3 votes

Magento directory_country_region_name table for city : City Dropdown

You need to customize your checkout page layout processor. Try the below codes for creating a new module to customize the checkout page fields: Step 1: Create a registration.php file for your module: ...
user avatar
2 votes
Accepted

Magento 2 : Uncollapse Summery On First Step Of Checkout Page

You need to override vendor/magento/module-checkout/view/frontend/web/template/summary/cart-items.html and change (line number 8) <div class="block items-in-cart" data-bind="mageInit: {'...
user avatar
  • 1,165

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