Categories
CMS Magento Mastering Development

Magento 2 Show Text with Shipping Option

I have created a shipping option and wanted text to show if that option was selected. Right now it displays when the shipping method is selected but below all of the shipping options. I want it to display with the method (not below all of them) if that method is selected. frontend/layout/checkout_index_index.xml <item name=”shipping-step” xsi:type=”array”> […]

Categories
CMS Magento Mastering Development

Magento 2 Show Text with Shipping Option

I have created a shipping option and wanted text to show if that option was selected. Right now it displays when the shipping method is selected but below all of the shipping options. I want it to display with the method (not below all of them) if that method is selected. frontend/layout/checkout_index_index.xml <item name=”shipping-step” xsi:type=”array”> […]

Categories
CMS Magento Mastering Development

Magento 2 Show Text with Shipping Option

I have created a shipping option and wanted text to show if that option was selected. Right now it displays below all of the shipping options and I want it to display with the method (not below all of them) if that method is selected. frontend/layout/checkout_index_index.xml <item name=”shipping-step” xsi:type=”array”> <item name=”children” xsi:type=”array”> <item name=”shippingAddress” xsi:type=”array”> […]

Categories
CMS Magento Mastering Development

Magento 2 Show Text with Shipping Option

I have created a shipping option and wanted text to show if that option was selected. Right now it displays below all of the shipping options and I want it to display with the method (not below all of them) if that method is selected. frontend/layout/checkout_index_index.xml <item name=”shipping-step” xsi:type=”array”> <item name=”children” xsi:type=”array”> <item name=”shippingAddress” xsi:type=”array”> […]

Categories
CMS Magento Mastering Development

Magento 2 Show Text with Shipping Option

I have created a shipping option and wanted text to show if that option was selected. Right now it displays below all of the shipping options and I want it to display with the method (not below all of them) if that method is selected. frontend/layout/checkout_index_index.xml <item name=”shipping-step” xsi:type=”array”> <item name=”children” xsi:type=”array”> <item name=”shippingAddress” xsi:type=”array”> […]

Categories
CMS Magento Mastering Development

Checkout custom shipping address field – set as required

I have created a custom module that adds a text field in shipping address. It’s workin ok but I’d like to make it required. How can I do that? I tried adding ‘required-entry’ => true at validation parameter, in file Plugin/Checkout/LayoutProcessor.php but it didn’t work. Here are the module files: Mymodules/FieldCheckout/registration.php <?php \Magento\Framework\Component\ComponentRegistrar::register( \Magento\Framework\Component\ComponentRegistrar::MODULE, ‘Mymodules_FieldCheckout’, […]

Categories
CMS Magento Mastering Development

Magento 2 : Calling a JS function from another JS file?

This Accessing a JS function from another JS file solution not mapped on my problem ,Please give me direction that how can i call getPureValue: function () from tax.js into some where in minicart.js tax.js /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ /** * @api */ […]

Categories
CMS Development Magento

Can get shipping extension_attributes in observer Magento 2

Hi I want to save a shipping address attribute by observer sales_model_service_quote_submit_before Bellow My observer: public function execute(Observer $observer) { $quote = $observer->getEvent()->getQuote(); $fields = $this->fieldsManagement->getByQuoteId($quote->getId()); $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $resource = $objectManager->get(‘Magento\Framework\App\ResourceConnection’); $customer_res = $objectManager->create(‘Magento\Customer\Api\AddressRepositoryInterface’); $customer = $customer_res->getById(101); $shippingAddress = $quote->getShippingAddress(); $shippingAddressExtensionAttributes = $shippingAddress->getExtensionAttributes(); if ($shippingAddressExtensionAttributes) { $customField = $shippingAddressExtensionAttributes->getDistance(); $customer->setCustomAttribute(‘distance’,$customField); }else{ $customer->setCustomAttribute(‘distance’,’not save’); } […]

Categories
CMS Development Magento

Get getTotalsAction result data

I tried updating the cart using JS and summary container is updating properly. But I want to update the quantity of the item. So basically I have added a custom button in checkout/cart page. When this button is click I add one product into the cart. Now this product is fix and the quantiity added […]

Categories
CMS Development Magento

Magento 2 : Firefox javascript not working

I am trying to create buttons to either add or remove 1 from the shopping cart. In my search I found some code online that works great for Chrome but appears to not work on any other browser. the Onclick function won’t get fired in Firefox. Underneath is the javascript. <script type=”text/javascript”> require([ ‘jquery’ ], […]