終於實現它...
轉到文件路徑 - \供應商\ Magento的\主題前端,亮度\ Magento_Checkout \佈局\ checkout_index_index.xml
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<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="steps" xsi:type="array">
<item name="children" xsi:type="array">
<item name="shipping-step" xsi:type="array">
<item name="children" xsi:type="array">
<item name="shippingAddress" xsi:type="array">
<item name="children" xsi:type="array">
<item name="before-shipping-method-form" xsi:type="array">
<item name="children" xsi:type="array">
<item name="shipping_policy" xsi:type="array">
<item name="component" xsi:type="string">Magento_Shipping/js/view/checkout/shipping/shipping-policy</item>
<item name="component" xsi:type="string">Magento_Checkout/js/view/cart/shipping-rates</item>
<item name="component" xsi:type="string">Magento_Checkout/js/view/cart/shipping-estimation</item>
</item>
</item>
</item>
</item>
</item>
</item>
</item>
</item>
</item>
<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="block-totals" xsi:type="array">
<item name="component" xsi:type="string">Magento_Checkout/js/view/cart/totals</item>
<item name="displayArea" xsi:type="string">totals</item>
<item name="config" xsi:type="array">
<item name="template" xsi:type="string">Magento_Checkout/cart/totals</item>
</item>
<item name="children" xsi:type="array">
<!-- sort order for this totals is configured on admin panel-->
<!-- Stores->Configuration->SALES->Sales->General->Checkout Totals Sort Order -->
<item name="subtotal" xsi:type="array">
<item name="component" xsi:type="string">Magento_Checkout/js/view/summary/subtotal</item>
<item name="config" xsi:type="array">
<item name="title" xsi:type="string" translate="true">Subtotal</item>
<item name="template" xsi:type="string">Magento_Checkout/cart/totals/subtotal</item>
</item>
</item>
<item name="shipping" xsi:type="array">
<item name="component" xsi:type="string">Magento_Checkout/js/view/cart/totals/shipping</item>
<item name="config" xsi:type="array">
<item name="title" xsi:type="string" translate="true">Shipping</item>
<item name="template" xsi:type="string">Magento_Checkout/cart/totals/shipping</item>
</item>
</item>
<item name="grand-total" xsi:type="array">
<item name="component" xsi:type="string">Magento_Checkout/js/view/summary/grand-total</item>
<item name="config" xsi:type="array">
<item name="title" xsi:type="string" translate="true">Order Total</item>
<item name="template" xsi:type="string">Magento_Checkout/cart/totals/grand-total</item>
</item>
</item>
</item>
</item>
</item>
</item>
</item>
</item>
</item>
</item>
</item>
</argument>
</arguments>
</referenceBlock>
</body>
快樂編碼! :)
在我的自定義主題中,我已將此內容添加到此文件「Magento_Checkout \ layout \ checkout_index_index.xml」,但它不起作用。 – Sarfaraj
我使用的是自定義主題,並編輯了- 塊,並開始顯示總計。謝謝 –
歡迎你,很高興收到你的來信@AthulVijayan –