12

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/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> <!-- pass custom variable to checkout page --> &...


10

To change phone number into optional follow the below configuration setup Go to Admin Login -> Stores -> (Settings) Configuration -> Customers(Tab) -> Customer Configuration -> Name and Address Options. In their change Show Telephone is Required into Optional. Now the checkout page is not asking the Phone number is required.


8

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


5

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 validation name = 'company'. <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="checkout" xsi:noNamespaceSchemaLocation="...


4

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:ObjectManager/etc/config.xsd"> <type name="Magento\Checkout\Block\Checkout\LayoutProcessor"> <plugin name="sr_add_custom_field" ...


4

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/carts/mine/coupons/:couponCode" method="PUT"> <service class="Magento\Quote\Api\CouponManagementInterface" method="set"/> <resources> ...


4

We create our phtml: app/design/frontend/{Vendor}/{theme}/Magento_Checkout/templates/html/my-custom.phtml <?= /* @escapeNotVerified */ __('My html is loaded') ?> <h3>successfully !</h3> We instantiate our custom phtml: app/design/frontend/{Vendor}/{theme}/Magento_Checkout/templates/onepage.phtml /* The Magento onepage code first, ...


4

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: { '*': { 'Magento_Checkout/js/model/shipping-service' : 'NameSpace_ModuleName/js/model/shipping-service' } } }; and Go to Namespace/ModuleName/...


3

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 file just put: <item name="company" xsi:type="array"> <item name="visible" xsi:type="boolean">false</item> </item> <item name="...


3

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\module-customer\view\frontend\templates\widget\name.phtml Please remove field-name-lastname from above overwrite theme file. Clear the cache: php bin/magento ...


3

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 last name. (form theme folder, which you just copied form vendor) Now run below query in your database to set lastname as optional for customer, because we just ...


3

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 below example <!-- ko if: isExcludingDisplayed() --> <tr class="totals shipping excl"> <th class="mark" scope="row"> &...


3

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 custom module Override shipping.html at app/code/Vendor/Module/view/frontend/web/template/shipping.html Now add custom link before <div class="actions-...


3

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"> <!-- add link here --> <div class="primary"> <button data-role="opc-continue" type="submit" class="button action continue ...


3

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"> <argument name="crumbName" xsi:type="string">Home</argument> <argument name="crumbInfo" xsi:type="array"> <item name="title" xsi:type="string"&...


3

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/module-checkout/view/frontend Update the files and flush cache to get the changes reflected. If you are modifying web files then don't forget to redeploy the ...


3

You can call coupon code at checkout by following code: <div class="custom-coupan"> <?php echo $this->getLayout()->createBlock('checkout/cart_coupon') ->setTemplate('checkout/cart/coupon.phtml')->toHtml(); ?> </div> You need to add code at: mag1Root/app/design/frontend/{package}/{theme}/template/checkout/onepage/...


3

Add your block in default.xml and in checkout_index_index.xml write below code: <referenceBlock name="form.subscribe.home" remove="true" /> It will solve your issue.


2

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: {'collapsible':{'openedState': 'active'}}"> to <div class="block items-in-cart active" data-bind="mageInit: {'collapsible':{'openedState': 'active', 'active': true}...


2

This is most probably the issue related to checkout Javascript code. Open skin/frontend/<package>/<theme>/js/opcheckout.js Find the line: if (elements[i].name=='payment[method]') { Change it to: if (elements[i].name=='payment[method]' || elements[i].name == 'form_key') { Save the file. Clear Cache from Magento Admin (System -> Cache ...


2

First of all, I would not recommend to use ObjectManager as it is considered bad practice. Regarding your question, and instead of using the success.phtml to get the billing address, you could use and observer or a plugin to get the info you need. Observer Approach Create an observer to observe event checkout_submit_all_after. By observing this event ...


2

So I have not found the problem but I have found a solution in checkout_index_index.xml in your theme, you can't copy all the content from the default theme but if you want to add stuff to the content section you can use <referenceBlock name="checkout.root"> When using <referenceContainer name="content"> The shipping table stops working ...


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 to put some text in the beginning or at the end of file, then do inspection) So, let take a look into vendor\magento\module-checkout\view\frontend\web\...


2

If the cart contains only virtual or downloadable items, you will not have to select any shipping method at checkout but it will also skip the shipping address during checkout and the associated shipping cost. Removing the shipping address step for normal simple products (without affecting the shipping method or cost) would be much, much more complicated ...


2

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/Vendor/theme/Magento_Checkout/web/template/shipping.html Add your text before <li id="opc-shipping_method"> or where you want to show. After chnages ...


2

It is simple you can manage countries under store configuration settings. Follow below steps : Go to -> Store -> Configuration -> General -> Allow countries -> Select "United States"


2

make sure checkout_index_index.xml is in right place app/design/frontend/Vendor/default/Magento_Checkout/layout/checkout_index_index.xml in your checkout_index_index.xml file paste below code <referenceBlock name="breadcrumbs"> <action method="addCrumb"> <argument name="crumbName" xsi:type="string">Home</...


2

You can need to create a module and rewrite street in di.xml di.xml <type name="Magento\Checkout\Block\Checkout\LayoutProcessor"> <plugin name="rewrite-street" type="Vendor\ModuelName\Model\Checkout\LayoutProcessorPlugin" sortOrder="20"/> </type> Create LayoutProcessorPlugin <?php namespace Vendor\ModuleName\Model\Checkout; ...


2

You can try this way. protected $_checkoutSession; public function __construct ( \Magento\Checkout\Model\Session $_checkoutSession ) { $this->_checkoutSession = $_checkoutSession; } public function execute(\Magento\Framework\Event\Observer $observer) { $postCode = $this->_checkoutSession->getQuote()-getShippingAddress()->...


2

Please refer https://community.magento.com/t5/Magento-1-x-Programming/Checkout-wrong-redirection-Magento-1-9/m-p/8238#M1843 I hope this will help.


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