Administrator
- Join Date:
- Feb 2006
- Location:
- Tampa Bay, Florida
- Posts:
- 10,682
- Plugin Contributions:
- 56
Gift Wrapping Contribution
There's a user exit called "exclude_product()" that you can add product ids to.
Views: 90,257
Administrator
There's a user exit called "exclude_product()" that you can add product ids to.
New Zenner
can you explain that a little further? Sorry, I'm a Zen Amateur...:(
Zen Follower
atomiksteve:
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/zencart_giftwrap_checkout.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:
// 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;
}
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:
// 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;
}
Save the file and upload it back to your server.
Thank you for the mod swguy. I had no problems installing it. Quick and easy.
Zen Follower
swguy:
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.
:clap: was not expecting you to address this issue so fast - thanks a million :clap:
Administrator
There will be new features for this module in 2009. Stay tuned. :smile:
New Zenner
VisExp:
I just figured this one out. You can find help here:
http://www.thatsoftwareguy.com/zencart_giftwrap_checkout.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:
// 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;
}
>
> 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:
>
> ```
// 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;
}
Save the file and upload it back to your server.
Thank you for the mod swguy. I had no problems installing it. Quick and easy.
Thanks! I was able to figure it out on my own later that night. I think the numbers are for Category IDs though, not Products.
Totally Zenned
atomiksteve:
Thanks! I was able to figure it out on my own later that night. I think the numbers are for Category IDs though, not Products.
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
Totally Zenned
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
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 -
Totally Zenned
:blush::blush: My bad... not admin, but catalog (order.php) - found my error - now to test and see where we are.
Administrator
rwoody:
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?
You may exclude either categories of products (by parent category id) or individual products (by product id).
Totally Zenned
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
New Zenner
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?
New Zenner
I got stuck with this error:
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.
I don't know what is going wrong.
Anybody to help me?
Administrator
You haven't installed all the files.
New Zenner
swguy:
You haven't installed all the files.
I did...twice. (22 files, excluding the .sgl and readme file)
The only file that causes this problem in /Admin/order.php
Even merged the giftwrap part from your download in to the original file.
I use Giftwrap 2.6-1.38 and Zen Cart v1.3.8a/v1.3.8
New Zenner
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
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
Administrator
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?main_page=download_contrib&contrib_id=407&update_id=8
it's much simpler to install. Here's the help:
http://www.thatsoftwareguy.com/zencart_giftwrap_checkout.html
New Zenner
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!
New Zenner
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!
New Zenner
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... :(
Fields marked required must be completed.
Tell staff why this post should be reviewed.
Required for login, security, and core site functionality.
Help us understand how the site is used so we can improve it.
Used for promotion and personalized campaign measurement.