Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Gratuity


Jack_mcs

Recommended Posts

This is the support thread for the Gratuity contribution, which provides an option on the checkout payment page where the customer can enter an amount they would like to add to the total of the order as a tip.

 

Jack

Edited by Jack_mcs

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Thanks for letting me know. I wasn't sure if it would be useful to anyone but I'm pleased to know it is.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

I have installed the add-on and it works great in the checkout_payment.php but how can I work with the data in the checkout_process.php

 

I would like to know if this add-on can be used to send the tip amount to the user in the Purchase Email and what code will be needed to do this

 

It would also be nice if the data was added in the user order information

 

Thank you for any help with this project

 

:blink:

Link to comment
Share on other sites

The gratuity amount shows in the order and email here. Perhaps you didn't set the sort order correctly?

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

The gratuity amount shows in the order and email here. Perhaps you didn't set the sort order correctly?

 

Jack

Sort order

 

Gratuity 5

Low Order Fee 4

Shipping 2

Sub-Total 1

Tax 3

Total 6

 

On screen

Billing Information

 

Billing Address (Edit)

Lawrence Larsen

28W166 Plainview Drive

Naperville, 60564

United States

Payment Method (Edit)

Credit Card

Sub-Total: $8.95

Delivery Rate (Local): $3.00

Sales Tax: $0.96

Gratuity: $12.00

Total: $24.91

 

 

Email

 

Products

------------------------------------------------------

1 x 201 Sweet & Sour Chicken () = $8.95

 

------------------------------------------------------

Sub-Total: $8.95

Delivery Rate (Local): $3.00

Sales Tax: $0.96

Total: $12.91

 

Delivery Address

 

 

Is the sort order OK I will try setting it to your 3,4,5 like in your readme

 

Thanks for any help

Lawrence

Link to comment
Share on other sites

Hi Jack

 

I just setup a test system no other add-on or mods and I still get the same

 

order:

Gratuity 4

Shipping 2

Sub-Total 1

Tax 3

Total 6

 

Is this OK?

 

shows on screen as a $5.00 tip

 

and the email:

 

osCommerce

------------------------------------------------------

Order Number: 1

Detailed Invoice: http://oscommerce.irdelivery.com/test/cata....php?order_id=1

 

Date Ordered: Monday 06 April, 2009

 

 

Products

------------------------------------------------------

1 x SWAT 3: Close Quarters Battle (PC-SWAT3) = $79.99

------------------------------------------------------

Sub-Total: $79.99

Flat Rate (Best Way): $5.00

Total: $84.99

 

 

Delivery Address

 

What am I doing? to make it not work?

 

Thanks

Lawrence

Link to comment
Share on other sites

I don't know. The code in the contribution doesn't handle adding anything to the email. That is handled by the stock code. If it is working everywhere but the email and the email works for everything else, then it seems it would have to be the sort orde. But the sort order you show should work so I don't have an answer for you. It must be something related to your shop and/or your server setup though since it works here and in other shops I've installed it into.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 2 weeks later...

Hi Jack

 

I have signed up on your server with your install of oscommerce and installed your add-on and it sitll does not work

 

I hope you can help

Lawrence Larsen

Link to comment
Share on other sites

That elimiates the server as a problem. It would seem you are making some mistake in the installation or setup but I can't guess as to what that is.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

I used the readme.txt and checked it three times. Is this going to turn in to a pissing match or are you going to fix the problem. It looks like it only works on the sites you install it!

 

I worked with IBM mainframes for 22 years and have been in this position more then once. It is easy to blame the other person and let them fix your problems

Edited by lwlarsen
Link to comment
Share on other sites

If a problem exists, I might fix it. Pobably will given enough time. But I'm not convinced one exists in this case and since I don't work for free, no matter how nicely asked, I'm not going to troubleshoot it for you. If you find yourself in this position so many times, maybe that indicates where the problem might be?

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 4 weeks later...

Thanks for a good contribution.

 

However, I am having the same problem. Gratuity is displayed in checkout_confirmation.php, but not on the invoice.

 

May be it is not passed to checkout_process.php ??

 

Have you also modified anything else for this contribution? application_top, checkout_proocess, may be something else?

 

Thank you,

 

 

V

Edited by ecomeal
Link to comment
Share on other sites

It's written as a module which means adding its results to the order is handled by the oscommerce code. The only thing i can think of that would cause that would be the sort order.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Thanks for checking. Somehow one of the changes didn't make it into the instructions so there is a problem with it. I have uploaded a new version. The difference is in the checkout_confirmation.php file. To apply the fix, find

// load the selected payment module

and add this above it

  if (!tep_session_is_registered('gratuity')) tep_session_register('gratuity');
 if (tep_not_null($HTTP_POST_VARS['gratuity'])) {
$gratuity = tep_db_prepare_input($HTTP_POST_VARS['gratuity']);
 }

 

I apologize to eveyone for the confusion I caused with this mistake.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 5 months later...

Jack,

Just wanted to drop a note and say nice addon - I actually used it with a bit of modification to allow a candy seller to have clients be able to check a box to include an ice pack when they ship to warmer climates! With just a few changes to the text definitions in checkout_payment.php and ot_gratuity.php and this one change to make the text box a check box I was good to go!

 

In case anyone wants to do something similar, to make the text box into a check box change checkout_payment.php.

 

Change:

 

echo tep_draw_input_field('gratuity', tep_not_null($gratuity) ? $gratuity : '', 'maxlength="255"', false);

 

To:

echo tep_draw_checkbox_field('gratuity', '4', false,'');

 

This will make an un-checked box that will add $4 to your total (to make it checked by default, you can change the false to true).

Need Hosting? Just ask!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...