Certain areas of your Magento 2 store can be excluded from the Hyvä theme, such as the checkout. In excluded areas, Hyvä is not active, so Tailwind CSS and Alpine.js are not loaded. Instead, traditional Magento 2 RequireJS components from…
Fixing checkout undefinedrest (Magento 2)
If your Magento 2 checkout stops working properly after an update, for example, inspect network requests in Chrome Developer Tools. If you see URLs containing undefinedrest , this article explains a possible fix. Examples of undefinedrest URLs in Magento 2:…
Checkout agreements not working / can not be accepted when using PayPal (Magento 2)
You created several checkout agreements in your Magento 2 store, but as soon as you choose PayPal as payment method in the checkout, it just won’t accept those agreements? Instead, a validation error is returned whether or not the agreement…
Changing the field order of the shipping address in checkout (Magento 2)
You can adjust the order of checkout fields relatively easily with a layout update. Open the file checkout_index_index.xml in your theme, or create it if it does not exist. Then insert the following code:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
<referenceBlock name="checkout.root"> <arguments> <argument name="jsLayout" xsi:type="array"> <item name="components" xsi:type="array"> <item name="checkout" xsi:type="array"> <item name="children" xsi:type="array"> <item name="steps" xsi:type="array"> <item name="children" xsi:type="array"> <item name="shipping-step" xsi:type="array"> <item name="children" xsi:type="array"> <item name="shippingAddress" xsi:type="array"> <item name="children" xsi:type="array"> <!-- The name of the form the field belongs to --> <item name="shipping-address-fieldset" xsi:type="array"> <item name="children" xsi:type="array"> <item name="city" xsi:type="array"> <item name="sortOrder" xsi:type="string">6</item> </item> <item name="region_id" xsi:type="array"> <item name="sortOrder" xsi:type="string">3</item> </item> <item name="region_id" xsi:type="array"> <item name="sortOrder" xsi:type="string">9</item> </item> <item name="postcode" xsi:type="array"> <item name="sortOrder" xsi:type="string">5</item> </item> <item name="country_id" xsi:type="array"> <item name="sortOrder" xsi:type="string">7</item> </item> <item name="lastname" xsi:type="array"> <item name="sortOrder" xsi:type="string">2</item> </item> <item name="firstname" xsi:type="array"> <item name="sortOrder" xsi:type="string">1</item> </item> <item name="company" xsi:type="array"> <item name="sortOrder" xsi:type="string">4</item> </item> <item name="telephone" xsi:type="array"> <item name="sortOrder" xsi:type="string">8</item> </item> </item> </item> </item> </item> </item> </item> </item> </item> </item> </item> </item> </argument> </arguments> </referenceBlock> |
As you can see, you…
Testing the success page (Magento 2)
To test changes to the Magento 2 order success page, open vendor/magento/module-checkout/Controller/Onepage/Success.php and comment out the line
|
1 2 |
$session->clearQuote(); // vorher //$session->clearQuote(); // auskommentiert |
. You can then reload the page as often as you like to test your changes. Remember to remove the comment once…
Checkout progress no longer works (Magento 1)
If the checkout progress indicator no longer appears in Magento, the problem is almost certainly related to your theme. Open the theme’s checkout.xml file and add the following code:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
<checkout_onepage_progress_billing> <!-- Mage_Checkout --> <remove name="right"/> <remove name="left"/> <block type="checkout/onepage_progress" name="root" output="toHtml" template="checkout/onepage/progress/billing.phtml"> <action method="setInfoTemplate"><method></method><template></template></action> </block> </checkout_onepage_progress_billing> <checkout_onepage_progress_shipping> <!-- Mage_Checkout --> <remove name="right"/> <remove name="left"/> <block type="checkout/onepage_progress" name="root" output="toHtml" template="checkout/onepage/progress/shipping.phtml"> <action method="setInfoTemplate"><method></method><template></template></action> </block> </checkout_onepage_progress_shipping> <checkout_onepage_progress_shipping_method> <!-- Mage_Checkout --> <remove name="right"/> <remove name="left"/> <block type="checkout/onepage_progress" name="root" output="toHtml" template="checkout/onepage/progress/shipping_method.phtml"> <action method="setInfoTemplate"><method></method><template></template></action> </block> </checkout_onepage_progress_shipping_method> <checkout_onepage_progress_payment> <!-- Mage_Checkout --> <remove name="right"/> <remove name="left"/> <block type="checkout/onepage_progress" name="root" output="toHtml" template="checkout/onepage/progress/payment.phtml"> <block type="checkout/onepage_payment_info" name="payment_info"> <action method="setInfoTemplate"><method></method><template></template></action> </block> <action method="setInfoTemplate"><method></method><template></template></action> </block> </checkout_onepage_progress_payment> |