Какой файл для изменения для этого для удаления сравнить блок?

magento.stackexchange https://magento.stackexchange.com//questions/44355

  •  12-12-2019
  •  | 
  •  

Вопрос

При переходе на www.domain.com/customer/address/edit/id/1 /

Где можно редактировать свой адрес

По какой-то причине есть блок сравнить в левой боковой панели

Какой файл мне нужно редактировать, чтобы удалить это?

Спасибо

carlo

в моей макете.xml (приложение / дизайн / foreend / mythemepackage / default / 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>
.

в Magento 2 Добавьте ниже строки в файле default.xml 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"/>
.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с magento.stackexchange
scroll top