1

I followed this tutorial:

To add a comment box to each product in cart. The data gets posted but it is never filled into the database. I also have the feeling that the function update items in cart.php never gets executed.

Any ideas what it could be?

1

found it,

this was missing in my form

<?php echo $this->getBlockHtml('formkey'); ?>
1

I have 500 error in order detail page when I'm adding :

    public function getItemcomment($item) {
    $itemId = $item->getId();

    $write = Mage::getSingleton('core/resource')->getConnection('core_write');

    $query = "SELECT q.* FROM `sales_flat_order_item` o
    LEFT JOIN `sales_flat_quote_item` q on o.quote_item_id = q.item_id
    WHERE o.item_id = $itemId";

    $res = $write->query($query);

    while ($row = $res->fetch() ) {
        if(key_exists('itemcomment',$row)) {
            echo nl2br($row['itemcomment']);
        }
    }
}    

To app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Items.php

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.