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

The error occurs in both

 

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

 

 

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

 

this should be

 

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



HTH

Trust me, I'm an Accountant.

Link to comment
Share on other sites

Hey, speak for yourself :) I am at work! but it is kinda true, i could be doing nothing I suppose. I am right now making images, really weird thing with this pop up help. It just does not even give me a link, let alone the pop up. The link should be in the shop cart box shouldn't it?

Link to comment
Share on other sites

yes, the link should be in the shopping cart. should say 'more info'

 

The code actually breaks rules, in that accepted wisdom says any javascript functions should be defined before the </head> tag. To reduce the workload (other wise you would have to put the function in every single osCommerce page) I put the function in the shopping cart box.

 

I also forgot to bracket it with my ICW amend tags, so some people missed it when hand editing their pages.

Trust me, I'm an Accountant.

Link to comment
Share on other sites

It depends.

 

When you redeem a coupon code, on checkout_payment.php then a link should appear in the Shopping Cart box.

 

This should stay in the shoping cart box even if you cancel the checkout procedure.

Trust me, I'm an Accountant.

Link to comment
Share on other sites

Just to be more specific, and the fact that you never had the redeem button before may have something to do with your problem.

 

Customer purchaes various items, clicks on checkout, goes to checkout shipping, selects shipping and moves to checkout payment.

 

Sees redeem bos and enters coupon code. If correct code, will be taken to checkout confirmation. Shopping cart box should now contain coupon link

Trust me, I'm an Accountant.

Link to comment
Share on other sites

Ian,

 

I'm having a few problems with the gift voucher.

 

Whether I put a number in the coupon code box in the admin or leave it blank and send myself an email, there is no number in the email so I can use the coupon. The number is generated in the admin "Coupon Admin" area.

 

On the coupon_admin.php page after editing the coupon I have this:

Free Shipping TEXT_NO_FREE_SHIPPING

 

I sent 3 emails from the coupon email section and in the "Gift Vouchers Sent" section it is blank.

 

I'm pretty sure I have all the files changed that are to be changed.

Link to comment
Share on other sites

Hi,

 

I found the email fix so sent myself another email with the coupon code in it.

 

I clicked on the link and the shopping cart said I had $2.00 for a voucher balance.

 

I bought something but the box to put the coupon code never showed up.

 

How does the gift voucher work anyway? I'm confused.

Link to comment
Share on other sites

Hi Melinda,

 

On page 10 of this thread Daemonj (Jim E.) answered with this:

A minor item that also needs to be corrected, is in the admin/includes/languages/[language]/coupon_admin.php file, the definition for Free Ship Help needs to be changed to: 

Code: 

define('COUPON_FREE_SHIP_HELP', 'The coupon gives free shipping on an order. Note. This overrides the coupon_amount figure but respects the minimum order value'); 

the difference is that shipping and overrides are spelled correctly

*AND*

In addition to the above, a definition for No Free Shipping needs to be added. 

Code: 

define('TEXT_NO_FREE_SHIPPING', 'No free shipping');

 

And on page 11 of this thread Fred says,

Regarding the empty redeem code: 

Quote: 

" 

You can redeem this coupon during checkout. Just enter the code in the box provided, and click on the redeem button. 



The coupon code is 



Don't lose the coupon code, make sure to keep the code safe so you can benefit from this special offer. 

" 





If you're email discount coupong from the admin section, I just found in "catalogadmincoupon_admin.php" that wrong field is used. To get it to work: 



change: 

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

to: 

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



i.e change from field 'code' to 'coupon_code'. 



/Fred

 

*Ian* Looking forward to 5.03 of this, a great upgrade of a great mod! Well done sir.

 

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

Ian,

Again, along with the others...YOU ROCK. This is a killer piece of coding and I applaud your detailed and thought out comments and language. Some spelling mistakes, but who cares about that crap. It means we need to read the stuff we put on our sites.

 

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.

 

Again, thank you. You get top mention in my credits.

Link to comment
Share on other sites

So it will be well worth the wait.

 

What is the rough time frame for Loaded 5.03.

 

Also, would it be including any new contributions and will it be updated according to MS 1 CVS.

 

I think you mixed up the Loaded Version with the GV version. He is releasing GV 5.03 hopefully soon, but according to his site, Loaded 5 may be the last of the loadeds.... He will correct me if I am wrong I am sure :)

[no external urls in signatures please, kthanks]

Link to comment
Share on other sites

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.

 

 

I quickly skimmed through this thread so forgive me if there is already a fix.

Link to comment
Share on other sites

Ian:

 

just got done (1:48 a.m. in CA) installing your CV Contribution (5.0.2 on OSC 2.2 MS1). Thanx a bunch for all the work and effort you put in.

 

Ran a quick scenario and encountered some problems ...

 

Created a new customer account with option $10 for signing up enabled. Then I signed in with that new account and sent $5 to another email address of mine. That deducted the amount from $10 to $5. However, after I checked out and checked back in, the Voucher Balance was back to $10, even though in "Gift Voucher sent Admin" it says that it's been redeemed ... (I guess the db doesn't get properly updated when sending a voucher to somebody else) - any ideas?

 

Also, I clicked on the link in the email to redeem the $5 voucher I sent to my other email, which of course couldn't work since I was logged in with a different email account. However when I checked in "Gift Voucher sent Admin" the $5 voucher also said that it's been redeemed, even though it couldn't have since I was never logged in with that particular email account ...

 

Now, I have to say that I haven't switched on "Discount Coupon" or "Gift Vouchers/Coupons" in Order Total, but don't think that that should have anything to do with it. One other suggestion might be to include in the Payment Module an option which says Gift Voucher/Coupon and depending if that's switched on and only then actually perform any Gift Voucher/Coupon functions ...

 

Anyway, looking forward to 5.0.3 - keep up the good work and thanx again.

 

- DM

Link to comment
Share on other sites

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 ?

thanks

Link to comment
Share on other sites

Give him a day or two to resolve his computer problems and he should be back. Hopefully he is getting some rest as I think that he is wearing himself "thin".

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Link to comment
Share on other sites

Loaded 5 may be the last of the loadeds.... He will correct me if I am wrong I am sure :)

 

Yes, you are right there loxly.

 

He has posted in his forum that Loaded 5 will be the last version and there will be no Loaded 6.

 

He will only provide Support , if i am not mistaken.

Link to comment
Share on other sites

I think I followed the instructions pretty well on a clean snapshot from today:

 

The Voucher/Gift Coupon module shows up in admin, if I click on it I get:

 

/catalog/admin/FILENAME_COUPON_ADMIN

 

404 error. obviously before the /catalog is the domain I have. If I type directly coupon_admin.php in the admin directory it tells me the database table doesn't exist even though I can see it in PHPAdmin.

 

Any ideas?

Link to comment
Share on other sites

Where do you change the email text when an admin sends a gift voucher? I've changed it in define languages/gv_send.php, but the text did not change.

 

  • The Gift Voucher is worth $1.00

 

To redeem this Gift Voucher, please click on the link below. Please also write down the redemption codewhich is695313 in case you have any problems.

 

http://localhost/catalog/gv_redeem.php?gv_no=695313

 

or visit http://localhost/catalog/ and enter the code during the checkout process

 

I want to at least put spaces between codewhich and is(code).

 

Thanks

Link to comment
Share on other sites

It's alright, i haven't disappeared.

 

Problems with my home server, cable connections, etc, etc.

 

Version 5.03 has been uploaded to contribution area

http://www.oscommerce.com/community/contributions,282

 

Hopefully fixes 99% of bugs mentioned in this thread, plus a couple of others I found :oops:

 

There's some expanded install documentation and this includes some stuff on upgrading from 5.02.

 

I'll catch up on the posts here and hopefully have them all answered this afternoon.

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