Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Credit Class/Gift voucher/Discount Coupon v5


Ian

Recommended Posts

  • Replies 499
  • Created
  • Last Reply

Top Posters In This Topic

Jim,

 

I think that he is wearing himself "thin".

 

Well I could do with loosing a few pounds. Maybe we could start the osCommerce Diet.

Trust me, I'm an Accountant.

Link to comment
Share on other sites

Tim,

 

I noticed something: I sent a gift voucher as a test. I redeemed the voucher from the email link, but I didn't log into my account & I closed the browser window. The funds from the coupon are gone.  

 

Try redeeming it again. It's not actually marked as redeemed until you log into an account and it's added to your GV account.

Trust me, I'm an Accountant.

Link to comment
Share on other sites

melinda,

 

I made those 2 changes from above but still no box on checking out to redeem your certificate.  

 

Note, you will only get a redeem box on checkout if

 

a) You have created some discount coupons or

B) you have un-redeemed Gift Vouchers.

 

If neither of the above are true then there's no point, and it save a little screen space.

 

There's some confusion over how the GV system works. I should have a full user guide ready today. Will post a link here when it's done.

Trust me, I'm an Accountant.

Link to comment
Share on other sites

David,

 

You mentioned that there is a problem with AuthorizeNet and the GV code. For what? I just tried a coupon and it worked just fine.  

 

Should have been more specific, I meant the Authorizenet AIM contribution, not the built in module. :)

Trust me, I'm an Accountant.

Link to comment
Share on other sites

majestic

 

Ran a quick scenario and encountered some problems ...  

 

Not exactly sure about this one, I'll repeat what you did on my test system.

Trust me, I'm an Accountant.

Link to comment
Share on other sites

storeman

 

Hi Ian ,  

is there any way to modify the credit class to allow the custoemr to enter there tax number so they get a specific tax exeption ?  

 

The simple answer is yes, I'll get back to you with the not so simple answer.

 

:lol:

Trust me, I'm an Accountant.

Link to comment
Share on other sites

Does anyone know of a way to allow for a gift cert to be used for the whole purchase price.

 

What seems to be happening is that the customer proceeds to the checkout area and enters the coupon code and then try to checkout. The message box comes up telling them to choose a payment method.

 

The same also happens even after they redeem the voucher. The click here to use box comes up but they still can't checkout with out entering info into one of the payment methods.

 

I am not sure what to tweek.

 

Cheers,

Mike

Link to comment
Share on other sites

Mike,

 

I assume you are talking about the javascript popup. If you are having problems with the redeem button as well, then chances are you have not installed properly.

 

Did you change your files by hand editing rather than just copying everything across.

 

See also 5.03 bug report that follows.

Trust me, I'm an Accountant.

Link to comment
Share on other sites

Ian,

 

I did the changes by had using beyound compare to compare files, since I also have some other contributions installed.

 

I think part of my problem is the sort order. After reading your docs on your site I checked my sort orders and they were off.

 

I will test it now to see if it works, Thanks

Link to comment
Share on other sites

There is a bug in the Gift Voucher code that will cause the system to ask for another payment method even when the Gift voucher value covers the cost of the order.

 

To fix, in the file includes/modules/order_total/ot_gv.php find the function

pre_confirmation_check($order_total)

 

replace the whole function with the following code.

 

    function pre_confirmation_check($order_total) {

     if ($_SESSION['cot_gv']) {

       $od_amount = $this->calculate_credit($order_total);

       if ($this->calculate_tax != "none") {

         $tod_amount = $this->calculate_tax_deduction($order_total, $od_amount, $this->calculate_tax);

         $od_amount = $this->calculate_credit($order_total)+$tod_amount;

       }

     }

     return $od_amount;

   }

Trust me, I'm an Accountant.

Link to comment
Share on other sites

Looking good Ian,

 

There is also the old bug still in 5.03,

includes/modules/order_total/ot_gv.php and  

includes/modules/order_total/ot_coupon.php  

 

in ot_gv.php it's line 123  

in ot_coupon.php its line 73  

 

the string you are looking fo in both cases is  

 

 

Code:  

       $selection_string .= '  <td align="right"' . $image_submit . '</td>';  

 

 

 

this should be  

 

Code:  

       $selection_string .= '  <td align="right">' . $image_submit . '</td>';  

 

HTH  

Mr. Ree

How to find answers to OSC Common Questions

1. Look at http://wiki.oscommerce.com

2. Search http://www.oscommerce.com/forums/

3. Post a request in http://www.oscommerce.com/forums/

Link to comment
Share on other sites

I also have a few other observations Ian.

 

1. The Java Popups do not work on my installation.

 

2. If you delete a sale in which a GV was used, should it not be credited back to the client? As it is id "poofs" away.

 

3. If I understand it correctly, if the GV is enought to cover the entire purchase, no other payment methods should show.

I do not get this resul and yes, I have checked the sort order and the code thrice.

 

I am adding the 5.03 code to a Loaded 5 with the latest patches, PHP 4.3.1. I wonder if the FREE SHIPPING addon is causing some of the issues with #3?

 

Thaks for the hard work on a great Mod.

Mr. Ree

How to find answers to OSC Common Questions

1. Look at http://wiki.oscommerce.com

2. Search http://www.oscommerce.com/forums/

3. Post a request in http://www.oscommerce.com/forums/

Link to comment
Share on other sites

when I go through coupon admin and setup a discount code everything seems to work but the email I send does not show a code just says code is and nothing there. Also not a link to click for redemption.

 

However, it all shows up when you go back to shopcart and the code is in the popup box. THe problem is confusion on email side. Any ideas?

 

THanks,

 

CHarles

Link to comment
Share on other sites

Charles,

 

Is this with v5.03?

 

In older versions there was a bug, mentioed in this thread (I know, its's a bit long and reading thru it can be harmful to your health :) )

 

In admin/coupon_admin.php look for

 

      $message .= TEXT_VOUCHER_IS . $coupon_result['code'] . "nn";

 

and replace with

 

      $message .= TEXT_VOUCHER_IS . $coupon_result['coupon_code'] . "nn";

 

or see

 

http://cvs.sourceforge.net/cgi-bin/viewcvs...h_tag=branch_v5

Trust me, I'm an Accountant.

Link to comment
Share on other sites

I thought I would give a quick overview of my todo list for the Credit Class system. If anyone has any further suggestions they are welcome.

 

1) I'm working on the Discount Coupon product/category restriction code at the moment. The current admin interface for this is CRAP. The new interface will allow you to select categories/products from drop down boxes. Also not only will you be able to define products/categories that are alowed for the Coupon, but also define products/categories that are dsallowed.

 

This will help in the case where you want the coupon to be allowed for many products bar a few.

 

2) The send Gift Voucher code is confusing. I intend to build this into the checkout process. So instead of purchasing a Gift Voucher then havinf to use the Send Gift voucher link. The send will actually be built into the checkout procedure.

 

I also intend to revert back to having separate boxes for GV and discount coupon redeems. The current code that shows only one box is a pretty poor kludge and I can't abide the code that does that. It also may affect future credit class modules, so it has to go.

Trust me, I'm an Accountant.

Link to comment
Share on other sites

Sorry Ian, Verified that it did not make it to the zip.

I did fix this, not sure why it didn't make it into the zip.  

 

to prove it  

 

http://cvs.sf.net/cgi-bin/viewcvs.cgi/zenw...h_tag=branch_v5

Mr. Ree

How to find answers to OSC Common Questions

1. Look at http://wiki.oscommerce.com

2. Search http://www.oscommerce.com/forums/

3. Post a request in http://www.oscommerce.com/forums/

Link to comment
Share on other sites

I know,

 

I checked myself, and your rght it did not make it into the zip. I just can't undestand why, as my cvs post pre-dated the creation of the zip.

 

I blame it on releasing code after midnight. Maybe I should only release code after a good nights sleep.

 

Oh, but then I'd never release any code at all :lol:

Trust me, I'm an Accountant.

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...