Gift Wrap 2.3_138 is now available in the downloads area. Please ONLY upgrade to this version if you are running ZenCart 1.3.8; otherwise, just run version 2.3.
That Software Guy
Printable View
Gift Wrap 2.3_138 is now available in the downloads area. Please ONLY upgrade to this version if you are running ZenCart 1.3.8; otherwise, just run version 2.3.
That Software Guy
A bug has been reported which affects storeowners who run with Gift Wrap include_tax = true in versions 2.2, 2.3 and 2.3_138 under php4. It is indicated by the error:
Warning: Division by zero in ...includes/modules/order_total/ot_giftwrap_checkout.php on line 174
The fix is identical in both versions: modify 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') {
This issue will be fixed in the next release.
The bug described above is not limited to PHP4; it can also occur in some configurations under PHP5, so if you use tax_included as a setting in gift wrap admin, please apply this patch.
Thanks,
Scott
Hello. I am just learning about this add on.
Can you help explain something? According to my PhPAdmin site my database is called: myusername_zc1
and in the readme file it says:
Run the sql script orders_wrap.sql in phpMyAdmin. If you have used
a prefix in your database, modify orders_wrap.sql to reflect this (e.g.
change "orders_giftwrap" to "zen_orders_giftwrap" if your prefix is
"zen_").
But I don't understand what to do. I'm not even familiar with phpadmin.
Step by step would be great.
Thanks!
Call your hosting company and ask, "How do I get to phpMyAdmin?" It might be on your CPanel if you run CPanel, it might be somewhere else, I don't know, but they will help you find it. Once you've found it, you should probably place an ad in Commercial Help Wanted for someone to install this mod.
i know where phpadmin is. I'm pretty capable with html, sql, css and php. I just don't know how exactly I'm to edit their script before running it.
any ideas?
You only have to edit the script if your database uses a prefix. Look in includes/configure.php to see if you've used a prefix value (look for DB_PREFIX). If you haven't, there's nothing to be done; just run the script.
I am trying to integrate giftwrap_2.3_138 with Fast and Easy Checkout 1.12a in Zen Cart 1.3.8a.
The gift wrapping block displays correctly. All the admin controls work correctly in both modules/order total and Fast and Easy Checkout Module Switch. I do not get any errors.
However when the items gift wrap checkbox is checked the gift wrapping is ignored and I get "no gift wrapping selected" on the final confirmation page. It seems somewhere in my merging I may have fudged something as the gift wrapping is not being passed properly.
Can anyone suggest where I should look?
I am using Gift Wrap with Pay Pal IPN. Orders are going through successfully, however, order details are not being recorded, meaning product attributes are not being recorded in the orders_products_attributes table and therefore not being recorded in the admin or invoice. If I enable credit cards on the site (only for test purposes, we are only using PayPal right now) it works just fine...orders with pay pal IPN are not. The Gift Wrap table is NOT being updated, however, but because the gift wrap is being entered into the orders_total table it still shows up on the invoice, and is therefore being correctly entered into paypal. Am I doing something wrong, did I miss something? I am using zen cart 1.3.7
I haven't added the IPN logic.
ah, that would explain it - I will revert to old method of adding gift wrap attributes to all products. Thank you for the speedy response.
I keep getting this error message in all my invoices...
1146 Table 'boinkit.TABLE_ORDERS_GIFTWRAP' doesn't exist
in:
[select orders_products_id from TABLE_ORDERS_GIFTWRAP where orders_id = '1008' and wrap = 1]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
I installed the gift wrap module, but decided not to use it at this point (and have removed/de-activated via the admin).
Can anyone tell me how to remove this error message from my invoices and packing slips, as i don't want to send them out to customers with this show.
Many thanks!
Looks like you started deleting things before using the admin to turn the feature off. You still have the giftwrap copy of admin/invoice.php. Be sure you have replaced ALL the files with original untouched copies.
I haven't un-installed anything yet, all the files from the mod are still there.
I only changed the option in admin -- 'Order Totals' and told it to remove the gift wrap module. No other changes have been made at all.
Any ideas?
You dropped the table. If you're going to drop the table, you need to revert the files. If you don't want to revert the files, you need to recreate the table.
My zencart version 137, I am using Gift Wrap version 2.3. I hit the fatal error during checkout :-
Fatal error: Cannot redeclare class order in /home/angguguc/public_html/momsworld/shop/includes/classes/order.php on line 1031
Please advise. Thanks in advance.
During installation, you must either remove the original copy of includes/classses/order.php or rename it to something that doesn't end with .php. For instance, includes/classes/order.php.orig is the naming scheme I use if I want to preserve the original copy of a core file. I suspect you renamed it to (say) includes/classes/order_orig.php, which won't work.
When I wrote this I put in the infrastructure for adding wrapping paper selection (so you wouldn't have to change the database again), but haven't done it yet. It's on the list.
:huh:Hello everyone. I pretty well know the basics of adding mods to zen cart. But guess I am missing something on this one.
Looking under Order Total and can't find anything in Admin relating to Gift Wrapping.
What am I doing wrong?
:smile:Never mind. Will be making a contribution for this excellent mod. Found my own mistake.
Thank you.
I have installed Gift Wrapping on zc1.3.8a with FEC 1.15(Fast and Easy Checkout) and ESL 1.16b(Easy Sign Up and Login).
It does not seem to be working correctly so I would like some help finding where I went wrong.
You can view the test site here:
http://drhenslin.com/zc138a/
Problem Description:
When a customer clicks the checkbox for gift wrapping an item, the page auto-refreshes and the Gift Wrapping Charge is seen in the "Shopping Cart Contents" box. The auto-refreshing of the page seems odd to me, is that the way it is supposed to work?
However after the page refreshes and updates the Order Total the checkbox for the item selected to be gift wrapped is not checked, to indicate the item has been selected to be gift wrapped.
If another item is then checked to be gift wrapped the page will refresh again but the order total does not add the charge for gift wrapping the item. No subsequent checks on gift wrapping items are calculated in the order total.
I have the Gift Wrap options set:
Gift Wrapping Flat Fee: 0
Gift Wrapping Per Item Fee: 4
Can anyone provide me with some help?
I have heard before that Gift Wrap doesn't play well with FEC, which is not surprising; they're both large customizations. You might ask the FEC guy if he has time to debug this.
Can someone provide a link to a store with Gift Wrap 2.3_138 module running so I can see how it is supposed to work?
Hi swguy, great mod!
however I have a bit of a problem, probably user error (me) but not real sure what to look for. (not very good with code) :unsure:
everything works on the customer side when placing an order, however when viewing history, it doesn't show the table of products gift wrapped within order view as indicated
"Account History Page displaying gift wrapping"
On the admin side, although I placed an order of 3 products and indicated by checkbox only two of the products be gift wrapped, when I go to view the order on the admin view order screen there is no table indicating the products which need to be gift wrapped. the only thing I see is a statement saying "no gift wrapping selected". (even though gift wrapping was selected).
I do use the mod, super orders and am pretty sure that I have added the gift wrap code to the super_orders.php file properly but maybe not??.
Do you have any idea's as to what may of happend.
Your help would be much appreciated.
TIA
Be sure it works in orders (not super orders). If so then recheck your merge with super orders.
Thanks swguy
doesn't work with just orders.php either. have checked the merged code for super_orders and it appears to be as it should be. The only other thing I can think of is that I also use timezone offset mod.
below is a section of code that is also in the orders.php file which relates to the timezone offset mode. Please check to see if anything in this would conflict with the gift wrap code.
This is the only bit of code that is different in the orders.php fileCode:$db->Execute("insert into " . TABLE_ORDERS_STATUS_HISTORY . "
(orders_id, orders_status_id, date_added, customer_notified, comments)
values ('" . (int)$oID . "',
'" . zen_db_input($status) . "',
date_add(now(), INTERVAL " . TIME_ZONE_OFFSET . " HOUR),
'" . zen_db_input($customer_notified) . "',
'" . zen_db_input($comments) . "')");
$order_updated = true;
}
If you don't see it in admin then I suspect you've merged includes/classes/order.php incorrectly; this is where the records get inserted. If you get "no gift wrapping selected" then the query
select orders_products_id
from " . TABLE_ORDERS_GIFTWRAP . "
where orders_id = '" . zen_db_input($oID) . "' and wrap = 1");
returned zero records. Trace this back.
I copied files, set it up in admin, ran the script. No gift wrap option showing in step 2 of checkout. No errors. I renamed the .sql file with the prefix... nothing. Suggestions?
A bug has been found in Gift Wrap version 2.x which affects carts using PayPal IPN. Please move the file
includes/extra_configures/giftwrap_tables.php
to
includes/extra_datafiles/giftwrap_tables.php
A new zip file containing this fix (for Zen Cart 1.3.8) has been submitted and will be available shortly.
Hello
This mod is fantastic.It was working very well till yesterdayBut now, suddenly it stopped working...
To be precise, I installed stock by attributes and it stopped working after that .
Any pointers please
Help is appreciated
Pat
The message says the table doesn't exist. The way to get rid of this message is to re-create the table (download the contribution and re-run the SQL). You must have only half-installed it when you set it up.
Thanks for the excellent work on this.
One small request: Is there any way to show on the packing slip that gift wrapping was selected. We're in a situation where the emails coming in for the orders are processing in an office with somebody else picking the orders for dispatch. We have had a couple slip through that should have been wrapped.
( Totally our own fault !!!!! but it would be ideal to have gift wrap show on the slip the packer is using )
Thanks
Pat
This is an excellent suggestion. I'll add it to the next release.
The 1.3.8 version of this module (version 2.6_138) has been updated to print the gift wrapping settings on the packing slip. The readme also contains instructions for updating super_packingslip.php for Super Orders users.
Hi, is there a way to turn off the Gift Wrapping option for certain items? For instance, my company is offering holiday gift boxes that are already wrapped. Any assistance you can provide is much appreciated!
There's a user exit called "exclude_product()" that you can add product ids to.
can you explain that a little further? Sorry, I'm a Zen Amateur...:(
I just figured this one out. You can find help here:
http://www.thatsoftwareguy.com/zenca...html#userexits
You need to open the file ot_giftwrap_checkout.php You can find it in the includes/modules/order_total folder.
Look for the following code:
Then change 99998 to the product ID of the product you wish to exlude from gift wrapping. Assuming your product ID is 199 the new code would look like this:Code:// Add products you wish to not offer wrapping for to this list.
// Go to Admin->Catalog->Categories/Products->[Your category]
// and look at the left hand side of the list to determine
// product id. Note that 99999 and 99998 are just given
// as examples. By returning true, we exclude these products.
function exclude_product($prid) {
$id = (int)$prid;
switch($id) {
case 99998:
case 99998:
return true;
}
return false;
}
Save the file and upload it back to your server.Code:// Add products you wish to not offer wrapping for to this list.
// Go to Admin->Catalog->Categories/Products->[Your category]
// and look at the left hand side of the list to determine
// product id. Note that 99999 and 99998 are just given
// as examples. By returning true, we exclude these products.
function exclude_product($prid) {
$id = (int)$prid;
switch($id) {
case 199:
case 99998:
return true;
}
return false;
}
Thank you for the mod swguy. I had no problems installing it. Quick and easy.
There will be new features for this module in 2009. Stay tuned. :smile:
Are the numbers for the product IDs or Cat IDs. I would like to install this and exclude several categories. I'm hoping you are correct as there are several categories that I can't offer this option due to coming direct from the distributor who does not offer gift wrap as an option.
Can anyone verify this for me?
Thanks
I'm working through the files to install this contribution, and as always I first try to read through all the post "before" installing a new contribution to be made aware of issues I might encounter. In doing so I noted the code mention for admin/includes/classes/order.php in post 131
- I have just done a compare on that file due to previous modifications I have made to the file, in order to merge gift wrap changes and realized the file I have in the download for giftwrap is untouched. There is no reference that I can see for the Gift Wrap Table and I don't see anything in the Readme file referencing modifying that file.PHP Code:
select orders_products_id
from " . TABLE_ORDERS_GIFTWRAP . "
where orders_id = '" . zen_db_input($oID) . "' and wrap = 1");
I completed the install using the provided file, and low and behold, no reference in the admin. Can someone provide me with a correct copy of that file, admin/includes/classes/order.php or the complete code that needs to be modified and/or included?
Thanks in advance -
:blush::blush: My bad... not admin, but catalog (order.php) - found my error - now to test and see where we are.
I see you don't sleep like normal folks either...LOL - It turns out this is not going to play pretty with FEC - I saw your post on that earlier - seems odd though, he went to all the trouble to add a config to turn on your contribution if installed in his.
Oh well... I've posted over there to see if there is a short solution - this site needs that contribution updated also, but not during the holidays...LOL
Take care Scott!!
Ruth
I'm having a problem. Everything is showing up like it's supposed to, but upon checkout the price for the gift wrapping is not being added and it is saying that no gift wrapping is selected. I am NOT using FEC but I AM using stock by attributes. Has anyone having a similar problem found a fix?
I got stuck with this error:
I don't know what is going wrong.PHP Code:
1146 Table 'store.TABLE_ORDERS_GIFTWRAP' doesn't exist
in:
[select orders_products_id from TABLE_ORDERS_GIFTWRAP where orders_id = '7' and wrap = 1]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
Anybody to help me?
You haven't installed all the files.
Hi there, I have been searching for a module for gift wrapping - thank you SO much! But... I am having a problem understanding a vital step in the configuration. I want gift wrapping for ALL products - ALL categories, so that makes it simple, but I just can't get it - Please help! Zen 1.38
Mod Configuration
The module is configured under Modules->Order Total->Gift Wrap
1. Choose a fee for gift wrapping
2. Enter the ID number of the gift wrapping option name in the Gift Wrapping Option Name ID field.
3. Enter the ID number of the gift wrapping requested option value in the Gift Wrapping Option Requested Value ID field.
4. If you have more gift wrapping options (such as "Premium" or "Add Ribbon and Bow", as described above), you will add these later outside the admin screen.
5. By default the sort order is just below "Shipping" on the checkout page. If you wish to move it, be sure you keep it above "Tax" if your "Re-calculate Tax" is set to "Standard."
I do not see WHERE the Gift Wrapping Option Requested Name Value ID field is? It is not an option after I install and edit the module - is it somewhere else? I know that the ID's have to go somewhere for this to work... Perhaps even where I would put the categories in the php file - and which one? I looked in the ot_checkout - but I don't know where to put them?
I did install the .sql through zencart admin - what am I doing wrong? Thank you so much
You're using an older copy of Gift Wrap. If you're doing all products just grab the latest one here:
http://www.zen-cart.com/index.php?ma...07&update_id=8
it's much simpler to install. Here's the help:
http://www.thatsoftwareguy.com/zenca..._checkout.html
Thank you for your unbelievably speedy response! So sorry to bother you again but I'm using Version: 2.6_138 that's the latest isn't it?- MY module looks the same as the one pictured... I don't think it's a "version" dysfunction - it's a "me" dysfunction - Apparently I didn't set something - I check "gift wrap" and price is still not being calculated - can you PLEASE tell me what the settings should be outside of your module? attributes, products? I still don't know where to enter the below? Number 2. and 3. are in the "module configuration" instructions, but there is no where in the module to put the ID numbers? Is this done somewhere in attributes? This is really killing my day - help!
2. Enter the ID number of the gift wrapping option name in the Gift Wrapping Option Name ID field. for ex?
3. Enter the ID number of the gift wrapping requested option value in the Gift Wrapping Option Requested Value ID field. for ex?
Ok , you are NOT going to believe this (oh I'm sure you've heard it all) the files for your module were NOT rewriting to my FTP - It's always about permission in this world - thank you kindly for your time!
i've installed the gift patch...
but now for my hebrew version of the site it displays a blank screen for the payment choosing screen :-S
i'm using zencart 1.3.8...
i've copied the neccery files from the english folders to the hebrew ones... :(
I would like to have this to my zencart. I upload all the new files. But I still cannt see Gift Wrap at the Order Total Module. Anybody can help?
:no:
I want to add the option at checkout to inlcude a greeting card like a birthday or anniversary card and message. Is t his something I can use this module for and if I don't need gift wrapping at all is there a better way to to do this? I don't want to charge for the card i just want to make it easy and noticable,
thanks
This contribution is really for wrapping. If you just have a no-charge card option, I would just update the special instructions to indicate this.
Hi Scott,
Thanks for this contribution~:bigups:
I'm running 1.38 and stock by attributes. I had no issues installing the GW mod, and have merged my code. I have also installed the module via Admin/Modules/Order Totals.
On the shipping page (Step 1) - everything is good and well. I see the GW checkboxes (which i can check).
However, when I get to payment page (Step 2), the GW label + total are missing and not reflected in the order total.
From here if I complete the checkout - the invoice totals do not reflect GW. This is also the case when i check the orders via admin.
Any pointers to which code to look at?
Thanks.
erko
Is the order total module turned on? (Admin->Modules->Order Total - gift wrapping must be installed.)
Lovin your work, I have an earlier version of this running on ZC 1.3.7 (too many core files edited - but thats another story)
Can anyone say if they have had this running with
Stock by Attributes (http://www.zen-cart.com/index.php?ma...roducts_id=310)
I have encountered an issue upon install of the SQL patch, which I think is related -I got the error:
If anyone can help get this going I would be greatly appreciative :wink2:Quote:
1062 Duplicate entry 'STOCK_SHOW_LOW_IN_CART' for key 2
in:
[INSERT INTO zen_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('Show available stock level in cart when less than order', 'STOCK_SHOW_LOW_IN_CART', 'false', 'When customer places more items in cart than are available, show the available amount on the shopping cart page:', '9', '6', NULL, now(), NULL, "zen_cfg_select_option(array('true', 'false')," );]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
If I canot get these 2 working together, is it OK to leave the files in place or will this cause further issues?
Thanks
Chris
Sorry, being a numpty, not related to this add on at all :oops:
I just installed Gift Wrap Contribution 2-6_138 to my Zen Cart 1.3.8a and I get a blank page on checkout_shipping. When installing the module, I ran the sql script through Zen Cart Admin Install sql Patches rather than phpMyAdmin. It appears that the script executed correctly. My orders_giftwrap table has been set up with the orders_giftwrap_id, orders_products_id, orders_id and wrap field.
Is my error in the sql table or should I be looking somewhere else? Any help would be appreciated.
I have no way of knowing where the problem is. You should follow the blank page debugging instructions.
https://www.zen-cart.com/tutorials/index.php?article=82
Thanks for the quick response. I wasn't aware of the debugging error logging tool.
The debug error I get is as follows:
[17-Sep-2009 11:33:42] PHP Fatal error: Cannot redeclare class order in /home/lcstesti/public_html/development/store/includes/classes/order.php on line 1061.
My best guess is that it is a conflict between this module and a Gift Registry module I installed which also modified /includes/classes/order.php. I will research this further to see if I can resolve.
My guess? Edit ./includes/modules/pages/checkout_shipping/header_php.php and change
require(DIR_WS_CLASSES . 'order.php');
to
require_once(DIR_WS_CLASSES . 'order.php');
Then see if there are other instances of include or require order.php and change them to include_once or require_once.
Your guess better than mine! I modified ./includes/modules/pages/checkout_shipping/header_php.php from
require(DIR_WS_CLASSES . 'order.php'); and
require(DIR_WS_CLASSES . 'shipping.php');
to
require_once(DIR_WS_CLASSES . 'order.php'); and
require_once(DIR_WS_CLASSES . 'shipping.php');
and this resolved the blank screen issue. Thanks so much for quick response and help!
Can Anyone help me merge two modules?
I already have The Timezone Offset which I have to have and I would like to add the Giftwrap module. One file exists in the two mods, order.php. I have been through the forum and I can see the answer is to merge the two files but its too hectic for me. If anyone has done this can I have a copy of your file?
Cheers
Steve
Hi
I am having the same problem I just installed Gift Wrap Contribution 2-6_138 to my Zen Cart 1.3.8a and I get a blank page on checkout_shipping. I used the Black page debug Tool and I am getting the following error
---------------
PHP Fatal error: Cannot redeclare class order in /usr/local/pem/vhosts/200456/webspace/httpdocs/Shop/includes/classes/order.php on line 20
--------------------
require_once(DIR_WS_CLASSES . 'order.php');did not work
Any help would be appreciated.
Thanks
Tony
##############################
You have installed another mod that includes the class order after gift wrapping then.
Thanks for a quick reply
Gift wrapping was the last Mod I installed.
However, I just noticed that when you are buying a gift certificate you do not get the blank checkout page however if you are buying a regular item or a Free shipping item you get a white screen at checkout.
Thanks
Tony
I am wondering if I can give my customers of choice of paper? If I can...how do I show them the selection to choice from?
Thanks for any help!
I haven't added this feature yet; it's on my list of things to do.
okay, thanks!
Sounds like you've got the mod I'm looking for - and this is the feature I REALLY am looking for - gift wrap options! What type or color paper (with corresponding pictures), what ribbons/decorations etc. I presume a set of radio buttons to select an option from each.
Any indication when this new feature might be added? :blush:
I'd second that. Perhaps if we tried getting a few people together, who would be willing to pitch in some cash? I'm not sure how acceptable that is in this forum, so correct me if I'm wrong, but it seems like a good idea. A few of us would be more than willing, I'm sure. If we all donate, it could be worth a few hundred bucks, and surely that isn't something to be scoffed at?
If you go to my home page, browse one of my README files, or look at the extended help for any of my modules posted on my web page, it's pretty easy to figure out how to make a donation in support of the free software I write. And yes, a steady stream of donations would allow me to spend more time writing free software.
I have really promised the Zen Cart guys that I would work on the BeanStream module, and this work is horribly overdue, so you're not going to see new gift wrapping features by the end of the month. But certificates of appreciation via Paypal would help create forward momentum on this project.
I'll do that swguy, and in the meantime, look forward to the upgrade in the future! :smile:
In the meantime, it just occured to me that this is already possible, albeit in a rather "old fashioned way" with Zen Cart.
I haven't tried it, but surely it's possible to add "Gift Wrapping Attributes", and just have a few different attributes, for example:
- None ($0)
- Birthday Wrapping Kids ($2)
- Wedding Wrapping ($4)
- Christmas Wrapping ($2)
etc etc and of course have it set to "None" by default, so customers will have to select attributes of wrapping if they want it - admittedly prior to checkout.
I think the problem with this way that you mentioned above is that it will be a selection on the product page. It would be much easier to add to the shopping cart page (like swguy's mod) where they then can decided on which items in their cart they want gift wrapped and by which gift wrap option.
We have been getting a lot of orders for gift wrap. We have to check the comments section to see if they want the b-day gift wrap or the holiday wrap. Sometimes it is hard to tell if they say just "Love Aunt Bo and Uncle Grit".
I've obviously done something wrong somewhere along the line - finishing an order as a test customer results in
Which leaves me a bit confused, since there's no 'orders_id' table in the sql I ran, only 'zen_orders_id'! I was pretty sure I edited the sql in the way the instructions said to - here's the modified orders_wrap.sqlCode:1054 Unknown column 'orders_id' in 'field list'
in:
[INSERT INTO zen_orders_giftwrap (orders_id, orders_products_id, wrap) VALUES ('4', '11', '1')]
All I did was add 'zen_' to each reference I could see to a filename, as my cart was auto-installed with Fantastico which automatically adds that prefix.Code:DROP TABLE IF EXISTS zen_orders_giftwrap;
CREATE TABLE zen_orders_giftwrap(
zen_orders_giftwrap_id int(11) NOT NULL auto_increment,
zen_orders_products_id int(11) NOT NULL default '0',
zen_orders_id int(11) NOT NULL default '0',
zen_wrap int(11) NOT NULL default '0',
PRIMARY KEY (zen_orders_giftwrap_id),
KEY zen_idx_orders_id_orders_prod_id_giftwrap (zen_orders_id,zen_orders_products_id)
) TYPE=MyISAM;
Anyone offer any advice? I can't just not use this mod until I work it out because in Order Total Modules it only offers 'Yes' to 'Do you want to offer Gift Wrap - there isn't a 'No' option!
Fantastico adds zen_ to the table name not the field names.
Rerun the orders_wrap.sql through your admin panel under
Admin->Tools->Install SQL Patches.
This takes care of the prefix stuff.
The Beanstream mod is done. Gift wrap fans will be happy to hear I'm prototyping how to offer wrapping paper choices with tasty AJAX goodness. Stay tuned.
Help! A customer has just placed an order and I believe the Gift Wrapping module is causing an error to be displayed AND the customer to be over charged.
Background info -
Zen Cart Version: 1.3.8a
Gift Wrap version: Version 2.6_138
Site and ordering, including confirmation screen, was working fine. Shop owner asked me to install GIft Wrapping module.
After installation, everything seemed to work fine. Only I never processed a REAL order (right through to ACTUAL payment) for testing.
NOW, a customer has just placed the following order...
ISSUE part 1
The order was processed with a price that is FAR too high!
(text below copied from order recorded in Admin > Customers > Orders)
Products: 1 x Maileg Vintage style Soldier ToyRattle
Model: [blank]
Tax: 10%
Price (ex): $31.82
Price (inc): $35.00
Total (ex): $31.82
Total (inc): $35.00
Sub-Total: $79.95
Flat Rate (within Australia) (2-3 days): $8.50
Gift Wrap: $4.95
GST (tax): $7.77
Total: $93.90
I checked the merchant facility at the bank's website and the order was processed at $93.90.
NOTE: Not sure if this is related to the gift-wrapping module, but it didn't happen before this module was installed.
Issue part 2
After discovering this problem, I placed an order myself for the item next to it (identical in every way, including stock, but different color). I am in
the same zone as the previous customer, and selected everything the same as she did, including gift wrapping.
Products: 1 x Maileg Vintage style Princess Toy Rattle
Model: [blank]
Tax: 10%
Price (ex): $31.82
Price (inc): $35.00
Total (ex): $31.82
Total (inc): $35.00
Sub-Total: $35.00
Flat Rate (within Australia) (2-3 days): $8.50
Gift Wrap: $4.95
GST (tax): $3.68
Total: $48.95
As you can see, my order calculated to the correct amount (I think, I'm terrible with maths and tax!)
IMPORTANT CLUE no.1
After I placed my order, I did not get the usual confirmation screen. Instead, I got an error message reading as follows:
Code:1146 Table 'sqsq1343_zc1.zen_orders_giftwrap' doesn't exist
in:
[INSERT INTO zen_orders_giftwrap (orders_id, orders_products_id, wrap) VALUES ('7', '7', '1')]
IMPORTANT CLUE no.2
When I go into Admin > Customers > Orders, I see the following error at the top of the page:
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.Code:1146 Table 'sqsq1343_zc1.zen_orders_giftwrap' doesn't exist
in:
[select orders_products_id from zen_orders_giftwrap where orders_id = '7' and wrap = 1]
NOTE: In both "important notes" above, the order id "7" is my order. The order id for the customer is "6".
Can anyone tell me what is going on?! I'm extremely panicked and have a store owner most upset!
Any help/solutions would be GREATLY appreciated!
Thanks in advance,
Stanbridge, The Worried
Hi All,
I think the calculation bug could be put down to the following post...
http://www.zen-cart.com/forum/showthread.php?t=83928
The errors I'm getting on this screen are most likely unrelated. Please feel free to correct me if you think I'm wrong.
I have looked in phpMyAdmin and can see that the table named "zen_orders_giftwrap" doesn't exist, however, "orders_giftwrap" does.
Can I simply rename this table to fix the problem? Or will I also have to manually key in records up to no 7 (the current highest)?
Also, I forgot to mention last time since receiving these errors both myself and the store owner (each with separate admin accounts) never received email notification of new order. I suspect the missing table error stopped this program from getting this far.
Again, any info is very much appreciated!
From the README file:
3. Only perform this step if you have never installed Gift Wrap 2.0 or
greater:
Run the sql script orders_wrap.sql in phpMyAdmin. If you have used
a prefix in your database, modify orders_wrap.sql to reflect this (e.g.
change "orders_giftwrap" to "zen_orders_giftwrap" if your prefix is
"zen_").
Yep, remembered seeing that in the readme file but didn't realise I had anything prefixed with "zen" - mainly because I had never consciously prefixed anything myself.
So now that two orders have come in, to resolve the issue, do I...
1) rename the table (and nothing else)?
2) rename the table AND update a value/s in the table manually?
3) Run the SQL script again?
Thanks for the speedy reply mate!
Cheers
Stanbridge
Clearly you should rename the table.
I would further recommend you set up and maintain a test site so you can stage mod installs before going live. This will allow you to debug the other problem(s) you're having without affecting the client's site. I would also recommend you start running small transactions on the live site after you make changes like this instead of just assuming you haven't broken something. You can always refund them after you're done.
Thanks SWGUY! Renamed the table (didn't touch any field values or anything) and all appears to be working brilliantly!
You're quite right about setting up a testing site. I should have known better. Also, I didn't even think about the ability to refund credit card amounts on test purchases. I'm new, can you tell? :blush:
I just tested and all works well. The unrelated tax issue appears to be resolved now too.
Once again mate, thanks very much for your help! You're a legend!
Cheers,
Stanbridge