I want to know How to remove additional tab on magento product page. I have using Ultimo theme on magento 1.7.0.2
I try to search from previous post but still can't remove it.
I have add additional information to a product description and change a name to "ข้อมูลสินค้า"
My point is remove a second tab but still show information on "Product description
This is my product page. http://www.siameyewear.com/ray-ban-rb3025-001-58-aviator-large-metal.html
Thank you.
I'd create local.xml file inside your theme folder app/design/frontend/[your_package]/[your_theme] (if you haven't already)
And insert the following lines there
<?xml version="1.0"?>
<layout version="0.1.0">
<catalog_product_view>
<reference name="product.info.tabs">
<action method="unsetChild">
<child>product_additional_data</child>
</action>
</reference>
</catalog_product_view>
</layout>
After that clear the cache.
If you prefer to edit XML in separate files (which I'm not), find catalog.xml of your theme.
find the following line and comment them (<!-- -->)
<action method="addTab" translate="title" module="catalog"><alias>additional</alias><title>Additional Information</title><block>catalog/product_view_attributes</block><template>catalog/product/view/attributes.phtml</template></action>
Are you create new attribute for product description .remove any one of the product attribute.
you can remove your attribute in your magento admin page .
Catalog->attributes->manage attributes
select your attribute you want to delete.
OR
open your attribute check "Visible on Product View Page on Front-end" change yes to no
I am using my module adminhtml layout xml to add or remove tabs (you could use your theme's local.xml, based on these steps with a bit of tweakking.)
Firstly you will need to declare your layout updates (in your module config.xml) like the following:
<adminhtml>
<layout>
<updates>
<mymodule>
<file>mymodule.xml</file>
</mymodule>
</updates>
</layout>
</adminhtml>
Then in mymodule.xml, add the following (here, I am using the admin order view page handle)
<adminhtml_sales_order_view>
<reference name="sales_order_tabs">
<action method="removeTab">
<name>order_shipments</name>
</action>
<action method="addTabAfter">
<name>order_shipments_mymodule</name>
<block>mymodule/adminhtml_order_shipments</block>
<after>order_creditmemos</after>
</action>
<action method="addTab">
<name>order_receipts</name>
<block>mymoduled/adminhtml_order_recp</block>
</action>
</reference>
</adminhtml_sales_order_view
Hope this helps!! (Don't forget to upvote this solution)
Related
Hello i working on overriding the cart.phtml and it is working fine. but the problem is that when no item left in the cart still the it showing the cart table header and footer section without any item. i want when no item is present in the cart then it will show the noitem.phtml content as it is working for default magetno functionality.
i have check many things but not working . i have update my layout.xml but not effect any thing.
My layout.xml
<layout version="0.1.0">
<checkout_cart_index>
<reference name="checkout.cart">
<action method="setTemplate"><template>itemdeletion/cart.phtml</template></action>
<action method="addItemRender"><type>simple</type><block>checkout/cart_item_renderer</block><template>itemdeletion/cart/item/default.phtml</template></action>
<action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>itemdeletion/cart/item/default.phtml</template></action>
<action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>itemdeletion/cart/item/default.phtml</template></action>
</reference>
</checkout_cart_index>
</layout>
it is working for cart items but i make few more R & D and try to figure out how i can make it but i have get to add below blocks in xml
<action method="setEmptyTemplate"><value>itemdeletion/cart/noItems.phtml</value></action>
<action method="chooseTemplate"/>
but still it not working. Please help me out in this.
Thanks in advance
What is the best way of modifying a layout for Magento 1.9? I've been updating layouts using the admin backend but now need to do this programatically. Several articles have mentioned using layout.xml but for some reason, my system isn't picking up the layout updates.
Specifically, this is what I'm trying to modify:
Original layout
<block type="catalog/product_view_options" name="product.info.options" as="product_options" template="catalog/product/view/options.phtml">
<action method="addOptionRenderer">
<type>text</type>
<block>catalog/product_view_options_type_text</block>
<template>catalog/product/view/options/type/text.phtml</template>
</action>
...
</block>
Modified layout
<block type="catalog/product_view_options" name="product.info.options" as="product_options" template="catalog/product/view/options.phtml">
<action method="addOptionRenderer">
<type>text</type>
<block>catalog/product_view_options_type_text</block>
<template>catalog/product/view/options/type/newfile.phtml</template>
</action>
...
</block>
My modified layout is located in:app/design/frontend/default/(company name)/(module name)/layout/layout.xml
layout.xml (just checking to see if it will add the block, "test"):
<layout>
<default>
<block type="core/text_list" name="test"/>
</default>
</layout>
app/code/local/(company name)/(module name)/etc/config.xml:
<config>
<modules>
...
</modules>
<frontend>
<layout>
<updates>
<(module name)>
<file>local.xml</file>
</(module name)>
</updates>
</layout>
</frontend>
</config>
Can somebody point me in the right direction? Thanks!
Here are two things I notice which should be changed:
Your layout update file should have a unique name that won’t conflict with existing modules. In your config.xml you have specified <file>local.xml</file>. The problem with this is, local.xml will already be loaded automatically by Magento. So you should not use that filename for your layout update file if you are trying to add a new one specific to your module, however you may add miscellaneous updates to that file and they will get picked up automatically and applied last to the final merged layout.
Behind the scenes there’s an <updates /> section of the global config that contain nodes with all the file names to load. Once the files listed in the config have been combined, Magento will merge in one last xml file, local.xml.
Your layout update file app/design/frontend/default/(company name)/(module name)/layout/layout.xml does not appear to be in the right location. You should create your new layout update file at: app/design/frontend/base/default/layout/(company name)/(module_name).xml. Then, you need to update your config.xml to point to this file: <file>(company name)/(module name).xml</file>.
Because of the ability to use different themes in Magento and its fallback mechanism, all extension related theme files are placed in “base/default” package for frontend...
I am trying to load a js file through XML on the dashboard page of magento admin, but am unable to get it right.
Here is the part of code that I have added in my config file:
<config>
<adminhtml>
<layout>
<updates>
<anattadesign_abandonedcarts>
<file>my_extension.xml</file>
</anattadesign_abandonedcarts>
</updates>
</layout>
</adminhtml>
</config>
And my contents of my_extension.xml which is placed under /app/design/adminhtml/default/default/layout/ is:
<layout>
<default>
<reference name="head">
<action method="addJs"><script>my_extension/adminhack.js</script></action>
<action method="addJs"><script>prototype/prototype.js</script></action>
</reference>
</default>
</layout>
I understand that I am trying to load a js file for the whole admin this way, but I would like to know both, loading on a certain page, and how to find out the name if I want to load it on a certain page and if default is the correct one to make it load on all admin pages.
Using default should load it on all pages, indeed.
To load it on just admin dashboard use the (full 3 element) route with underscores as separators to the page. For the dashboard this is Adminhtml/(controllers)/Dashboard(Controller)/index(Action).
<layout>
<adminhtml_dashboard_index>
<reference name="head">
<action method="addJs"><script>my_extension/adminhack.js</script></action>
<action method="addJs"><script>prototype/prototype.js</script></action>
</reference>
</adminhtml_dashboard_index>
</layout>
N.B. I have not tested this code, but I think it should do it.
I need to override the "adminhtml/sales/order/create/items/grid.phtml" file to display some custom text under each item while creating new order from admin. I want this to be done through custom module. Anyone can suggest how to override the admin template files? Any help is really appreciated
I Recommend you that create a new template and add new design in your module with the layout update for the adminhtml section.
For example:
In your config.xml of your custom extension you can update the layout of adminhtml with:
<adminhtml>
<layout>
<updates>
<adminhtml>
<file>yourcustomlayout.xml</file>
</adminhtml>
</updates>
</layout>
</adminhtml>
Ok, then since this layout you can write the next code to add a css for example:
<layout>
<default>
<reference name="head">
<action method="addCss">
<name>aw_all/css/window.css</name>
</action>
</reference>
</default>
</layout>
In your case you need add you custom template for your block
<layout>
<handle>
<reference name="content">
<block type="smspremium/adminhtml_smspremium" name="smspremium">
<action method="setTemplate">
<template>customtemplate.phtml</template>
</action>
</block>
</reference>
</handle>
</layout>
If you want to discart all the block and replace with your block you can made unsetChild
<layout>
<handle>
<reference name="content">
<action method="unsetChild"><name>your.last.block</name></action>
<block type="smspremium/adminhtml_smspremium" name="smspremium">
<action method="setTemplate">
<template>customtemplate.phtml</template>
</action>
</block>
</reference>
</handle>
</layout>
This work same the frontend layout, only with the diference of the directory since you store your files.
For Templates:
app/design/adminhtml/default/default/templates
For layout:
app/design/adminhtml/default/default/layout
Hope help you
Basically, you have to declare a new layout file for your module for adminhtml area, than set a new template path using setTemplate method and reference[name] node.
First of all I'm not believe this is the correct way of overriding adminhtml templates. But I try this approach and it works, So just wanna share.
Add this to your custom Module config.xml
<stores>
<admin>
<design>
<theme>
<default>default</default>
<template>mycustom</template>
</theme>
</design>
</admin>
</stores>
Now You can just override by copying templates from default to mycustom
app\design\adminhtml\default\default\template\sales\order\view\history.phtml app\design\adminhtml\default\mycustom\template\sales\order\view\history.phtml
You can find the detailed instructions for overriding Magento admin files here http://www.techawaken.com/creating-a-new-magento-admin-theme/
I have a single Magento install running two different websites. One sells ebooks and the other not and so the business team would like to see the "My Downloads" link removed from the customer navigation block in the My Account area of the application.
I can see the link defined in design/frontend/base/layout/downloadable.xml but cannot see any way defined that would let me disable the link on just one of the websites. Obviously, I could override this XML to turn off globally but I need the change to be limited in scope.
How do you define layout overrides on a single website or store in a multi site Magento installation?
Based on the responses below, I have done the following:
Created app/local/Mage/Customer/Block/Account/Navigation.php and added a method removeLink() which is not in the core code.
If I make the following change in local.xml, the download link is removed:
<?xml version="1.0" encoding="UTF-8"?>
<layout>
<default>
<remove name="catalog.compare.sidebar"/>
</default>
<customer_account>
<reference name="customer_account_navigation">
<action method="removeLink" translate="label" module="downloadable"> <name>downloadable_products</name></action>
</reference>
</customer_account>
</layout>
But, if try to target a specific store, it is not. E.g.
<?xml version="1.0" encoding="UTF-8"?>
<layout>
<default>
<remove name="catalog.compare.sidebar"/>
</default>
<STORE_mm>
<customer_account>
<reference name="customer_account_navigation">
<action method="removeLink" translate="label" module="downloadable"> <name>downloadable_products</name></action>
</reference>
</customer_account>
</STORE_mm>
</layout>
As Anton suggested, set a new layout theme for your store. Another approach for anything site-wide + store-scoped would be to use the store layout handle - it's like a <default> handle which is applied each store. If your store code (under Manage Stores > Store View) is 'foo' the store layout handle would be <STORE_foo>.
Ref. Mage_Core_Controller_Varien_Action::addActionLayoutHandles()
Create different themes for this websites.
Create app/design/frontend/default/website1/layout/local.xml
and app/design/frontend/default/website2/layout/local.xml
Where you can make changes needed for downloadable layout.
This is described in magento feature.