Magento showing top menu, search box and cart twice - magento

Magento is showing the top (categories) menu, search box and cart twice.
Click Here is my site link This page shows menu search box and cart twice.
It seems to me that the header.phtml is being executed twice
here is the header xml
i took this /app/design/frontend/default/buyshop/layout/ layout.xml
topLinks
<block type="buyshopconfig/navigation" name="buyshop.collapsedmenu" as="mobileMenu"
template="page/html/mobilemenu.phtml"/>
<block type="buyshopconfig/navigation" name="buyshop.advmenu.amazing" as="advMenuamazing"
template="page/html/topmenu_amazing.phtml"/>
<reference name="top.menu">
<action method="unsetChild"><name>catalog.topnav</name></action>
<block type="buyshopconfig/navigation" name="catalog.topnav.menu" template="page/html/topmenu.phtml"/>
</reference>
<block type="directory/currency" name="currency" template="page/switch/currency.phtml"/>
<action method="insert">
<block_name_to_insert>top.links</block_name_to_insert>
<sort_relative_to_other_childname/>
<sort_before_or_after/>
<alias>topLinks</alias>
</action>
</reference>
<!--HEADER EOF-->
<reference name="left">
<action method="unsetChild">
<name>topLinks</name>
</action>
<block type="buyshopconfig/navigation" name="leftmenu" as="leftmenu" template="page/html/leftmenu.phtml" before="-"/>
</reference>
<reference name="top.links">
<block type="buyshopconfig/comparelink" name="compare_link"/>
<action method="addLinkBlock">
<blockName>compare_link</blockName>
</action>
</reference>
<!--FOOTER-->
<reference name="footer">
<block type="newsletter/subscribe" name="footer.newsletter" as="footer_newsletter" template="newsletter/subscribe.phtml"/>
</reference>
<!--FOOTER EOF-->
<remove name="catalog.leftnav" />
</default>
<cms_index_index>
<reference name="root">
how i can solve this ?? please help me thanks

.visible-desktop {
display: none !important;
}
it will work for you
try this i just tested this in firebug for you :)

I found that this problem caused by this div - . It contains this "second menu". Look through your project with this combination id="spy". You fill find phtml or php file and than module for each this belongs. If you did not find it go to Admin->System->CMS and try to find this page or static block.
Best regards!

Hi i have worked on the same theme.
Just try changing the bootstrap-responsive.css file line number 53 to this:
.visible-desktop {display: none !important}

Related

Magento: Add product sorting features to left column

Is the default left column product/category feature a widget or block... the task I'm trying to perform is adding the Sorting Features to the left column of a custom page. I checked in my theme catalog.xml but I see no reference to that column.
the custom page was built without that feature added. im trying to add it back
Look for catalogsearch.leftnav in catalogsearch.xml inside the default theme.
You should copy that layout file to your custom theme and edit it in there.
edit:
Sorry, remembered wrong.
It's been configured in the catalog.xml in default template.
If you lost the files, download your current version and look up the configuration in there.
This should be the configuration in catalog.xml that you're looking for:
<catalog_category_layered translate="label">
<label>Catalog Category (Anchor)</label>
<reference name="left">
<block type="catalog/layer_view" name="catalog.leftnav" after="currency" template="catalog/layer/view.phtml"/>
</reference>
<reference name="content">
<block type="catalog/category_view" name="category.products" template="catalog/category/view.phtml">
<block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml">
<!-- <action method="addReviewSummaryTemplate"><type>default</type><template>review/helper/su.phtml</template></action> -->
<block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
<block type="page/html_pager" name="product_list_toolbar_pager"/>
<!-- The following code shows how to set your own pager increments -->
<!--
<action method="setDefaultListPerPage"><limit>4</limit></action>
<action method="setDefaultGridPerPage"><limit>3</limit></action>
<action method="addPagerLimit"><mode>list</mode><limit>2</limit></action>
<action method="addPagerLimit"><mode>list</mode><limit>4</limit></action>
<action method="addPagerLimit"><mode>list</mode><limit>6</limit></action>
<action method="addPagerLimit"><mode>list</mode><limit>8</limit></action>
<action method="addPagerLimit" translate="label"><mode>list</mode><limit>all</limit><label>All</label></action>
<action method="addPagerLimit"><mode>grid</mode><limit>3</limit></action>
<action method="addPagerLimit"><mode>grid</mode><limit>6</limit></action>
<action method="addPagerLimit"><mode>grid</mode><limit>9</limit></action>
<action method="addPagerLimit" translate="label"><mode>grid</mode><limit>all</limit><label>All</label></action>
-->
</block>
<action method="addColumnCountLayoutDepend"><layout>empty</layout><count>6</count></action>
<action method="addColumnCountLayoutDepend"><layout>one_column</layout><count>5</count></action>
<action method="addColumnCountLayoutDepend"><layout>two_columns_left</layout><count>4</count></action>
<action method="addColumnCountLayoutDepend"><layout>two_columns_right</layout><count>4</count></action>
<action method="addColumnCountLayoutDepend"><layout>three_columns</layout><count>3</count></action>
<action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
</block>
</block>
</reference>
</catalog_category_layered>

Magento 1.7.0.2 : Custom layout update adding CSS

I have magento 1.7.0.2 And a Category which iam unable to add a CSS in the Custom Layout update.
<reference name="head">
<action method="addCSS">
<type>css/ecoffice.css</type>
<stylesheet>media="all"</stylesheet>
</action>
<action method="addCss">
<stylesheet>css/ecoffice.css</stylesheet>
</action>
<action method="addItem"><type>skin_css</type><name>css/ecoffice.css</name></action>
</reference>
This is what i am using and nether works.
How can i add custom CSS to a category that hold s a static page with a widget inside?
I want this to only 1 page, not all.
If want ,i add
<catalog_category_layered>
<reference name="head">
<action method="addItem"><type>skin_css</type><name>css/ecoffice.css</name></action>
<action method="addCss"><stylesheet>css/ecoffice.css</stylesheet></action>
</reference>
</catalog_category_layered>
<catalog_category_default>
<reference name="head">
<action method="addItem"><type>skin_css</type><name>css/ecoffice.css</name></action>
<action method="addCss"><stylesheet>css/ecoffice.css</stylesheet></action>
</reference>
</catalog_category_default>
add this code in the local.xml file of your theme.
<catalog_category_default>
<reference name="head">
<action method="addCss">
<stylesheet>css/ecoffice.css</stylesheet>
</action>
</reference>
<catalog_category_default>

Magento delete product compare

I use magento and I have my own template but on my product detail page on the left side I have compare products. How can I delete this block?
Just create local.xml file under your theme/layout/local.xml and place below code.
<layout version="0.1.0">
<default>
<!-- remove compare products -->
<remove name="catalog.compare.sidebar" />
</default>
</layout>
This block is added in layout files. You can remove this block in original files or in your extension layout.
By default this block is added in files
/app/design/frontend/base/default/layout/catalog.xml
/app/design/frontend/base/default/layout/customer.xml
1) Copy this files to your theme folder and remove strings
<block type="catalog/product_compare_sidebar" before="cart_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/>
2) In your layout file add lines
<default>
<reference name="right">
<action method="unsetChild"><name>catalog.compare.sidebar</name></action>
</reference>
<reference name="left">
<action method="unsetChild"><name>catalog.compare.sidebar</name></action>
</reference>
</default>
<customer_account>
<reference name="left">
<action method="unsetChild"><name>catalog.compare.sidebar</name></action>
</reference>
<reference name="right">
<action method="unsetChild"><name>catalog.compare.sidebar</name></action>
</reference>
</customer_account>
To completely disable compare products functionality you can use this free extension.
Just remove the file /app/design/frontend/base/default/template/catalog/product/compare/sidebar.html or rename it.
Just remove this block from layout/catalog.xml and compare products section will be gone :
<reference name="left">
<block type="catalog/product_compare_sidebar" after="cart_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/>
</reference>

Add block from local.xml in Magento

I need to add a custom block on a page. Doesn't really matter where. For this example, I want it on customer/account/
So, looking on customer.xml I see this path:
<customer_account_index translate="label">
[code]
<reference name="my.account.wrapper">
[code]
</reference name="my.account.wrapper">
</customer_account_index>
Following this example here is my code in local.xml
<customer_account_index>
<reference name="my.account.wrapper">
<block type="core/template"
name="customer_groupsprogressbar"
template="customer/groupsprogressbar.phtml" />
</reference>
</customer_account_index>
Something is wrong, because it doesn't appear. If I add that block in customer.xml instead all works fine.
Any clues on what I'm doing wrong here?
Try
<customer_account_index>
<reference name="my.account.wrapper">
<block
type="core/text_list"
name="customer_groupsprogressbar"
template="customer/groupsprogressbar.phtml" />
</reference>
</customer_account_index>
Or
<customer_account_index>
<reference name="my.account.wrapper">
<block
type="core/template"
name="customer_groupsprogressbar"
template="customer/groupsprogressbar.phtml" output="toHtml" />
</reference>
</customer_account_index>
OR
in my.account.wrapper template:
<?php echo $this->getChildHtml('customer_groupsprogressbar'); ?>

Removing links from top menu using local.xml

Does anyone know how I can remove links from the top menu using local.xml.
In the default checkout.xml there is:
<reference name="top.links">
<block type="checkout/links" name="checkout_cart_link">
<action method="addCartLink"></action>
<action method="addCheckoutLink"></action>
</block>
</reference>
And I would like to remove the addCartLink from the top menu. One way would be just edit the checkout.xml file, but it think it would be a much better solution just to add the remove to my local.xml file, but I can't seem to get the right name to remove. If I do a
<layout>
<default>
<remove name="top.links" />
</default>
</layout>
That does remove the entire menu, but how do I remove just a single item from the menu using locale.xml?
I am using Magento 1.6
You can do this in local.xml:
<default>
<reference name="top.links">
<action method="removeLinkByUrl">
<url helper="checkout/url/getCartUrl" />
</action>
</reference>
</default>
It was also my question How can i get the full path in local.xml file
<default>
<reference name="top.links">
<block type="wishlist/links" name="wishlist_link"/>
<action method="removeLinkBlock"><blockName>wishlist_link</blockName></action>
</reference>
</default>
Add this part to your local.xml. Writing this under default will remove it from every page. So adjust it accordingly. I hope this will help you.
It should be:
<layout>
<default>
<reference name="top.links">
<reference name="checkout_cart_link">
<remove name="top-link-cart" />
</reference>
</reference>
</default>
</layout>
But you can always copy the checkout.xml in your local theme and edit it.
<default>
<reference name="top.links">
<remove name="wishlist_link"/>
</reference>
</default>
Add this part to your local.xml. That works for me. Just use "remove". That's it.
You can remove a link via layout update either
by its name | calling removeLinkBlock($blockName)
by its url | calling removeLinkByUrl($url)
overwriting the file were it was added
The functions live in Mage_Page_Block_Template_Links
Option 1
The removeLinkByUrl() function needs an url as parameter which will usually provided by a helper function in the respective extension. Just grab it there and you can use something like
<reference name="top.links">
<action method="removeLinkByUrl"><url helper="customer/getRegisterUrl"/></action>
</reference>
In above case customer is the extensions name while getRegisterUrl is the function in the helper class.
If your extension isn't providing any function which is returning a link you can try following
<reference name="top.links">
<action method="removeLinkByUrl"><url>ADD_THE_DYNAMIC_LINK_HERE</url></action>
</reference>
Option 2
If the link was added with a name, like
<reference name="top.links">
<block type="wishlist/links" name="wishlist_link" />
<action method="addLinkBlock"><blockName>wishlist_link</blockName></action>
</reference>
you can just use
<reference name="top.links">
<remove name="wishlist_link"/>
</reference>
or
<default>
<reference name="top.links">
<block type="wishlist/links" name="wishlist_link"/>
<action method="removeLinkBlock"><blockName>wishlist_link</blockName></action>
</reference>
</default>
Option 3
If your link wasn't added with a name and a hardcoded url doesn't work for some reason you can just go ahead and copy the modules layout.xml to your custom theme folder and remove the lines where the link was added.
Hi This removes both the cart and checkout links from top.links in 1.9.3
<reference name="top.links">
<action method="removeLinkByUrl">
<url helper="checkout/url/getCartUrl" />
</action>
<action method="removeLinkByUrl">
<url helper="checkout/url/getCheckoutUrl" />
</action>
</reference>
based on the best accepted answer above but just in case anyone wants to remove both

Resources