Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

New answers tagged

1

Solution worked for me: <?php namespace Vendor\Model\Plugin\Model\Quote\Address\RateResult; class MethodPlugin { public function afterSetPrice($subject) { $new_price = "2.00"; $subject->setData("price", $new_price); return $subject; } }


0

You can modify your mini_cart_product_thumbnail image dimensions. YOUR_MAGENTO_THEME_DIRECTORY > etc > view.xml <media> <images module="Magento_Catalog"> <image id="mini_cart_product_thumbnail" type="thumbnail"> <width>75</width> <height>75</height> </image&...


0

To set shipping rates on checkout just add custom price in beforeSetPrice function. It will update the price. Note: if you have multiple shipping methods then it will update price for all shipping method. public function beforeSetPrice($subject, $price) { $this->_logger->debug("Current price is " . $price); $price = 3.33; ...


0

<?php elseif (isset($params['error_msg'])): ?> var require = window.top.require; require( [ 'jquery', 'Magento_Ui/js/model/messageList', 'mage/translate', 'Magento_Checkout/js/model/full-screen-loader', 'Magento_Ui/js/modal/alert' ], ...


0

This is the perfect solution to your need. Bit lengthy process but this is how the implementation is processed. Check out this link https://magento.stackexchange.com/a/187848/45214 .


0

Reference Link :- creating-custom-fields-using-magento-2-ui-components enter link description here magento2-checkout-custom-form


1

I happen to use the same theme you're using, or at least the module. In the file app\code\MGS\Mpanel\etc\di.xml you can see that the wishlist class is overridden <preference for="Magento\Wishlist\CustomerData\Wishlist" type="MGS\Mpanel\CustomerData\Wishlist" /> but in the constructor the parent constructor is not called what you have to do is to make ...


0

Yes you can override input field using $jsLayout array in you custom module. Hope you know how to create Layoutprocessor plugin. In you Layoutprocessor override text field file 'elementTmpl' to your custom file from custom module like below code $jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children']['...


0

you can use hideLoader method in your js component hideLoader: function() { //your code here },


0

I could resolve the issue in this way. I added $index property of $parentContext. However in this case the parent is 3 levels up. <input type="checkbox" class="required-entry" data-bind="attr: { 'id': $parentContext.$parentContext.$parentContext.$index() + '_' + $parent.getCheckboxId($...


0

Affected file for above described problem is {Magento-Root-Folder}/app/design/frontend/{YourTheme}/default/template/checkout/onepage/payment/methods.phtml note that if folder 'checkout' is not available in your template folder, make sure to copy it from {Magento-Root-Folder}/app/design/frontend/base/default/template/checkout to your template folder; ...


0

Your custom theme is extending luma theme. By default in luma theme, Continue Shopping and Clear Shopping Cart are available but hide using CSS. You need to inspect in browser search for class action continue and remove display: none; Hope above will help!


0

I had the same issue and I was struggling with this for days. Try adding the etc/fieldset.xml: <field name="address_email"> <aspect name="to_customer_address" /> <aspect name="to_order_address" /> </field> </fieldset> And a plugin for Customer Address: <plugin ...


1

Look very carefully to your var/log/system.log. In my case, I was missing some important information there and the problem was Redis. The session was being locked by some other process and didn't allow Magento to update the cart/quote session there. I just noticed that when added a breakpoint to \Magento\Checkout\Controller\Onepage\Success::execute and ...


1

The solution was to force a re-install of the 2.3.1 upgrade. Muhammad's answer was on the right track, but I had to take some extra steps because his instructions are only for people who had problems during the upgrade process - which I didn't. I discovered these problems a while after I had upgraded to 2.3.1. Anyway, first of all I reinstalled the Magento ...


0

One of the possible solution recommended to resolve these errors, perform the following tasks: Log in to your Magento server as, or switch to, the Magento file system owner. If you don’t have access to the Magento server file system, connect to it using an FTP application. Remove the following files so you can upgrade again: <magento_root>/var/....


0

I assume that you already know what CDATA is. The code inside called template literal, Magento Core team want to use the ES6 template syntax so they come up with their own code ES6 syntax: `${provider}` -> Magento syntax: ${$.provider} You can read more here in the devdocs: https://devdocs.magento.com/guides/v2.1/ui_comp_guide/concepts/...


1

refer to this for some more info: https://stackoverflow.com/questions/47022537/magento-2-checkout-missing-postcode check the references to eav_attribute table in the tables mentioned in the answer above and add the indexes that you are missing. for me this was also caused by migration, but not fixable with a backup.


0

I wasn't able to find the casue of this, so I fixed it by forcing modal to work using javascript: require(['jquery', 'Magento_Ui/js/modal/modal'], function($){ $(document).on('click', '#checkout_order_sum_mobile', function(e){ $(".opc-sidebar.opc-summary-wrapper").toggleClass("_show"); }); });


1

In the constructor, you need to make sure you call the parent::__construct method with the $context. public function __construct( \Magento\Framework\App\Action\Context $context, \Magento\Checkout\Model\Session $checkoutSession ) { $this->_checkoutSession = $checkoutSession; parent::__construct($context); }


-1

a litte late, but if anyone has the same problem, you also need to add an afterGetFinalPrice() method. This is what get called here. You can add that to your Product Plugin.


0

You can do it via css: add the below css in your Magento_Checkout module less file: .opc-block-summary { .block.items-in-cart { .minicart-items { display: block !important; } >.title { &:after { content: '\e621'; } } &.active { .minicart-items { display: none !important; ...


0

You can Use js mixin :- Vendor/Module/view/requirejs-config.js var config = { 'config': { 'mixins': { 'Magento_Checkout/js/view/summary/cart-items': { 'Vendor_Module/js/view/summary/cart-items-mixin': true } } } }; ...


0

You can do it by setting openedState to active in your cart-items.html template. So, override cart-items.html template from vendor/magento/module-checkout/view/frontend/web/template/summary/cart-items.html To your custom module, with the same path level: app/code/Vendor/Module/view/frontend/web/template/summary/cart-items.html With this code:...


0

https://alanstorm.com/refresh-shipping-rates-for-the-magento-2-checkout/ requirejs([ 'Magento_Checkout/js/model/quote', 'Magento_Checkout/js/model/shipping-rate-registry' ], function(quote, rateRegistry){ var address = quote.shippingAddress();// use here uid or region address.trigger_reload = new Date().getTime(); rateRegistry.set(...


2

Below code worked for me $this->_redirect('checkout', ['_fragment' => 'payment']);


0

Something conflict with your superfish js. Uncaught TypeError: jQuery(...).superfish is not a function at HTMLDocument. (superfish.js:123) at fire (jquery-1.9.1.js:1037) at Object.fireWith [as resolveWith] (jquery-1.9.1.js:1148) at Function.ready (jquery-1.9.1.js:433) at HTMLDocument.completed (jquery-1.9.1.js:103) Here is possible ...


0

I know this answer is late, but had the same question / problem using observer sales_quote_payment_import_data_before... the code uses the old payment method. To get the new chosen method, you can use: Mage::app()->getFrontController()->getRequest()->getParams() You'll get: [payment] => Array ( [method] => method_code_chosen ...


1

You can use next plugin for your purpose: <type name="Magento\Shipping\Model\Rate\Result"> <plugin name="your_plugin_name_update_rate_result" type="Vendor\Module\Plugin\ShippingRateResultAppend" sortOrder="10" disabled="false" /> </type> code will be like this one, but with own validation: /** * ...


2

I am able to resolve this error like below. Added id for each tr that is, each shipping rates. <tr class="row" data-bind="attr: { 'id': 'shippingval_' + method.method_code} ,click: $parent.selectShippingMethod" > Then using css, hidden the ...


1

There is property name "isPasswordVisible" in the js file MAGENTO-ROOT/vendor/magento/module-checkout/view/frontend/web/js/view/form/element/email.js. You may try to override email.js class and set isPasswordVisible = true as describe below to always show the password field in the checkout page. I assume you are using a custom theme name "Company_mytheme" ...


0

Create a custom module and create below files. etc/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\Shipping\Model\Rate\Result"> <plugin name="restrict_shippingmethod" type="[...


0

This is worked for me. But no error message shows. It just hide the "Go to Checkout" button. So customers cannot identify, what is the issue. Any idea to showing the error message?


0

This solution working in magento 2.3 Set mode to developer if it's not already. Override checkout_index_index.xml to your theme This guide will help, the part where he edit /app/design/frontend/Vendor/themeName/Magento_Checkout/layout/checkout_index_index.xml Here add this code for phone field Between Start: Important part <item name="telephone" xsi:...


1

For customization on the Update cart button.Please follow this link it is worked great: How to override the checkout_cart_configure.xml template file into custom module Thank you.


0

It is still available. Here is Magento's user guide about this - https://docs.magento.com/m2/ce/user_guide/sales/checkout-guest.html. You should be able to go to Stores -> Settings -> Configuration -> Sales -> Checkout -> Checkout Options and find the setting there. This is the opposite situation as yours, but still provides instructions on how to find the ...


0

app/code/SR/MagentoCommunity/view/frontend/requirejs-config.js var config = { config: { mixins: { 'Magento_Checkout/js/action/select-shipping-method': { 'SR_MagentoCommunity/js/mixin/select-shipping-method-mixin': true } } } }; app/code/SR/MagentoCommunity/view/frontend/web/js/mixin/select-...


0

finally i found the solution for this. Just added this KO JS to validate the form. Hope this will help to others. define([ 'jquery', 'ko', 'uiComponent', 'underscore', 'Magento_Checkout/js/model/step-navigator', 'Magento_Customer/js/customer-data', 'Magento_Customer/js/model/customer', 'mage/translate', 'Magento_Checkout/js/bindings/transitions' ], ...


0

like I want to remove - Alaska, Hawaii, American Samoa, Guam, Marshall Islands. This will help you. To restrict some US States in the checkout. For this, They have created a US State restriction selection drop-down in the admin panel system configuration. In the example And Then You can select the US States from the Allowed US States in Checkout ...


0

I was solved that issue using below code. jQuery( "#radio-button-id" ).change(function() { var id = this.id; require([ 'jquery', 'Magento_Checkout/js/action/get-totals' ], function ($, getTotalsAction) { "use strict"; $.ajax({ method: "post", url: "<?php echo $baseUrl; ?>action/",...


0

If you want any custom block before/after payment method list, then you can use those areas (beforeMethods/afterMethods). Example: How you try following way to add block before payment method using beforeMethods: app/code/SR/MagentoCommunity/view/frontend/layout/checkout_index_index.xml <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/...


1

Below step need to follow: Step 1: create require config js files under the Vendor/ModuleName/view/frontend/requirejs-config.js var config = { config: { mixins: { 'Magento_Checkout/js/view/summary/abstract-total': { 'Vendor_Modulename/js/view/summary/abstract-total-mixin': true }, 'Magento_Checkout/js/view/...


1

If you want to load testchild component before testchildtwo then you should configure it in xml config node. Inside config node we have to define node . Deps node is array and can contains more that one component. In our case we defined only one component checkout.testchild. <item name="deps" xsi:type="array"> <item name="0" xsi:type="string"&...


0

Which function checks shipping address and billing address are the same ? and where it copies the billing address to the shipping address ? Magento's default function for check same address /vendor/magento/module-quote/Model/Quote/Address.php public function getSameAsBilling() { return $this->getData(self::SAME_AS_BILLING); } ...


Top 50 recent answers are included