Zen Cart Gift Wrap At Checkout
Gift Wrap at Checkout is a Zen Cart™ contribution which allows
a shopowner to provide and bill for gift wrapping services.
Donate! Show your appreciation by
supporting my efforts.
Relevance: Zen Cart™ 1.3.7 and forward.
Be sure to use the appropriate version for your cart version.
Cost: Free, but
donation appreciated
Installation Difficulty: Moderate
Location: Zen Cart Downloads page, under Other Modules.
Download: Gift Wrap on the Zen Cart Downloads Page
Current Version: 2.3 (for Zen Cart 1.3.7); 2.6_138 (for Zen Cart 1.3.8)
Support Thread: Gift Wrap Support Thread
FAQ: click here
Bugs: click here
Note: This module essentially obsoletes my old
Gift Wrap (version 1) module.
You are free to use the old one, but I think this one is much better.
Overview:
This contribution provides a very straightforward mechanism for
permitting your customers to select gift wrapping at checkout time.
The selection is done on a per product basis on the shipping page.
A checkbox is provided for each product to indicate whether or not
giftwrap is desired.
The advantage of this solution over previous solutions is that
individual wrapping attributes do not have to be added to each product.
Shipping Page displaying Gift Wrapping
Shipping Page displaying Gift Wrapping - duplicate and N/A items

For maximum flexibility,
one checkbox is provided for each product in the cart; if two
identical products are chosen, two checkboxes are provided.
Virtual products and downloadable products have "N/A" instead of
a checkbox.

Gift Wrapping can differentiate between downloadable and non-downloadable versions of the same item.
The computed total fee is shown as an order total on the payment page.
Payment Information Page displaying Gift Wrapping Fee
Finally, a summary of gift wrapping selection is done on the
confirmation page.
Confirmation Page displaying Gift Wrapping Details
Clicking the edit button will return the customer to the shipping
page where gift wrapping options may be changed.
If no gift wrapping has been chosen, this will also be indicated on
the confirmation page as follows:
Confirmation Page displaying no gift wrapping
After the order is complete, the gift wrapping settings may be viewed
on the account history page:
Account History Page displaying gift wrapping
The order confirmation
email will only show the number of each item selected for wrapping.
4 x Hewlett Packard LaserJet 1100Xi Linked (HPLJ1100XI) = $499.99
Wrapped: 2
Now that the order is complete, the wrapping selections may be viewed
by the Administrator in Admin->Customers->Orders->Edit and
Admin->Customers->Orders->Invoice.
Pricing Model

The gift wrap pricing model is very simple; in addition to the usual
"free over" setting, there is a per order
flat fee and a per item fee. Both or either can be used; in the
example shown, the flat fee is $5, and the per item fee is $1,
so a one item order, wrapped, would be billed at $6, two items at $7,
and so forth. Obviously these fees are only charged if there are
gift wrapped items in the order. The "free over" setting is used when its
value is set to greater than 0. In the configuration shown, free gift wrapping would be
provided to orders over $100.
Typical configurations:
- Two dollars per item: set flat fee to 0, per item fee to 2, free gift
wrapping to 0
- Five dollars per order: set flat fee to 5, per item fee to 0, free gift
wrapping to 0
- One dollar per item, free for orders over $100: set flat fee to 0, per item fee to 1, free gift wrapping to 100
Note that the define GIFT_WRAP_EXPLAIN_DETAILS from the file includes/languages/english/extra_definitions/giftwrap.php
should be used to explain your policies. This is the text your customers
will see when they click "Gift Wrapping Policies" in the Gift Wrapping options
section of the Shipping page (see the first image on this page).
If you need charge more for wrapping certain items or not provide wrapping at all for certain items, this can be done through the
user exits described below.
Note that if any gift wrapping is selected, a line item for gift wrapping
appears in the total even if there is no charge (to emphasize that the service
is being provided).
Gift Wrapping in Admin
In the Admin area, gift wrapping selections are displayed on the
Admin->Orders->Invoice and
Admin->Orders->Edit screens.

The items for which gift wrapping has been selected are shown
on the
Admin->Orders->Edit screen
in a
small table under the order (just above the order status box).
The same method is used to display this information on the
Invoice screen.
User Exits
The following exits are provided for customization:
- Disable gift wrapping by product id - exclude_product()
- Disable gift wrapping by category - exclude_category()
- Surcharge gift wrapping by product id - apply_product_wrap_surcharge()
- Surcharge gift wrapping by category - apply_category_wrap_surcharge()
Note that the word "category" in this case means "parent category."
Each of these is a PHP function within the file ot_giftwrap_checkout.php.
Examples are given in each function of how to use it.
If you are doing
this sort of change, be sure to document it in the
GIFT_WRAP_EXPLAIN_DETAILS define described above.
Bugs
FAQ
Q: I'm using a category exit (exclude_category() or apply_category_wrap_surcharge()), and it's not working!
A: Please see the
Category Issues
page for solutions.
Q: I'm upgrading from Gift Wrap 2.1 to a later version, but I can't see one of the new features!
A: Note your Gift Wrap settings, and then remove (Admin->Modules->Order Totals->Remove) and then re-install Gift Wrap at Checkout. New
database entries have been added which necessitate re-installation.
Q: Can I run Gift Wrap with another version of Zen Cart?
A: Gift Wrap modifies a lot of core files, so each version is aligned
with exactly one version of Zen Cart. You should run the version that's
appropriate for your version of the cart.
Q: I'm getting an error that looks like this:
Warning: Division by zero in ...includes/modules/order_total/ot_giftwrap_checkout.php on line 174
A: This is fixed in version 2.4. To fix it now, change the file includes/modules/order_total/ot_giftwrap_checkout.php line 173 from
if ($this->include_tax == 'true') {
to
if ($wrapfee != 0 && $this->include_tax == 'true') {
| Certificates of appreciation most welcome! |
|
|
If the information you learned reading this site is helping your store make
more money, please consider making a donation. Thank you!
|
Want more Zen Cart?
Tips and Tricks
Contributions
Extensions
Custom Software
Newsletter