Categories
CMS Magento Mastering Development

how to solve 401 redirect on REST API on Custom tab between shipping and Payment option

I have created some steps between shipping and Payment form and add some field between then and applied ajax on that but i have facing an issue for not logged in user it will gave an error of 401 and redirect on login page on saving first field. Will anyone help me how to successfully […]

Categories
CMS Magento Mastering Development

How to pass data using chackboxes in HTML uiComponent

I’m trying to add/remove data based on a checkbox. I can’t figure out how go get the value to get through to the function. My console is logging a list of my observed variables. Any idea how to pass the data that I need using checkboxes? Thanks My html <div> <input type="checkbox" id="awning" value="Awning" checkedValue="awning" […]

Categories
CMS Magento Mastering Development

How to Show Static CMS block in Magento 2 html file?

I want to Show Static CMS block in Magento 2 html file. So, I created these files Model/ConfigProvider.php <?php namespace Reg\Checkout\Model; use Magento\Checkout\Model\ConfigProviderInterface; use Magento\Framework\View\LayoutInterface; class ConfigProvider implements ConfigProviderInterface { /** @var LayoutInterface */ protected $_layout; protected $cmsBlock; public function __construct(LayoutInterface $layout, $blockId) { $this->_layout = $layout; $this->cmsBlock = $this->constructBlock($blockId); } public function constructBlock($blockId){ $block […]

Categories
CMS Magento Mastering Development

How to add discount coupon code on Custom tab in Magento 2?

I have created Custom Tabs in Magento 2 Between Shipping and Review and Payment. I want to remove Discount Coupon Code from Review and Payment to my Custom Tabs.How will i do it ? I have already removed discount coupan from Review and Payment Screen. Now, i want to add it in my Custom tab […]

Categories
CMS Magento Mastering Development

How to add discount coupon code on Custom tab in Magento 2?

I have created Custom Tabs in Magento 2 Between Shipping and Review and Payment. I want to remove Discount Coupon Code from Review and Payment to my Custom Tabs.How will i do it ? I have already removed discount coupan from Review and Payment Screen. Now, i want to add it in my Custom tab […]

Categories
CMS Magento Mastering Development

Magento 2 – Create repeatable field in checkout and saving the data to model

I am trying to create fields for each product in the cart. Some extra data needs to be filled in per product and the wish was for it to be found in the address section of the checkout form. I can create the fields correctly with the following view elements: define( [ ‘jquery’, ‘ko’, ‘uiComponent’, […]

Categories
CMS Magento Mastering Development

Magento 2 use custom data in ui component

I’m adding a custom UiComponent to checkout using Layout Processor: LayoutProcessor.php $this->jsLayout[‘components’][‘checkout’][‘children’][‘sidebar’][‘children’][‘summary’][‘children’] = ‘my-item’ => [ ‘displayArea’ => ‘my-item’, ‘component’ => ‘Vendor_Module/js/view/my-item’, ‘config’ => [ ‘template’ => ‘Vendor_Module/my-item’ ], ‘custom-data’ => ‘some custom data’ ]; Vendor_Module/js/view/my-item.js define( [ ‘jquery’, ‘ko’, ‘uiComponent’, ‘Magento_Checkout/js/model/totals’ ], function ($, ko, Component, totals) { ‘use strict’; return Component.extend({ items: ko.observable([]), […]

Categories
CMS Magento Mastering Development

Add a from in newly added step in checkout page magento 2

we follow this step to add a new form in checkout page. we need to add some form fields in that newly added steps. I have updated the checkout_index_index.xml file based on shipping-step. But its not working. Suggest me, which way i need follow. what I did: Vendor/Module/view/frontend/web/js/view/schedule-on-appointment-view.js define( [ ‘ko’, ‘uiComponent’, ‘underscore’, ‘Magento_Checkout/js/model/step-navigator’ ], […]

Categories
CMS Magento Mastering Development

Magento2: Issue with additional dropdown option in checkout

I used module delivery date from: https://github.com/sohelrana09/magento2-module-delivery-date/tree/master/SR/DeliveryDate I want to this module add custom dropdown option, should be like this: Here I edit file: Modify following class app/code/SR/DeliveryDate/Model/DeliveryDateConfigProvider.php namespace SR\DeliveryDate\Model; use Magento\Checkout\Model\ConfigProviderInterface; use Magento\Store\Model\ScopeInterface; class DeliveryDateConfigProvider implements ConfigProviderInterface { const XPATH_FORMAT = ‘sr_deliverydate/general/format’; const XPATH_DISABLED = ‘sr_deliverydate/general/disabled’; const XPATH_HOURMIN = ‘sr_deliverydate/general/hourMin’; const XPATH_HOURMAX = ‘sr_deliverydate/general/hourMax’; […]

Categories
CMS Magento Mastering Development

Magento 2 – advanced JS bundling mixins

I followed this answer to enable JS bundling with success – Magento 2 Advanced Js Bundling. However when I go to checkout, I get JS errors in console. When in developer mode everything is ok. Even in production mode without the bundling. The error is Uncaught TypeError: quote.getDeliveryBranchId is not a function I have a […]