我在将标题迷你购物车集成到我的自定义主题时遇到了问题。以下是该问题的屏幕截图。任何帮助深表感谢。在此先感谢:)
下面是default.xml代码。
<referenceContainer name="header.container">
<container name="header-wrapper" label="Page Header" as="header-wrapper" htmlTag="div" htmlClass="top-header">
<!-- top links with cart -->
<container name="topcartoptions" label="Top Cart Options" htmlTag="div" htmlClass="top-cart-options text-right" before="-">
<block class="Magento\Cms\Block\Block" name="block-top-links">
<arguments>
<argument name="block_id" xsi:type="string">block-top-links</argument>
</arguments>
</block>
</container>
<!-- top menu -->
<container name="mainnavigation" label="Main Navigation" htmlTag="div" htmlClass="main-navigation" after="topcartoptions">
<container name="main-navigation-container" label="Main Navigation" htmlTag="div" htmlClass="container">
<container name="main-navigation-container-row" label="Main Navigation" htmlTag="div" htmlClass="row">
<container name="main-nav-row-bootstrap-class" htmlTag="div" htmlClass="col-lg-12 col-md-12 col-sm-12 col-xs-12 text-center">
<block class="Magento\Cms\Block\Block" name="block-main-nav">
<arguments>
<argument name="block_id" xsi:type="string">block-main-nav</argument>
</arguments>
</block>
</container>
</container>
</container>
</container>
<block class="Magento\Checkout\Block\Cart\Sidebar" name="minicart" as="minicart" after="logo" template="cart/minicart.phtml">
<arguments>
<argument name="jsLayout" xsi:type="array">
<item name="types" xsi:type="array"/>
<item name="components" xsi:type="array">
<item name="minicart_content" xsi:type="array">
<item name="component" xsi:type="string">Magento_Checkout/js/view/minicart</item>
<item name="config" xsi:type="array">
<item name="template" xsi:type="string">Magento_Checkout/minicart/content</item>
</item>
<item name="children" xsi:type="array">
<item name="subtotal.container" xsi:type="array">
<item name="component" xsi:type="string">uiComponent</item>
<item name="config" xsi:type="array">
<item name="displayArea" xsi:type="string">subtotalContainer</item>
</item>
<item name="children" xsi:type="array">
<item name="subtotal" xsi:type="array">
<item name="component" xsi:type="string">uiComponent</item>
<item name="config" xsi:type="array">
<item name="template" xsi:type="string">Magento_Checkout/minicart/subtotal</item>
</item>
</item>
</item>
</item>
<item name="extra_info" xsi:type="array">
<item name="component" xsi:type="string">uiComponent</item>
<item name="config" xsi:type="array">
<item name="displayArea" xsi:type="string">extraInfo</item>
</item>
</item>
<item name="promotion" xsi:type="array">
<item name="component" xsi:type="string">uiComponent</item>
<item name="config" xsi:type="array">
<item name="displayArea" xsi:type="string">promotion</item>
</item>
</item>
</item>
</item>
</item>
</argument>
</arguments>
<container name="minicart.addons" label="Mini-cart promotion block"/>
</block>
</container>
</referenceContainer>