Home » Magento Extensions » How to enable free Gift Wrapping service in Magento Enterprise Edition

How to enable free Gift Wrapping service in Magento Enterprise Edition

Maybe you’ve wondered how not to charge for the Gift Wrapping Services for customers that have more items in their cart. We’ve gotten a request where client wanted to provide free Magento Gift Wrapping Services (Gift Card, Gift Wrap, Gift Message) for their customers with total basket value above a certain limit. If you are wondering how we did it, keep reading this tutorial by Inchoo.

gift wrap option in magento

Shortly about Gift Wrapping module, from Magento Enterprise Edition User Guide:
“In Magento Enterprise Edition, store customers can select a gift message and/or gift wrapping for the entire order, as well as for separate order items, and a printed card, such as a picture post card, to the order. You can process the gift wrapping and printed card, and charge customers for them, as well as add gift messages, gift wrapping, and a gift card in orders that are created from the Admin Panel.
This feature was introduced in Version 1.10 of Magento Enterprise Edition.”

Basically we’ll need to rewrite one model and we’ll need to create our helper class which will check for us can we show Free Gift Wrapping Service – only if value of items in basket is above certain limit.

  1. Tell Magento about our module
  2. Create configuration file
  3. Create system.xml file
  4. Rewrite Required Model
  5. Create Our Helper class
  6. Tweak frontend look and feel

So let’s start.

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: “Charge for Gift Wrap Service if the basket value is under“.

4. Rewrite Model

Create file app/code/local/Inchoo/GiftWrapping/Model/Total/Quote/Giftwrapping.php with the following content:

5. Create Helper class

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

And for the end we can tweak desired frontend look and feel :)

6. Front-end modifications

For example you can open file: app/design/frontend/enterprise/[YOUR_THEME]/template/giftwrapping/checkout/options.phtml and add 2 modifications (you don’t want to change core file – if you don’t have one please copy one):
1) in gift-wrapping-container area you can replace with:

and 2) in gift-options-container area you can replace with:

Now your customers will see “Free” price instead of regular one on checkout page for Gift Wrapping service & Printed Card feature.

And as the end result you might come up with something similar to the next screenshoot:

gift wrapping option magento

 Note that for production ready code you’ll need first to check and decide which amount should be default for your base currency, otherwise system might show free of charge Gift Wrapping Service.Did you have any similar request? How have you handled it?In the next posts I’ll show you how you can enable Gift Wrapping module only for customers from certain countries, so stay tuned!

About Brian Wilson

avatar
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