Magento加入收藏夹错误

magento不能加入收藏夹
magento不能加入收藏夹

Magento加入收藏夹错误 Call to a member function setItems…

我将magento 1.5的模板用到1.7上,在点击将商品加入收藏夹的时候产生了这个错误提示,无法将商品加入收藏夹。
这是由于模板不适用于当前Magento版本引起的,google下,见此页有修改的答案:http://www.magentocommerce.com/boards/viewthread/280193/
即是将你模板文件中 wshlist.xml中的

<block type="wishlist/customer_wishlist" name="customer.wishlist" template="wishlist/view.phtml"/>

修改为

<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="wishlist/customer_wishlist_item_column_image" name="customer.wishlist.item.image" template="wishlist/item/column/image.phtml" />
        <block type="wishlist/customer_wishlist_item_column_comment" name="customer.wishlist.item.info" template="wishlist/item/column/info.phtml">
            <action method="setTitle" translate="title">
                <title>Product Details and Comment</title>
            </action>
        </block>
        <block type="wishlist/customer_wishlist_item_column_cart" name="customer.wishlist.item.cart" template="wishlist/item/column/cart.phtml">
            <action method="setTitle" translate="title">
                <title>Add to Cart</title>
            </action>
            <block type="wishlist/customer_wishlist_item_options" name="customer.wishlist.item.options" />
        </block>
        <block type="wishlist/customer_wishlist_item_column_remove" name="customer.wishlist.item.remove" template="wishlist/item/column/remove.phtml" />
    </block>
    <block type="core/text_list" name="customer.wishlist.buttons" as="control_buttons">
        <block type="wishlist/customer_wishlist_button" name="customer.wishlist.button.share" template="wishlist/button/share.phtml" />
        <block type="wishlist/customer_wishlist_button" name="customer.wishlist.button.toCart" template="wishlist/button/tocart.phtml" />
        <block type="wishlist/customer_wishlist_button" name="customer.wishlist.button.update" template="wishlist/button/update.phtml" />
    </block>
</block>

请根据本文的提示,根据实际情况做出修改。

转载表明出处:www.hellokeykey.com