Contributions
osC_GiftWrap_v1.0
WHAT WILL IT DO?
This GiftWrap Module Addon will provide the option of adding GiftWrap to the Order during
the Checkout Process.
<- osCAdmin ->
This Addon contains...
1 new Order Total Module - ot_giftwrap.php
2 new GiftWrap Modules - giftwrap.php and nogiftwrap.php
1 new Class file - Gift.php
All of which are controlled via osCAdmin under Modules. You will see that a new
GiftWrap Option will appear in osCAdmin under Modules and a new GiftWrap selection
in Modules -> Order Totals. Each of these new Modules needs to be activated to work
correctly! Make sure you adjust your Order Total Sort Options to display your Order
Total options in the right order.
<- Checkout ->
A new box is created on the Checkout Shipping Page asking... "Would like to GiftWrap
your Order?" There are two options, GiftWrap or No GiftWrap. Each with an associated
cost configured in osCAdmin. The GiftWrap amount is applied to the Order and appears
on the Checkout Confirmation Page, both in the Shipping Summary and in the Order Totals.
This same information will be included on the Customers Order Invoice and Packing Slip.
If you find any bugs or errors, please email me.
Expand All / Collapse All
-- added history doc
-- cleaned up install docs
-- added comments around new code
-- added price fix display
-- bundled percent mod in contrib
-- bundled by item or weight mod in contrib
no code changes, just cleaned and rolled up into one complete package. Thanks to all the previous contributors!
Full Package
Added Logic for GiftWrap Add-On by: ggbig(maestro) from ContributionCentral
http://www.contributioncentral.com
-------------------------------------------------
This update was inspired by the "Gift Wrap Fee Per Item" by: dwsmart
What this update does is add logic to the osC_giftwrap add-on that will allow the checkout_shipping.php page to show a GiftWrap Price
based on three distinct set of rules.
First is that when/if the store owner wants to charge by the total weight
of all products in the cart you simply set the "GiftWrap by Weight" to True in the Admin/Modules/Giftwrap settings page, and this will happen.
Second is a two stage statement (given that now the "GiftWrap by Weight" is set to False) that descerns if the number of products in the
cart is 1 or greater than 1 and acts accordingly.
If there is only 1 item in the cart it charges the customer the GiftWrap Price One Time only.
If there is more than 1 item in the cart it charges the customer the GiftWrap Price for each item in the cart.
I really hope everyone likes this addition and gets alot of added use to an already very kewl contribution.
the catalog/includes/modules/giftwrap/giftwrap.php is included in the zip for easy ftp file replacement, along with the needed install doc to manually update your copy, njoy!!!
Instead of charging the fee once, it charges it for each item in the cart.
This is just the modified giftwrap.php file, and instructions, please install full version first
(not percentage version)
change fixed price for giftwrap to percent.
now you put the amont off percentage and it' add to total cost.
thank to oneil for the piece of code.
all credits are for original author.
full package read the "readme" for install and read me add on for the percent integration.
angel2005
This corrects the display of the gift wrap price, it was displayed with tax even though show prices with tax was false.
In admin/checkout_shipping:
Find:
if ( ($quotes1_size > 1) || ($n2 > 1) ) {
if (DISPLAY_PRICE_WITH_TAX == true) {
$gift_tax_rate_tmp = tep_get_tax_rate(MODULE_ORDER_TOTAL_GIFTWRAP_TAX_CLASS);
$gift_tax_amt_tmp = $quotes1[$i]['methods'][$j]['cost'];
$gift_tax_amt_tmp += tep_calculate_tax($quotes1[$i]['methods'][$j]['cost'], $gift_tax_rate_tmp);
Change to:
if ( ($quotes1_size > 1) || ($n2 > 1) ) {
if (DISPLAY_PRICE_WITH_TAX == 'true') {
$gift_tax_rate_tmp = tep_get_tax_rate(MODULE_ORDER_TOTAL_GIFTWRAP_TAX_CLASS);
$gift_tax_amt_tmp = $quotes1[$i]['methods'][$j]['cost'];
$gift_tax_amt_tmp += tep_calculate_tax($quotes1[$i]['methods'][$j]['cost'], $gift_tax_rate_tmp);
*** just added single quotes around true.
1) Overcome the issue of the VAT/sales tax not being calculated in the total VAT/sales tax for the order in the checkout_confirmation screen.
2) Fixed the sort order problem
3) Fixed the conflict between shipping and giftwrap in the checkout_shipping page.
It would be nice to see someone find a way to include a text box, whereby the customer can write a short note which can be attached to the package. I have not got round to this, but it would make this contribution more complete.
removed failure in module "nogiftwrap". It's now working fine...
all Credits to Randy Newman and Sharon Lane
Fix to readme file documentation
This is the GiftWrap module that allows the customer to choose the option to have an item giftwrapped at an additional fee. Modifications were made to the original release to allow it to work for osC2.2 MS2
This is the original GiftWrap modification that has been modified to work properly in osCommerce 2.2 MS2.
Directory designations have been changed and the description of the modifications has been changed considerably to enable a smooth installation for this release, even if modifications have been done.
WHAT WILL IT DO?
This GiftWrap Module Addon will provide the option of adding GiftWrap to the Order during
the Checkout Process.
<- osCAdmin ->
This Addon contains...
1 new Order Total Module - ot_giftwrap.php
2 new GiftWrap Modules - giftwrap.php and nogiftwrap.php
1 new Class file - Gift.php
All of which are controlled via osCAdmin under Modules. You will see that a new
GiftWrap Option will appear in osCAdmin under Modules and a new GiftWrap selection
in Modules -> Order Totals. Each of these new Modules needs to be activated to work
correctly! Make sure you adjust your Order Total Sort Options to display your Order
Total options in the right order.
<- Checkout ->
A new box is created on the Checkout Shipping Page asking... "Would like to GiftWrap
your Order?" There are two options, GiftWrap or No GiftWrap. Each with an associated
cost configured in osCAdmin. The GiftWrap amount is applied to the Order and appears
on the Checkout Confirmation Page, both in the Shipping Summary and in the Order Totals.
This same information will be included on the Customers Order Invoice and Packing Slip.
If you find any bugs or errors, please email me.
Note: Contributions are used at own risk.