비교 블록을 제거하려면 변경할 파일이 무엇입니까?
-
12-12-2019 - |
문제
www.domain.com/customer/address/edit/id/1 / 로 간다.
여기서 주소를 편집 할 수 있습니다
든 왼쪽 사이드 바에서는 블록이 비교됩니다
이 파일을 제거하려면 편집해야합니까?
감사합니다
carlo
내 layout.xml (app / design / frontend / mythempackage / defail / layout / local.xml)
나는 이것을 가지고있다 :
<!-- CUSTOMER ACCOUNT %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<customer_account>
<reference name="left">
<!-- Remove cart from the left column -->
<action method="unsetChild"><name>cart_sidebar</name></action>
<!-- Remove Compare block, it is already inserted in DEFAULT section -->
<action method="unsetChild"><name>catalog.compare.sidebar</name></action>
</reference>
</customer_account>
.
기본 섹션은이 파일을 동일한 파일로 추측하는 것입니다.
<?xml version="1.0" encoding="UTF-8"?>
.
<!-- Left ====================================================================== -->
<reference name="left">
<remove name="left.newsletter"/> <!-- Moved newsletter to the footer -->
<action method="unsetChild"><name>left.permanent.callout</name></action>
<action method="unsetChild"><name>left.reports.product.viewed</name></action>
<block type="catalog/product_compare_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/>
<!-- <block type="reports/product_compared" name="right.reports.product.compared" template="reports/product_compared.phtml" />
<block type="reports/product_viewed" name="left.reports.product.viewed" template="reports/product_viewed.phtml" />
<block type="wishlist/customer_sidebar" name="wishlist_sidebar" as="wishlist" template="wishlist/sidebar.phtml"/>
<block type="poll/activePoll" name="right.poll">
<action method="setPollTemplate"><template>poll/active.phtml</template><type>poll</type></action>
<action method="setPollTemplate"><template>poll/result.phtml</template><type>results</type></action>
</block>
<block type="tag/popular" name="tags_popular" template="tag/popular.phtml"/>
<block type="paypal/logo" name="paypal.partner.right.logo" template="paypal/partner/logo.phtml"/> -->
<action method="unsetChild"><name>tags_popular</name></action>
<action method="unsetChild"><name>cart_sidebar</name></action>
<action method="unsetChild"><name>right.reports.product.compared</name></action>
<action method="unsetChild"><name>right.reports.product.viewed</name></action>
<action method="unsetChild"><name>wishlist</name></action>
<action method="unsetChild"><name>sale.reorder.sidebar</name></action>
<action method="unsetChild"><name>right.poll</name></action>
<action method="unsetChild"><name>paypal.partner.right.logo</name></action>
</reference>
. 해결책
자신의 모듈을 사용하지 않는 경우, 위치 app/design/frontend/[package]/[theme]/layout/local.xml
위치에 로컬 레이아웃 파일을 작성하고 기본적으로 추가 된 비교 블록을보고 가정하면 다음을 파일에 추가해야합니다.
<?xml version="1.0"?>
<layout version="0.1.0">
<customer_account>
<remove name="catalog.compare.sidebar" />
</customer_account>
</layout>
.
그러나 catalog.compare.sidebar
를 사용하는 경우 블록 이름 (<remove>
)을 다시 사용할 수 없음을 의미합니다.레이아웃 내에서 동일한 블록 이름을 다시 사용하려면 다음을 사용하십시오.
<?xml version="1.0"?>
<layout version="0.1.0">
<customer_account>
<reference name="left">
<action method="unsetChild">
<name>catalog.compare.sidebar</name>
</action>
</reference>
</customer_account>
</layout>
. 다른 팁
이 를 사용해보십시오
<customer_address_edit>
<reference name="left">
<remove name="catalog.compare.sidebar" />
</reference>
<customer_address_edit>
. 자홍색 2 테마의 default.xml 파일에 아래 줄을 추가
\ app \ design \ frontend \ default \ magento_theme \ layout \ default.xml
.<referenceBlock name="catalog.compare.sidebar" remove="true"/> <referenceBlock name="catalog.compare.link" remove="true"/>
제휴하지 않습니다 magento.stackexchange