हाँ यह Magento_Checkout / js / मॉडल / शिपिंग-सेव-प्रोसेसर / default.js में बदलकर संभव है
मैंने फ़ील्ड जोड़ा है confirm email
जो कि समान होना चाहिए email
और यह चेकआउट में आवश्यक फ़ील्ड है, आप आवश्यकता के अनुसार अनुकूलित कर सकते हैं।
app\code\Ketan\Checkout\view\frontend\requirejs-config.js
var config = {
"map": {
"*": {
"Magento_Checkout/js/model/shipping-save-processor/default" : "Ketan_Checkout/js/shipping-save-processor"
}
}
}
js का विस्तार करें file app\code\Ketan\Checkout\view\frontend\web\js\shipping-save-processor.js
/*
* *
* @author DCKAP Team
* @copyright Copyright (c) 2018 DCKAP (https://www.dckap.com)
* @package Dckap_CustomFields
*/
define(
[
'ko',
'Magento_Checkout/js/model/quote',
'Magento_Checkout/js/model/resource-url-manager',
'mage/storage',
'Magento_Checkout/js/model/payment-service',
'Magento_Checkout/js/model/payment/method-converter',
'Magento_Checkout/js/model/error-processor',
'Magento_Checkout/js/model/full-screen-loader',
'Magento_Checkout/js/action/select-billing-address',
'jquery'
],
function (
ko,
quote,
resourceUrlManager,
storage,
paymentService,
methodConverter,
errorProcessor,
fullScreenLoader,
selectBillingAddressAction,
$
) {
'use strict';
return {
saveShippingInformation: function () {
var payload;
var username = $("#customer-email").val();
var conformusername = $("#conformusername").val();
/*============ Customization Start =============*/
//if(quote.shippingMethod().method_code=='flaterate'){ // Check if flaterate is selected
if(conformusername != username){
$("#conformusername-error").show(); // show hidden message
$("#conformusername").focus(); // move cursor to the point
return false;
}
// }
/*============ Customization End =============*/
if (!quote.billingAddress()) {
selectBillingAddressAction(quote.shippingAddress());
}
payload = {
addressInformation: {
shipping_address: quote.shippingAddress(),
billing_address: quote.billingAddress(),
shipping_method_code: quote.shippingMethod().method_code,
shipping_carrier_code: quote.shippingMethod().carrier_code
}
};
fullScreenLoader.startLoader();
return storage.post(
resourceUrlManager.getUrlForSetShippingInformation(quote),
JSON.stringify(payload)
).done(
function (response) {
quote.setTotals(response.totals);
paymentService.setPaymentMethods(methodConverter(response.payment_methods));
fullScreenLoader.stopLoader();
}
).fail(
function (response) {
errorProcessor.process(response);
fullScreenLoader.stopLoader();
}
);
}
};
}
);