Most e-commerce sites provide a way for customers to add comments to the order when they are checking out. Surprisingly, Magento does not provide built in functionality to deal with this simple requirement. This means that we will need to add this functionality as a custom extension and there are several extensions on the Magento extensions directory that provide this functionality.
So why are we adding yet another customer comment extension to the mix? We feel that our solution achieves the task with minimal and unobtrusive code and is in line with the Magento order management workflow.
Let’s see in a few screenshots how this extension shows up once it is installed.
1. Extension Configuration
The extension has a configuration section under: System > Configuration > Sales > Checkout > Magebase Checkout Comment Options:

The only configuration parameter is Enabled/Disabled
All it controls is whether the extension functionality is enabled or disabled. No rocket science there.
2. Checkout – Shipping Step
The extension comes with a layout file under app/design/frontend/base/default/layout/magebase/checkoutcomment.xml and a couple of phtml files under app/design/frontend/base/default/template/magebase/checkoutcomment/. Out of the box, the extension will automatically display the Customer Comment field on the shipping methods step in the one page checkout. No action should be necessary to make this field show unless you have a heavily customized checkout or you are using a custom checkout extension.
To make the comments box display on the shipping step, we will need to override checkout/onepage/shipping_method.phtml to add: <?php echo $this->getChildHtml('mbcomments') ?> in the place where we want the comments box to appear. Please note that the comments box must be placed on the shipping method step in order to save the comment correctly. If you want to move the comments box you will need to find another event to observe.
Note that the extension doesn’t supply its own CSS so you will need to style appropriately.
3. Order Administration

The customer comment appears in the Comment History
Once the customer has completed the checkout and placed the order, we need to know where the customer comment information will be shown on the order management page. This is where the extension is ‘clever’ and keeps in line with the Magento order workflow. The extension will simply add the customer comment to the Comments History as shown in the screenshot to the right. This means that the extension doesn’t alter the default database to add custom columns to any Magento entities but uses the built in functionality to its advantage.
From an order workflow perspective, this makes sense as any notes and comments around the order are kept in the same area.
4. Order Confirmation Email
Another serendipitous consequence of using the built in Comments History functionality is that the customer comment is automatically sent out in the order confirmation email without any extra effort or additional template changes.

The customer comment in the confirmation email
How it works
If you lift the ‘hood’ off this extension, you will see that the code is very simple. It leverages off built in Magento features to provide this simple functionality in an unobtrusive way by using an event observer, the comments history method and the output="toHtml" layout attribute to force itself to render on the checkout template. The phtml is structured based on the Magento customer widget field implementation.
UPDATE: Due to an issue highlighted in the comments below, the toHtml output won’t work since it seems to interfere with the progress block updates. Therefore, we have changed the approach to a more manual one where we add our comments block in the <checkout_onepage_index> handle, reference name="checkout.onepage.shipping_method" and then we need to override checkout/onepage/shipping_method.phtml to add: <?php echo $this->getChildHtml('mbcomments') ?> to render the comments field. Please download the latest version below and apply the changes as instructed manually.
Suffice to say, the single line of code (in Observer.php) that makes it all happen is:
$observer->getEvent()->getQuote()->getShippingAddress()->setCustomerNotes($orderComment)->save();
Download
Summary
Hopefully, we have supplied the community with a simple, free and useful extension and shown how to utilize built in Magento features to minimize our own programming effort and create efficient, performance conscious code.
Note: This extension was developed and tested on Magento 1.6.2.0 but should work fine for Magento CE 1.4.x and up, PE, EE 1.8.0 and up. There is no warranty or guarantee for the functionality and I don’t provide support for this extension. Use at your own risk and ALWAYS backup your database before installing.
Originally published on magebase.com. Copyright © 2012 Magebase - All Rights Reserved.





Proud members of the
You guys are too slow, your blog will die if you continue do like this.
Thanks for your feedback. I assume you mean the website speed is slow.
We utilize caching but we obviously need to look at moving the site to a faster server.
Hi.
Thank for the module, works like it should. I have one question, is it possible to move the textarea to the first step where i enter my billing info instead of having it on the shipping method page?
This question had to be asked sooner or later
.
Well, this extension is specifically created to capture customer comments on the shipping method step. To change that, you will need to find another suitable event or way to save the comment after the billing step. The shipping method step is convenient because we have a specific event we can observe but with the billing step it’s not so. Then you will need to make changes to the layout xml to ‘move’ the widget output to the billing step form.
All this is outside of the scope of this post but would be a good exercise in learning about checkout customization.
I have the same problem. I would like to display the comment field in the point order summary (review). Do you have a small tip on how this could work? Thank you!
If you use one page checkout you could extend the Mage_Checkout_Model_Type_Onepage class to handle an ekstra field and add the comment to the comment history on the order.
Thats the way i did it, and it works fine.
Is it possible to send me your plugin files (finrik A@T gmail.com )? Then I can understand it better. Thank you!
@finrik The same tip above your comment applies to your question. As stated, this extension is supplied ‘as is’. If you want to change the functionality, take it as a personal exercise.
I’ve already tried to solve it. But as you can see without success.
My main problem is that I can not find a way to adapt it to the review template. (Save on “checkout_type_onepage_save_order” might work.)
I’m still Magento beginners. At the moment I learn best because of examples….
Thanks alot for sharing. This extension is exactly what I needed for a b2b store I’m working on. Excited to look over the code and hopefully learn a thing or two before I install.
Everything went smoothly… until i looked at the “How it Works” section of your post. I am using a modified checkout for a quoting system that doesn’t use Shipping Method or Payment. Just Billing Info so we can contact the customer.
Is there a way to add an event handler there?
Hi Don.
I also needed the comment field to be on the same page as the billing info, so i extended the Mage_Checkout_Model_Type_Onepage class to handle an ekstra field and add the comment to the comment history on the order.
if you need some help with this, just wirte me a mail. then i can sent you the files.
Andres,
Sure! What’s your email?
I’m not using onepage checkout, but have in the past. I’m sure i could adapt what you have for mine. Any chance you could send those to globalamerican AT gmail DOT com ?
Hi Andreas,
I want to use this module comment in billing section. Can You send to me what changes did you do in your files?
Andreas,
I’m not sure if the email notify is working for this post. I’m not getting mine. I left my email address in my reply to your reply.
Just checking. Pulling my hair out trying to figure this one out.
Robert, Thanks for the push in the right direction. I had this all working fine in 1.4.1.1, but can’t seem to get comments in 1.6.2
@Don it’s hard to know why your modifications are not working in 1.6.2 without seeing what your modifications are.
I have downloaded your extension and have tried to install it at my Magento 1.6.2, but when I try to install it, I get the error message “CONNECT ERROR: Unsupported resource type”.
Are you using the connect manager? This extension should be installed the ‘old fashioned, manual way’
. Just downlaod to your site root and untar there using:
tar xzf Magebase_CheckoutComment-0.1.0.tar.gz
This extensions works on 1.6.2 as well as 1.7.0.0.
Ok, got it installed an it is now enabled under System > Configuration > Sales > Checkout > Magebase Checkout Comment Options, but the comment field isn’t visible at the check out. My template is an almost standard “modern” template. Anything else, I have to make it visible?
It should appear on the shipping step automatically but if you have modifications, then you will need to work out how to get it to show up. You did refresh the cache, etc. I assume. Also, you read my note about the fact there is no support for this extension, right?
Hi Robert,
it is working, now. I thought, I refreshed cache after installing your extension and refreshed cache, again. The Customer comment field is now visible!
Thanks again for you help!
Maik
Will your extension work with 1.6.2 along side the Firecheckout onepage checkout extension that already provides a customer checkout comment area?
Since this extension utilizes an event observer only, it should work, however, I have not worked with the extension you mentioned so, there are no guarantees. You may need to change the way the layout XML outputs the comments field widget and edit your extension’s phtml, since your custom checkout extension may have overridden the standard one page checkout templates.
Thanks for the reply Robert but I was able to scour the extension’s files to determine the var call to the database to have the comment appear on a customized order form within Magento for FireCheckout. So all is well after racking my poor understanding of Magento for the last two weeks.
Thanks for the ‘easy way’. Unfortunately my Magento 1.7 standard one-page-checkout has an issue with ‘collapsing’ left column items (aka the checkout process overview).
Default Magento
On a standard Magento installation the Shipping Address is shown in the left column with a link to update it. When I click on next (i.e. open Shipping Method) the shipping address automatically ‘expanded’ in the left column. Even when the shipping address is the same as the invoice address it is still expanded in the left column.
Magebase Order Comment Extension
After I have installed your comment extension this no longer works for the shipping address. The shipping address in the left column remains a blank line, and without a hyperlink to change it. See below (translated in english)
—
ORDER PROCESS
INVOICEADDRESS | Change
John Doe
222, Harbor Rd.
Newhaven, 12345
Verenigde Staten
T: 12345678
SHIPPINGADDRES
SHIPPINGMETHOD | Change
Mail – Weight € 1,79
PAYMENTMETHOD
—
Look specifically at the SHIPPINGADDRES heading. It is not expanded to contain the shipping adress nor includes the ‘change’ link, as in a standard Magento installation.
Mark
Upon further investigation I noticed that in ‘app/design/frontend/base/default/template/checkout/onepage/progress.phtml’ the value of $this->isStepComplete(‘shipping’) remains allways FALSE
In ‘app/design/frontend/base/default/template/checkout/onepage/progress.phtml’ a call is made to shipping.save().
This function seems to be defined in ‘skin/frontend/base/default/js/optcheckout.js’
But there the trail ends…
Cannot make it work so that isStepComplete returns TRUE as soon as I hit ‘continue’ and the ShippingMethod tab with the comment opens…
Removing this extension and all works again…
Finally…
I resorted to ‘crippling’ the GiftMessage interface by overriding the original one in the modern template.
I tinkered with the javascript in ‘/giftmessage/inline.phtml’ and hid/removed all unwanted lines. UGLY but working.
Now GiftMessage is effectively only possible on the order level as a general order comment. Nothing left to ‘check’ otherwise.
I do not know how it appears in the back-end yet.
The extension in this original post is much cleaner design, though not working for me.
@Mark You are right! The progress bar functionality is affected by this extension. This seems to be due to me hijacking the
checkout_onepage_shippingmethodlayout handle. I have now modified the extension to remove the automagic output using this handle and implemented a more manual approach. As outlined in the post update above, you will need to override your shipping_method.phtml to add the comments box block there. This will restore the standard progress functionality.Hey Robert, I am not seeing the app/design/frontend/base/default/layout/magebase/checkoutcomment.xml file in the download. Am I missing something?
Hi Robert, wieger from the Netherlands. Hope you’re fine. As Todd, It looks like there are more missing files. I have almost no knowledge about php but is this line “getChildHtml(‘mbcomments” not calling a phtml file (mbcomments)? Can’t discover it in the download…
wieger, try creating the missing layout file and adding this:
appears to be working for me.
I am fairly new to Magento, so if that is incorrect, please let me know. The getChildHtml call you noted above needs to be added manually by you to your checkout/onepage/shipping_method.phtml file.
Thanks for the extension Robert.
Sorry, here is the code…
<layout version="0.1.0"> <checkout_onepage_index> <reference name="checkout.onepage.shipping_method"> <block type="checkout/onepage_shipping" name="mbcomments" template="magebase/checkoutcomment/shipping_comment.phtml" /> </reference> </checkout_onepage_index> </layout>@todd, @wieger, please find the updated extension with the missing file. Just re-download from button in the post.
Read the Note update in red above for instructions how to manually insert the required code into the shipping method template so the field displays.
Hi Todd. Thanks for your help. Is your code supposed to be replacing the original line which was;
getChildHtml(‘mbcomments’) ?>
or both like this;
getChildHtml(‘mbcomments’) ?>
Sorry but as I said, need to learn php…
Hi Todd, sorry, this is what i did.. But isn’t working.
getChildHtml(‘mbcomments’) ?>
your code here…
Hi Robert. You are a real star….
Hi Robert, forgot to thank you.. It works great. I managed to translate all fields to Dutch as well now. Can someone give a hint how I can change the size of the box? Only in width.Thanks in advance.
Hi,
Can I know where to insert this code getChildHtml(‘mbcomments’) ?> under checkout/onepage/shipping_method.phtml?
This is the phtml file I have:
getChildHtml(‘checkoutCallout’) ?>
__(‘Checkout’) ?>
<script type="text/javascript" src="getJsUrl(‘varien/accordion.js’) ?>”>
<script type="text/javascript" src="getSkinUrl(‘js/opcheckout.js’) ?>”>
getChildHtml(‘checkoutProgress’) ?>
getSteps() as $_stepId => $_stepInfo): ?>
getChild($_stepId) || !$this->getChild($_stepId)->isShow()): continue; endif; $i++ ?>
<li id="opc-” class=”section”>
<div id="checkout-step-” class=”step a-item” style=”display:none;”>
getChildHtml($_stepId) ?>
//<![CDATA[
var accordion = new Accordion('checkoutSteps', '.step-title', true);
getActiveStep()): ?>
accordion.openSection('opc-getActiveStep() ?>');
var checkout = new Checkout(accordion,{
progress: 'getUrl('checkout/onepage/progress') ?>',
review: 'getUrl('checkout/onepage/review') ?>',
saveMethod: 'getUrl('checkout/onepage/saveMethod') ?>',
failure: 'getUrl('checkout/cart') ?>'}
);
//]]>
ok wrong file .. I added as below. But the checkout page still does not show the “comment box”. Anything I miss?
- It is showing “enabled” in BO admin
- Installed the files downloaded here
- Insert the getChildHTML code
- refresh cache and re-login
- checkout nothing show
Kindly help
=====
getChildHtml(‘available’) ?>
//<![CDATA[
var shippingMethod = new ShippingMethod('co-shipping-method-form', "getUrl('checkout/onepage/saveShippingMethod') ?>");
//]]>
getChildHtml(‘mbcomments’) ?>
getChildHtml(‘additional’) ?>
« __(‘Back’) ?>
__(‘Continue’) ?>
<img src="getSkinUrl(‘images/opc-ajax-loader.gif’) ?>” alt=”__(‘Loading next step…’) ?>” title=”__(‘Loading next step…’) ?>” class=”v-middle” /> __(‘Loading next step…’) ?>
Re-paste code:
<form id="co-shipping-method-form" action=""> <div id="checkout-shipping-method-load"> <?php echo $this->getChildHtml('available') ?> </div> <script type="text/javascript"> //<![CDATA[ var shippingMethod = new ShippingMethod('co-shipping-method-form', "<?php echo $this->getUrl('checkout/onepage/saveShippingMethod') ?>"); //]]> </script> <div id="onepage-checkout-shipping-method-additional-load"> <?php echo $this->getChildHtml('mbcomments') ?> <?php echo $this->getChildHtml('additional') ?> </div> <div class="buttons-set" id="shipping-method-buttons-container"> <p class="back-link"><a href="#" onclick="checkout.back(); return false;"><small>« </small><?php echo $this->__('Back') ?></a></p> <button type="button" class="button" onclick="shippingMethod.save()"><span><span><?php echo $this->__('Continue') ?></span></span></button> <span id="shipping-method-please-wait" class="please-wait" style="display:none;"> <img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Loading next step...') ?>" title="<?php echo $this->__('Loading next step...') ?>" class="v-middle" /> <?php echo $this->__('Loading next step...') ?> </span> </div> </form>@James Wata Make sure you have the layout file from my recent update. It is found in
app/design/frontend/base/default/layout/magebase/checkoutcomment.xmlThis should contain:
<layout version="0.1.0"> <checkout_onepage_index> <!-- Please note: We are adding a new block for the comments. You will need to edit the template: checkout/onepage/shipping_method.phtml to add: <?php echo $this->getChildHtml('mbcomments') ?> --> <reference name="checkout.onepage.shipping_method"> <block type="checkout/onepage_shipping" name="mbcomments" template="magebase/checkoutcomment/shipping_comment.phtml" /> </reference> </checkout_onepage_index> </layout>Also, obviously make sure you have the
app/design/frontend/base/default/template/magebase/checkoutcomment/shipping_comment.phtmlfile and all the other template files in place.Just checked and yes i have that file and this inside.
<layout version="0.1.0"> <checkout_onepage_index> <!-- Please note: We are adding a new block for the comments. You will need to edit the template: checkout/onepage/shipping_method.phtml to add: <?php echo $this->getChildHtml('mbcomments') ?> --> <reference name="checkout.onepage.shipping_method"> <block type="checkout/onepage_shipping" name="mbcomments" template="magebase/checkoutcomment/shipping_comment.phtml" /> </reference> </checkout_onepage_index> </layout>In shipping_method.phtml, where should i add
<?php echo $this->getChildHtml('mbcomments') ?>? is it here?
<div id="onepage-checkout-shipping-method-additional-load"> <?php echo $this->getChildHtml('mbcomments') ?> <?php echo $this->getChildHtml('additional') ?> </div>Very helpful extension, thanks Robert! Works well in Enterprise 1.12, multi-website, multi-store.
Found it helpful to add code to display these Magebase checkout comments in the order View and Print pages as well:
In app/design/frontend/base/default/template/sales/order/print.phtml
<?php if ($_order->getCustomerNote()):?> <div class="col-12set"> <div class="col-1" style="margin: 0 0 10px 0;"> <h2><?php echo $this->__('Customer Comments') ?></h2> <?php echo $this->escapeHtml($_order->getCustomerNote()) ?> </div> </div> <?php endif;?>In app/design/frontend/base/default/template/sales/order/view.phtml
<?php if ($_order->getCustomerNote()):?> <div class="info-box"> <h2 class="box-title"><?php echo $this->__('Customer Comments') ?></h2> <div class="box-content"> <p><?php echo $this->escapeHtml($_order->getCustomerNote()) ?></p> </div> </div> <?php endif;?>Hi all. This works fine for magento 1.7.0.2 as well. Still a question; can somebody give me a suggestion for changing the view of the size of the comment box? The box looks small on the page. Thanks in advance!
@Wieger, elementary CSS, just set a width, height on the .input-box #customer_notes element in your theme stylesheet:
.input-box #customer_notes {width: 200px; height: 100px;}
Hello Robert:
Let me start off with saying that I’m new to Magento and php…
I have spent the last two days trying to make this extension work. I have done the following steps:
1) downloaded Magebase_CheckoutComment-0.1.1.tar.gz and put it in the Magento base directory
2) tar xzvf Magebase_CheckoutComment-0.1.1.tar.gz
3) double checked to make sure that the following files are in place:
-rw-r–r– 1 tommyw tommyw 824 Apr 28 21:55 app/design/frontend/base/default/template/magebase/checkoutcomment/shipping_comment.phtml
-rw-r–r– 1 tommyw tommyw 1108 Jul 13 17:45 app/design/frontend/base/default/layout/magebase/checkoutcomment.xml
4) made sure that under System -> Configuration -> checkout that the Magebase extension is set to “Yes”
5) cleared cache
6) modified the two shipping_method.phtml files I have on the system to read:
getChildHtml(‘mbcomments’) ?>
getChildHtml(‘additional’) ?>
7) cleared cache
8) modified ./skin/frontend/default/default/css/styles.css and added:
.input-box #customer_notes {width: 200px; height: 100px;}
9) cleared cache
Still cannot get the comment box to appear… I am sure that I have overlooked something completely silly, I just can’t seem to figure out what. Any help would be greatly appreciated!!!
Sorry, looks like my step 6 didn’t paste correctly. It should look just like what James Wata posted on July 20.
{<div id="onepage-checkout-shipping-method-additional-load"> <?php echo $this->getChildHtml('mbcomments') ?> <?php echo $this->getChildHtml('additional') ?> </div>}Thanks again
@Tommy
There may be several reasons for your comments box not showing.
- What theme do you have enabled? These are the settings under System / Configuration / Design > Package and Theme.
- Your CSS might be hiding the id=”onepage-checkout-shipping-method-additional-load” div which would make everything in it invisible. You can try to use Firebug or the Chrome/Safari inspector to inspect the HTML in the shipping method step to see if the page actually contains the box but it’s hidden by CSS.
- There may be some other issue
@Robert
Wow – what a super fast reply!!
- I have the “default” package enabled and all of the fields under Theme are blank.
- using Chrome during the checkout step I see the following:
</div> <script type="text/javascript"> //<![CDATA[ var shippingMethod = new ShippingMethod('co-shipping-method-form', "http://tomsvapor.com/store/checkout/onepage/saveShippingMethod/"
;
//]]>
</script>
<div id="onepage-checkout-shipping-method-additional-load">
<div class="field">
<label for="customer_notes">Customer Comments</label>
<div class="input-box">
<textarea id="customer_notes" name="customer_notes" class="input-text" ></textarea>
</div>
</div>
<script type="text/javascript">
So I’m thinking it’s supposed to be there but I don’t know enough about the code to know why it doesn’t show…
Yes, the code is in the page so there is some CSS hiding the whole section.
Try to change your shipping_method.phtml to pull the comments box outside of the additional container. Ie:
<?php echo $this->getChildHtml('mbcomments') ?> <div id="onepage-checkout-shipping-method-additional-load"> <?php echo $this->getChildHtml('additional') ?> </div>@Robert
Your last suggestion fixed it!! I cannot thank you enough!!
Hi Robert,
Thank you so much for sharing such a nice extension with free! Installing was really smoothly and it works in my Magento 1.5.1.0 well.
I have a question now. How could I show a customer’s comment in an invoice? We intend to use this comment field for a sort of campaign like giving a freebie and our dispatching team needs to see it in the invoice when package.
I need to add ‘checkoutcomment’ or something as a new attribute?
Thanks!
@Eco
This extension uses the comments history feature to add the customer comment to the history items. There is no feature to allow it to be displayed on the Order/Invoice etc PDFs. However, you could make your own customisation to the PDF display to retrieve the order comments and extract the customer note, or if you are using Fooman’s PDF customiser, you could add an observer to copy the order comment with the note to the invoice comments and set the PDF customiser configuration to display invoice comments on the printed invoice.
@Robert
Thank you so so much! I did it!
Yes, I am using Fooman’s PDF print-out extension (I wonder how you found it…) and added a line of customer’s note ‘{{var order.getEmailCustomerNote()}}’ to an invoice configuration there.
Again thank you for sharing this extension and giving me such useful advice!
Hi Robert,
Thanks so much for this – looks exactly what I need.
I’m just having a few issues in saving the comment. I can get the box to display fine, the order to proceed through and complete the order without a hitch. But no text is visible in the comment field in the admin panel for the order.
I have no idea why it won’t save. I am in Mage EE 1.10 – do you have any ideas please?
Thanks
Matt
Hi Matt, where are you expecting to see the comment? As outlined in the article, the customer comment appears as an entry in the comment history – usually the first. The extension should work with EE 1.10.
You can also check the sales_flat_order_status_history.comment database field for your saved comments. If they are appearing there, then the extension works and saves the comments. If not, then there is an issue but I would not be able to guess the reason.
Hi Rob,
Thanks very much for the reply.
Yes, I was expecting to see in the comment history; the order is created, but no comment appears.
I ran a search for the comment string that I entered, but it returned 0 results.
It must be an issue with how I have Magento running rather than the module. I will update if I find the issue
Thanks,
Matt
Hi I just installed the module, however when I get to one page it is broken, if I remove the getChildHtml(‘mbcomments’) ?> it works fine.
Anyhelp is appreciated.
The exception is showing the following
2012-10-09T16:34:44+00:00 ERR (3):
exception ‘Mage_Core_Exception’ with message ‘Invalid block type: Magebase_CheckoutComment_Block_Widget_Comment’ in /home2/floretik/public_html/app/Mage.php:550
Stack trace:
#0 /home2/floretik/public_html/includes/src/__default.php(24319): Mage::throwException(‘Invalid block t…’)
#1 /home2/floretik/public_html/includes/src/__default.php(24261): Mage_Core_Model_Layout->_getBlockInstance(‘checkoutcomment…’, Array)
#2 /home2/floretik/public_html/app/design/frontend/default/Linen/template/magebase/checkoutcomment/shipping_comment.phtml(19): Mage_Core_Model_Layout->createBlock(‘checkoutcomment…’)
#3 /home2/floretik/public_html/includes/src/__default.php(2922): include(‘/home2/floretik…’)
#4 /home2/floretik/public_html/includes/src/__default.php(2949): Mage_Core_Block_Template->fetchView(‘frontend/defaul…’)
#5 /home2/floretik/public_html/includes/src/__default.php(2963): Mage_Core_Block_Template->renderView()
#6 /home2/floretik/public_html/includes/src/__default.php(2280): Mage_Core_Block_Template->_toHtml()
#7 /home2/floretik/public_html/includes/src/__default.php(2047): Mage_Core_Block_Abstract->toHtml()
#8 /home2/floretik/public_html/includes/src/__default.php(1998): Mage_Core_Block_Abstract->_getChildHtml(‘mbcomments’, true)
#9 /home2/floretik/public_html/app/design/frontend/default/Linen/template/checkout/onepage/shipping_method.phtml(47): Mage_Core_Block_Abstract->getChildHtml(‘mbcomments’)
#10 /home2/floretik/public_html/includes/src/__default.php(2922): include(‘/home2/floretik…’)
#11 /home2/floretik/public_html/includes/src/__default.php(2949): Mage_Core_Block_Template->fetchView(‘frontend/defaul…’)
#12 /home2/floretik/public_html/includes/src/__default.php(2963): Mage_Core_Block_Template->renderView()
#13 /home2/floretik/public_html/includes/src/__default.php(2280): Mage_Core_Block_Template->_toHtml()
#14 /home2/floretik/public_html/includes/src/__default.php(2047): Mage_Core_Block_Abstract->toHtml()
#15 /home2/floretik/public_html/includes/src/__default.php(1998): Mage_Core_Block_Abstract->_getChildHtml(‘shipping_method’, true)
#16 /home2/floretik/public_html/app/design/frontend/default/Linen/template/checkout/onepage.phtml(43): Mage_Core_Block_Abstract->getChildHtml(‘shipping_method’)
#17 /home2/floretik/public_html/includes/src/__default.php(2922): include(‘/home2/floretik…’)
#18 /home2/floretik/public_html/includes/src/__default.php(2949): Mage_Core_Block_Template->fetchView(‘frontend/defaul…’)
#19 /home2/floretik/public_html/includes/src/__default.php(2963): Mage_Core_Block_Template->renderView()
#20 /home2/floretik/public_html/includes/src/__default.php(2280): Mage_Core_Block_Template->_toHtml()
#21 /home2/floretik/public_html/includes/src/__default.php(11327): Mage_Core_Block_Abstract->toHtml()
#22 /home2/floretik/public_html/includes/src/__default.php(2280): Mage_Core_Block_Text_List->_toHtml()
#23 /home2/floretik/public_html/includes/src/__default.php(2047): Mage_Core_Block_Abstract->toHtml()
#24 /home2/floretik/public_html/includes/src/__default.php(1998): Mage_Core_Block_Abstract->_getChildHtml(‘content’, true)
#25 /home2/floretik/public_html/app/design/frontend/base/default/template/page/2columns-right.phtml(48): Mage_Core_Block_Abstract->getChildHtml(‘content’)
#26 /home2/floretik/public_html/includes/src/__default.php(2922): include(‘/home2/floretik…’)
#27 /home2/floretik/public_html/includes/src/__default.php(2949): Mage_Core_Block_Template->fetchView(‘frontend/base/d…’)
#28 /home2/floretik/public_html/includes/src/__default.php(2963): Mage_Core_Block_Template->renderView()
#29 /home2/floretik/public_html/includes/src/__default.php(2280): Mage_Core_Block_Template->_toHtml()
#30 /home2/floretik/public_html/includes/src/__default.php(24379): Mage_Core_Block_Abstract->toHtml()
#31 /home2/floretik/public_html/includes/src/__default.php(11719): Mage_Core_Model_Layout->getOutput()
#32 /home2/floretik/public_html/app/code/core/Mage/Checkout/controllers/OnepageController.php(168): Mage_Core_Controller_Varien_Action->renderLayout()
#33 /home2/floretik/public_html/includes/src/__default.php(11748): Mage_Checkout_OnepageController->indexAction()
#34 /home2/floretik/public_html/includes/src/__default.php(15669): Mage_Core_Controller_Varien_Action->dispatch(‘index’)
#35 /home2/floretik/public_html/includes/src/__default.php(15271): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#36 /home2/floretik/public_html/includes/src/__default.php(17470): Mage_Core_Controller_Varien_Front->dispatch()
#37 /home2/floretik/public_html/app/Mage.php(596): Mage_Core_Model_App->run(Array)
#38 /home2/floretik/public_html/index.php(81): Mage::run(”, ‘store’)
#39 {main}
I just got anewer info, I am getting a 500 error cause by
PHP Fatal error: Call to a member function isEnabled() on a non-object in /home2/floretik/public_html/app/design/frontend/base/default/template/magebase/checkoutcomment/shipping_comment.phtml on line 20
if I comment out the isenable if statement I get the following error:
PHP Fatal error: Call to a member function setComment() on a non-object in /home2/floretik/public_html/app/design/frontend/base/default/template/magebase/checkoutcomment/shipping_comment.phtml on line 22
Why I am having this issues?
Can you check if the extension module files were installed correctly under app/code/local/Magebase/CheckoutFeedback/
You may be missing the app/code/local/Magebase/CheckoutFeedback/Block/Widget/Comment.php file and possibly other files.
Robert,
Thenk you for your reply, this are the files I have:
[~/public_html/app/code/local/Magebase/CheckoutComment]# ls -Rl
.:
total 24
drwxr-xr-x 6 floretik floretik 4096 Oct 9 09:57 ./
drwxr-xr-x 3 floretik floretik 4096 Oct 9 09:56 ../
drwxr-xr-x 3 floretik floretik 4096 Oct 9 09:57 Block/
drwxr-xr-x 2 floretik floretik 4096 Oct 9 09:57 Helper/
drwxr-xr-x 2 floretik floretik 4096 Oct 9 09:57 Model/
drwxr-xr-x 2 floretik floretik 4096 Oct 9 09:57 etc/
./Block:
total 12
drwxr-xr-x 3 floretik floretik 4096 Oct 9 09:57 ./
drwxr-xr-x 6 floretik floretik 4096 Oct 9 09:57 ../
drwxr-xr-x 2 floretik floretik 4096 Oct 9 09:57 Widget/
./Block/Widget:
total 16
drwxr-xr-x 2 floretik floretik 4096 Oct 9 09:57 ./
drwxr-xr-x 3 floretik floretik 4096 Oct 9 09:57 ../
-rw-r–r– 1 floretik floretik 1480 Oct 9 09:06 Abstract.php
-rw-r–r– 1 floretik floretik 879 Oct 9 09:06 Comment.php
./Helper:
total 12
drwxr-xr-x 2 floretik floretik 4096 Oct 9 09:57 ./
drwxr-xr-x 6 floretik floretik 4096 Oct 9 09:57 ../
-rw-r–r– 1 floretik floretik 1239 Oct 9 09:06 Data.php
./Model:
total 12
drwxr-xr-x 2 floretik floretik 4096 Oct 9 09:57 ./
drwxr-xr-x 6 floretik floretik 4096 Oct 9 09:57 ../
-rw-r–r– 1 floretik floretik 1243 Oct 9 09:06 Observer.php
./etc:
total 16
drwxr-xr-x 2 floretik floretik 4096 Oct 9 09:57 ./
drwxr-xr-x 6 floretik floretik 4096 Oct 9 09:57 ../
-rw-r–r– 1 floretik floretik 3012 Oct 9 09:06 config.xml
-rw-r–r– 1 floretik floretik 1879 Oct 9 09:06 system.xml
Looks ok to me. Maybe you have compilation enabled? Note that using this extension is at your risk and discretion as we don’t provide support for these kinds of issues. Every Magento install and configuration is different so it is in your hands.
Thank you anyway for your help!!
Will post it back once I found the solution in case someone gets this problem in the future.
Make sure you can see the module in Config > Advanced > Advanced > Disable Modules Output, in other words that it is enabled, that you refreshed the caches and re-compiled if you have enabled compilation… Not sure if you changed any code in the files. Your error seems to indicate that Magento can’t find the Block class Magebase_CheckoutComment_Block_Widget_Comment.
Robert,
You were right it was the compilation setting. I was not aware of this feature as this is the first moduleI install manually.
Working perfectly thank you for your support.!!!!
Great module!!!
Great, glad you resolved your issue.
Dear Robert,
thank you very much for this extension!
I’m trying to figure out how to move the block from the shipping block to another one here:
/checkout/onepage/review/info.phtml
So I suppose to change the following code in the checkoutcomment.xml, but I think to wrong something.
Could you please tell me where do I wrong?
<reference name="checkout.onepage.review.info"> <block type="checkout/onepage_review_info" name="mbcomments" template="magebase/checkoutcomment/shipping_comment.phtml" /> </reference>Thank you very much!
@Simone This extension is designed to work only on the shipping method step as it observes the “checkout_controller_onepage_save_shipping_method” event which is only fired when the shipping method is saved. If you want to move the comment block elsewhere you will need to change the observed event and observer code. There is a similar question in the comments above but I don’t know if the person has managed to create a solution for your scenario.
Thanks Robert for the tips,
could I ask you which fields should I modify in order to let it works in the last stage of the checkout process?
Thank you very much for your support!
My Best Regards
As outlined, it’s not about modifying any fields. This is a very simple extension which is why it is only designed to work on the shipping step. If you want to change this, you will need to make your own modifications and research ways to do this.
Great extension — everything seems to be working perfectly except … When I click on the Place Order button, I briefly see the “Submitting” message. Then it displays the button again, just as it was before I clicked it. If I click it again, I get a message saying that my shopping cart is empty. Checking the Admin dashboard, the order was submitted, but I don’t understand why it isn’t redirecting me to the Thank You page. I even tried disabling the comments extension, but it still does the same thing.
Any tips on how to troubleshoot this?
I seem to be getting the following JSON response when I click the PLACE ORDER button:
0;136;0c{"success":true,"error":false}Any chance this extension is somehow inserting the extra numbers?
This extension only observes an event at the shipping method stage and it is when the Continue button is clicked, that the comment is added to the order history. It does not execute anything on “Place Order”. Your problem is most likely due to some other code/customisations/extensions.
I have no idea how it got there, but I had that odd string at the very top of the Newsletter Observer.php file. Since I removed that, orders are now submitting properly.
Hi Robert,
Great job. Thank you fro this extension. It is working smoothly in my magento 1.7.0.2 community edition.
The comments box appears on the one page checkout but no result in the order for Magento 1.7.0.2, any ideas?
Same issue here. Comments field shows up during the checkout process after modification to :
app/design/frontend/base/default/template/checkout/onepage/shipping_method.phtml
Nothing in adminhtml though when viewing the individual order (nothing in the comments). This is CE 1.7.0.2. Pretty sure I can figure it out, but would rather just find something commercial that works. I will post a solution here if I run into it. This is a multi store setup with some custom shipping methods, so that may be having an impact.
Don’t want you to think I am complaining. Think it is awesome when developers release their stuff like free…and then have to put up with people bitching about it not being perfect
How are you testing this? Create order, Place, then check the customer order comments on the order page in the admin as per screenshot in the article.
We are using 1.12.02 version of Enterprise. I also get the comments box but it does not post to the order on order save. Any ideas?
We are using 1.12.02 version of enterprise version of magento. I installed this and it shows up on the front end, but the notes are not posted to the order. Ideas?
It’s difficult to say why it wouldn’t work for you. You could check your magento database to see if the comments have been added correctly to the sales_flat_order_status_history table. Look at the ‘comment’ field and check if you can see the comments starting with: “Customer Order Comment:…”
If you don’t find them, then they are not getting saved in the checkout_controller_onepage_save_shipping_method event in the module’s Model/Observer.php. I wouldn’t know the cause for this without looking at your specific situation. However, we don’t provide that level of support for these extensions.
Hi Robert,
I use 1.7.0 version.
After call function setCustomerNote(), it works to save comment in order, but the comment is not visible to customer dashboard (visible in front field is not set with this function).
How can i set it visible ?
Thanks.
Unfortunately, at the time of saving the shipping method, there is no order object created so the status history is created with default settings at the time when the order is placed, the quote converted to the order and all the objects saved. The methods that give us control over the history entry are in the Order model. So, the answer is, in short, you can’t set it visible at that point.
The purpose of this extension was to have a very small modification footprint, hence we used the built in concepts such as adding the comment to the order history, however, this imposes some limitations. Feel free to customize the extension to your requirements. I haven’t tried this but essentially, you could add another observer to observe the checkout_type_onepage_save_order_after event, retrieve the order history and set the isVisibleOnFront flag for that history entry.