यदि आप अपने कस्टम विशेषता को क्रम सारांश में जोड़ना चाहते हैं, तो आपको ओवरराइड करने की आवश्यकता है: (लेआउट) 1) checkout_cart_india.in:
<referenceBlock name="checkout.cart.totals">
<arguments>
<argument name="jsLayout" xsi:type="array">
<item name="components" xsi:type="array">
<item name="block-totals" xsi:type="array">
<item name="children" xsi:type="array">
<item name="processingfee" xsi:type="array">
<item name="component" xsi:type="string">Dedicated_Processingfee/js/view/checkout/cart/totals/processingfee</item>
<item name="sortOrder" xsi:type="string">20</item>
<item name="config" xsi:type="array">
<item name="template" xsi:type="string">Dedicated_Processingfee/checkout/cart/totals/processingfee</item>
<item name="title" xsi:type="string" translate="true">Processing Fee</item>
</item>
</item>
</item>
</item>
</item>
</argument>
</arguments>
</referenceBlock>
2) checkout_index_index:
<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="sidebar" xsi:type="array">
<item name="children" xsi:type="array">
<item name="summary" xsi:type="array">
<item name="children" xsi:type="array">
<item name="totals" xsi:type="array">
<item name="children" xsi:type="array">
<item name="processingfee" xsi:type="array">
<item name="component" xsi:type="string">Dedicated_Processingfee/js/view/checkout/cart/totals/processingfee</item>
<item name="sortOrder" xsi:type="string">20</item>
<item name="config" xsi:type="array">
<item name="template" xsi:type="string">Dedicated_Processingfee/checkout/cart/totals/processingfee</item>
<item name="title" xsi:type="string" translate="true">Processing Fee</item>
</item>
</item>
</item>
</item>
<item name="cart_items" xsi:type="array">
<item name="children" xsi:type="array">
<item name="details" xsi:type="array">
<item name="children" xsi:type="array">
<item name="subtotal" xsi:type="array">
<item name="component" xsi:type="string">Magento_Tax/js/view/checkout/summary/item/details/subtotal</item>
</item>
</item>
</item>
</item>
</item>
</item>
</item>
</item>
</item>
</item>
</item>
</item>
</argument>
</arguments>
</referenceBlock>
3) sales_order_view:
<referenceContainer name="order_totals">
<block class="Dedicated\Processingfee\Block\Sales\Order\ProcessingFee" name="processingfee"/>
</referenceContainer>
फिर अपने मॉड्यूल में इस तरह अपने कस्टम विशेषता मान प्राप्त करने के लिए कस्टम js जोड़ें: /view/frontend/web/js/view/checkout/cart/totals/processingfee.js पर:
define(
[
'Dedicated_Processingfee/js/view/checkout/summary/processingfee'
],
function (Component) {
'use strict';
return Component.extend({
/**
* @override
*/
isDisplayed: function () {
return true;
}
});
}
);
कुल बिलिंग राशि के साथ मूल्य की गणना करने के लिए एक और js जोड़ें: /view/frontend/web/js/view/checkout/summary/processingfee.js
define(
[
'Magento_Checkout/js/view/summary/abstract-total',
'Magento_Checkout/js/model/quote',
'Magento_Catalog/js/price-utils',
'Magento_Checkout/js/model/totals'
],
function (Component, quote, priceUtils, totals) {
"use strict";
return Component.extend({
defaults: {
isFullTaxSummaryDisplayed: window.checkoutConfig.isFullTaxSummaryDisplayed || false,
template: 'Dedicated_Processingfee/checkout/summary/processingfee'
},
totals: quote.getTotals(),
isTaxDisplayedInGrandTotal: window.checkoutConfig.includeTaxInGrandTotal || false,
isDisplayed: function() {
return this.isFullMode();
},
getValue: function() {
var price = 0;
if (this.totals()) {
price = totals.getSegment('processingfee').value;
}
return this.getFormattedPrice(price);
},
getBaseValue: function() {
var price = 0;
if (this.totals()) {
price = this.totals().base_fee;
}
return priceUtils.formatPrice(price, quote.getBasePriceFormat());
}
});
}
);
आप मूल्य के साथ विशेषता मिल जाएगा कि सेट धन्यवाद :)