Home » Magento tutorial for developer » How to Enable Gift Wrapping service for certain countries in Magento EE

How to Enable Gift Wrapping service for certain countries in Magento EE

I promised in one of my previous posts that I’ll share with you this nice feature about how to enable Gift Wrapping module in Magento Enterprise Edition, but for certain countries. So let’s extend it so merchants can easily enable this enhancement as they wish.

There’s one caveat about front-end look & feel. This enhancement is build on top of onestepcheckout Magento EE extension. It’s easy to set up everything for your needs (in case if you don’t use onestepcheckout extension) if you just follow logic in example mentioned bellow. Additionally, our request was that client wanted to remove checkbox for “Add gift options” and place radio buttons instead, where customers will have option to choose between “Basic” and “Luxury” gift wrapping service. In our example we’ll do the same. Feel free to modify everything for your own needs.

Let’s begin!

  1. Tell Magento about our module
  2. Create configuration file
  3. Create system xml file
  4. Create Helper class
  5. Tweaking front-end look and feel

1. Tell Magento about our module

Create file app/etc/modules/Inchoo_GiftWrapping.xml with the following content:

2. Create configuration file

Create file app/code/local/Inchoo/GiftWrapping/etc/config.xml with the following content:

3. Create system.xml file

Create file app/code/local/Inchoo/GiftWrapping/etc/system.xml with the following content:

Note that now you can see in Magento administration under System/Configuration/Sales/Sales/Gift Options tab new input field where you can specify desired amount for: “Gift Wrap Service is available in the following countries:“.

4. Create Helper class

Create file app/code/local/Inchoo/GiftWrapping/Helper/Data.php with the following content:

5. Front-end modifications

As I previously wrote, I did this enhancement on top of the onestepcheckout Magento EE extension. I’ll give you a JS code for it as well as modifications that I did.

Open file:app/design/frontend/enterprise/[YOUR_THEME]/template/onestepcheckout/checkout.phtml and find

(around line 600), replace everything with:

Now we’ve prepared most of our JS code required for onestepcheckout extension to work on desired way. Now we need to change checkbox to radio button and we need to add methodtoogleVisibilityOnObjectsCustom().

Open file: app/design/frontend/enterprise/[YOUR_THEME]/template/giftmessage/inline.phtml and replace:


In same file, app/design/frontend/enterprise/[YOUR_THEME]/template/giftmessage/inline.phtml, replace:


And that’s it. If you refresh your checkout page, you’ll notice that you can’t see anymore Gift Wrap functionality. That’s expected because now you need to go to administration and enable some/all desired countries that can get Gift Wrapping service. Go to Magento administration and under System/Configuration/Sales/Sales/Gift Options tab you’ll see new input field “Gift Wrap Service is available in the following countries:” where you can select desired countries.

You can see on default Magento EE installation with sample data and onestepcheckout extension how this looks like:

gift wrapping in magento enterprise

About Brian Wilson

Brian is a freelance Magento developer with 5 years of experience with customizing Magento extensions, magento themes. He's interested in sharing Magento Tutorials to the community

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

Scroll To Top