Adding an extra column in the wishlist?
-
16-10-2019 - |
Question
Does anyone know how to add an extra column for data in the wishlist table?
It appears the columns and titles are populated maybe in the core files. It is not built like the shopping cart where you can easily add and remove columns in the phtml files.
Any help would be great!
Solution 2
I feel like a dummy. Instead of the following in the list.phtml
file:
<?php foreach ($columns as $column): ?>
<th><?php echo $column->getTitle();?></th>
<?php endforeach; ?>
I just removed that and manually entered in my th
columns. Hope this helps someone else :)
OTHER TIPS
Open the file app/design/frontend/Yourtheme/layout/wishlist.xml
Find this refence block
<reference name="my.account.wrapper">
line no. 76Add this below code after price block line no. 92
<block type="wishlist/customer_wishlist_item_column_cart" name="customer.wishlist.item.setup_price" template="wishlist/item/column/setup-price.phtml">
<action method="setTitle" translate="title">
<title>Setup Price</title>
</action>
<block type="wishlist/customer_wishlist_item_options" name="customer.wishlist.item.options" />
</block>
Create this setup-price.phtml on this location app/design/frontend/Yourtheme/default/template/wishlist/item/column/
You Also need to create your block file on this location app/code/core/Mage/Wishlist/Block/Customer/Wishlist/Item/Column
In Magento 1.7
Open the file app/design/frontend/Yourtheme/layout/wishlist.xml
<wishlist_index_index translate="label">
<label>Customer My Account My Wishlist</label>
<!-- Mage_Wishlist -->
<update handle="customer_account" />
<reference name="my.account.wrapper">
<block type="wishlist/customer_wishlist" name="customer.wishlist" template="wishlist/view.phtml">
<action method="setTitle" translate="title">
<title>My Wishlist</title>
</action>
<block type="wishlist/customer_wishlist_items" name="customer.wishlist.items" as="items" template="wishlist/item/list.phtml">
......
<block type="Yourmodule/YourModuleBlock" name="Name" template="Your PHTML template file path">
<action method="setTitle" translate="title">
<title>Your Additional Title</title>
</action>
</block>
......
</block>
.....
</block>
</reference>
<reference name="right">
<action method="unsetChild"><name>wishlist_customer_sidebar</name></action>
</reference>
</wishlist_index_index>