Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Credit Class/Gift Vouchers/Discount Coupons 5.10


Strider

Recommended Posts

Hi again!

 

Changing the general.php files to the originals (from fresh install of osC) has solved the problem!

 

I have a few things that need tweeking:

 

1) the french (but that isnt a problem to me); but more importantly

 

2) when I tested a Free Shipping coupon and clicked to pay with PayPal the shipping charge is not deducted.

 

Any ideas?

 

Thanks :thumbsup:

 

Will

Link to comment
Share on other sites

  • Replies 4.8k
  • Created
  • Last Reply

Top Posters In This Topic

Maddie,

 

Here's a translation... sorry my english is not fluent...

 

Offrir un ch?que cadeau (Send/offer a gift voucher)

 

Offrir un ch?que cadeau (Send/offer a gift voucher)

Veuillez indiquer le montant du ch?que cadeau que vous voulez offrir ? un nouveau client. (Please, put the amount of the Gift Voucher you want to send/offer to a new customer)

 

Mettre 0 si vous ne voulez pas offrir de ch?que cadeau (Put 0 if you don't want to send/offer gift vouchers)

 

Offrir un coupon de r?duction (Send/offer a discount coupon)

Pour offrir un coupon de r?duction a un nouveau client veuillez entrer le code du coupon de r?duction. (To send/offer a discount coupon to a new customer please enter the coupon code)

 

Laisser vide si vous ne voulez pas offrir de coupon de r?duction (Leave empty if you don't want to send/offer discount coupons.

 

ok sorry for all the posts one last thing in my admin I have 2 lines written in french... my french is bad I know these are for the gift vouhcer and for welcome coupon but I can not rememebr the english version. Can anyone help? Thanks!

 

Offrir un ch?que cadeau 

 

Offrir un ch?que cadeau

Veuillez indiquer le montant du ch?que cadeau que vous voulez offrir ? un nouveau client.

 

Mettre 0 si vous ne voulez pas offrir de ch?que cadeau

 

Offrir un coupon de r?duction

Pour offrir un coupon de r?duction a un nouveau client veuillez entrer le code du coupon de r?duction.

 

Laisser vide si vous ne voulez pas offrir de coupon de r?duction

OSC2.2

Link to comment
Share on other sites

HI,

 

When you have this kind of error you just have to remove from add_ccgvdc_application_top.php the function called in the error message. In your example, search for the "create_coupon_code" function in add_ccgvdc_application_top.php as this function already exists in general.php.

 

Hope it helps...

 

I have the same problem as many people that have wrote it about the error message for:

 

On site:

 

Fatal error: Cannot redeclare create_coupon_code() (previously declared in /home/site/public_html/osc/includes/functions/general.php:17) in /home/site/public_html/osc/includes/add_ccgvdc_application_top.php on line 36

 

On admin:

 

Fatal error: Cannot redeclare create_coupon_code() (previously declared in /home/site/public_html/osc/admin/includes/functions/general.php:18) in /home/site/public_html/osc/admin/includes/add_ccgvdc_application_top.php on line 25

Has anyone found a fix for this problem? The more I look into it, the general and applicatio_top share the same code for create_coupon_code() and many others...? Not sure how to fix this, if anyone has a fix it will be greatly appreciated!

Thanks in advance!

OSC2.2

Link to comment
Share on other sites

Hi again!

 

Changing the general.php files to the originals (from fresh install of osC) has solved the problem!

 

I have a few things that need tweeking:

 

1) the french (but that isnt a problem to me); but more importantly

 

2) when I tested a Free Shipping coupon and clicked to pay with PayPal the shipping charge is not deducted.

 

Any ideas?

 

Thanks  :thumbsup:

 

Will

 

 

Hi

 

Sorry its working now! I just set the coupon up again and it took it off!

 

Thanks anyway! :thumbsup:

 

Will

Link to comment
Share on other sites

This is what i am getting and i just updated my ccgv to the lastest:

 

Sub-Total: $30.00

Discount Coupons:lampshades: -$15.00

Gift Vouchers: $5.00

GA TAX: $0.05

Federal Express (FEDEX) ( lbs) (Ground): $15.00

Total: $25.05

 

 

It looks like its giving me a .50 cent differnt. Byu the way the tax is at 5%.

Link to comment
Share on other sites

Hi,

 

I have been reading all 121 of this massive post and working with my code for the past week with no luck...

 

I just did a fresh ccgv_v5_13 and redid all 99 steps again for the 5th time or so... here is a list of problems I am having:

 

*In the admin section*

 

+In my Payment Modules list the credit class is listed as "Credit Class Error" and the discription is "Credit Class Error, needed with Gift Voucher"

 

+I can use the Mail Gift Voucher feature and it mails the vouchers correctly and the user can redeem them. But it does not write any data to the tables for the Gift Voucher Queue feature to work and when you look at that screen it is always blank. It seems that it releases the vouchers by default even though I have it set to ask me to release them first.

 

*In the catalog section*

 

+In checkout_confirmation.php output it shows the GV value but it does not show the total: $0.00 at the end (which would be the total minus the GV value).

 

 

 

Sub-Total: 	 $48.75
United States Postal Service (1 x 0.2lbs) (First-Class Mail (2 - 5 Days)):  $3.03
Total:  $51.78
Gift Vouchers:  $51.78

 

 

 

Other than that everything seems to more or less work... Now I am sure I must of missed something or screwed up a line in some file, so please if you have any ideas where I could look to try and fix these or if you have had these problems I would love to hear what you did to fix it.

 

The closest I ever saw to the problem i was having was from Diskology

(and I never found a reply to it... hope I have more luck) and btw Diskology

if you did fix the problem please drop me a line.

 

I can be reached here on the board or email me [email protected]

 

 

Thanks in advance,

Brann

Link to comment
Share on other sites

well I am testing and while i see the tick box to apply teh GV it is not being applies and I do not see my voucher balance in the shopping cart area... can ayone help... going crosseyed... Thanks

 

I overwrote a file I forgot to back up.... working now thanks all!

Edited by MzBeanz
Link to comment
Share on other sites

Hi =)

 

I have this installed on my test site and everything works great. Thank you sooo much for the contribution.

 

I do however have one question and I looked through this thread and didn't see anyone else asking, although I could have missed it. Lots of posts! lol

 

Anyhow, I have vouchers set up for the standard $25, $50 and $100. What I want to do is be able to sell say the $100 for $80, as an insentive sort of.

No matter what I have tried, I either break the whole voucher system, or the "customer" pays the $80 like I want, but then when it is redeemed it is only for $80 not the $100.

 

Anyone done something like this or have any ideas? Thanks!

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

also, im wondering if thers a way of showing the actual total minus the coupon discount?

 

right now the way it shows in the checkout confirmation is as follows:

 

Sub-Total:  $119.94

Flat Rate (Best Way):  $5.00

Total:  $124.94

Discount Coupons:TEST:  -$29.99

Id perfer it to show the total with the discount already included...

 

 

Do you have the solution yet ? or are you still looking ?

 

I'd like to have this shown too

Link to comment
Share on other sites

This is a bit tricky, I have to be carefull what I say here, but it looks to be the right place and way to overcome the problem.

 

The French variables can be found in the DataBase for CCGV itself and you will have to look at the fields in the database configuration and specifically to the configuration_group_id field.

 

So looking at this it should be possible to find them back also in the SQL file that creates the table structure for you at install.

 

Ther you will find at records 143, 144 your first set of frenc descriptions and then again at records 170, 171 or 172, 173 ( I've deleted the last 2 to check if I was at the right place )

 

Now, which records are used I don't know but what I do know is that you can alter the descriptions using a decent SQL admin center ( EMS MySQL Manager is one of them )

 

The records that are unused can be safely removed, but which ones they are I can't say, perhaps someone else can point me in the right direction ?

 

 

Found the Db records and corrected them.

 

BUT, looking at this post I see that there is a lot of my posted text not present ( or not anymore ) So regard this post as useless and only us the given info if you know what you are looking for.

 

It could be that the forum admin has deleted some of my text for security reasons, or anything like that, In that case would the admin be so kind as to remove this and quoted post completely to avoid any confusion ?

Link to comment
Share on other sites

Hi,

 

I'm back again!

 

I started again with a fresh install of osC and V5.13d of CCGV.

 

I followed the instructions to the letter but I still get the following error messages:

 

On site:

 

Fatal error: Cannot redeclare create_coupon_code() (previously declared in /home/epp/public_html/osc/includes/functions/general.php:17) in /home/epp/public_html/osc/includes/add_ccgvdc_application_top.php on line 36

 

On admin:

 

Fatal error: Cannot redeclare create_coupon_code() (previously declared in /home/epp/public_html/osc/admin/includes/functions/general.php:18) in /home/epp/public_html/osc/admin/includes/add_ccgvdc_application_top.php on line 25

 

Any ideas?

 

Thanks  :thumbsup:

 

Will

The following three functions are duplicated in the functions/general.php and add_ccgvdc_application_top.php files as shown below. You should delete the ones in general.php since the functions are specific to this contribution.

 

create_coupon_code (both catalog and admin)

tep_gv_account_update (both catalog and admin)

tep_draw_date_selector (admin)

tep_get_tax_rate_from_desc (catalog)

 

Jack

Support Links:

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

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

getting this error on the payment information screen after redeeming a coupon:

 

MODULE_ORDER_TOTAL_COUPON_TEXT_ERROR

 

It appears right above the "Congratulations, you have redeemed' box

 

Any ideas?

 

I asm getting this erro as well and I think it is just a missing line of code but I am unsure when it is defined. Can anyone help?

 

Maddie

Link to comment
Share on other sites

Hmmm I added this define

 

define('MODULE_ORDER_TOTAL_COUPON_TEXT_ERROR', 'Coupon Redemption');

 

to this file

 

catalog/includes/languages/add_ccgvdc_english.php

 

And it worked but now I wonder if there are others that are missing as well as the text that was already defined seems to end abruptly

 

Congratulations, you have redeemed ????

 

ANyone?

Link to comment
Share on other sites

Hey all. Looking for a quick way to display the ACTUAL total that will be charged to a customer's card after the gift voucher is used. Currently it shows the original total, then the discount amount but no final total.

 

Any help is appreciated.

 

James

Link to comment
Share on other sites

Same here James!

 

I did a test order using

 

- a 10% discount coupon,

- free shipping

- and a gift voucher

 

and every thing went great ...all calculatins were correct BUT the order total was not recalculated and listed on the page nor in the email to the customer?? I am using PayPal so how will the total be passed along? Please help

 

Maddie

Link to comment
Share on other sites

Hey all.? Looking for a quick way to display the ACTUAL total that will be charged to a customer's card after the gift voucher is used.? Currently it shows the original total, then the discount amount but no final total.

 

Any help is appreciated.

 

James

 

 

I guess on the bottom of the includes\classes\order_total.php lies the answer to this.

 

I found this math ? in the file and guess there has to be done something with the variables from the CCGV module, the TAX is HERE, and also the SHIPPING FEE and there clearly is some subtraction going on here so it seems we have to look here.

 

Though I am not a programmer but I guess some of you know what to do about this ?

 

Look at this:

 

function get_order_total_main($class, $order_total) {

global $credit, $order;

// if ($GLOBALS[$class]->include_tax == 'false') $order_total=$order_total-$order->info['tax'];

// if ($GLOBALS[$class]->include_shipping == 'false') $order_total=$order_total-$order->info['shipping_cost'];

return $order_total;

Edited by jans
Link to comment
Share on other sites

I know this may be redundant but I can not get the pop up coupon help to come up? I see the code but it doesnt work

 

/ ############ Added CCGV Contribution ##########

// CREDIT CLASS script moved by Rigadin in v5.13 for compatibility with STS

$cart_contents_string ="

<script language=\"javascript\">

function couponpopupWindow(url) {

window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,re

sizable=yes,copyhistory=no,width=450,height=280,screenX=150,screenY=150,top=150,l

eft=150')

}

//--></script>";

 

 

I have seaeched for the solution as I know I have read this somewhere.. anyone have a link or the solution? thanks

 

So close to getting this done woohoo!

 

Maddie

Link to comment
Share on other sites

MzBeanz,

 

Are talking about the order total not showing up in /catalog/checkout_confirmation.php

 

where it shows up like this :

 

Sub-Total:  $119.94
Flat Rate (Best Way):  $5.00
Total:  $124.94
Discount Coupons:TEST:  -$29.99
Id perfer it to show the total with the discount already included...

 

and it doesnt give you a total with the discount adjusted? if so I am trying to figure out the same thing and have been hacking with the code all day... Do you have any ideas on what it could be? maybe if we put our heads together we can figure something out.

 

-Brann

 

btw in your payment module section of the admin page does it say Credit Class Error?

Link to comment
Share on other sites

MzBeanz,

 

Are talking about the order total not showing up in /catalog/checkout_confirmation.php

 

where it shows up like this :

 

Sub-Total: ?$119.94
Flat Rate (Best Way): ?$5.00
Total: ?$124.94
Discount Coupons:TEST: ?-$29.99
Id perfer it to show the total with the discount already included...

 

and it doesnt give you a total with the discount adjusted?? if so I am trying to figure out the same thing and have been hacking with the code all day...? Do you have any ideas on what it could be? maybe if we put our heads together we can figure something out.

 

-Brann

 

btw in your payment module section of the admin page does it say Credit Class Error?

 

Yes.. it does the calculations correctly for how I have it said up but it does not show the total after the coupons and gift vouchers... so I am wondering if it will not be passed onto paypal... I have been at it all day to to no avail. It is also not being sent to the email it generates... I am stumped

 

Maddie

Edited by MzBeanz
Link to comment
Share on other sites

Well I tested it and it DOES send the correct total to paypal but I woul really like to see it on the checkout_confirmation.php page and in the order email sent to me and the customer. Will keep plugging away

 

maddie

Link to comment
Share on other sites

Well I think I figured it out... at least it works for me.. I got to thinking how when I first used this module over a year ago there was much discussion about sort orders. So Iplayed with it and now it works!!

 

Here is what I had: I had Order total listed 4th and it worked but did not display the recalculated total, but was passed through to PayPal.

 

Discount Coupons 9

Gift Vouchers 740

Low Order Fee 0

Shipping 3

Sub-Total 1

Tax 2

Total 4

 

 

I changed it to: making the total last and it worked!

 

Discount Coupons 9

Gift Vouchers 740

Low Order Fee

Shipping 3

Sub-Total 1

Tax 2

Total 800

 

Sure hope this solves it for everyone! Please let me know thanks

 

Maddie

Edited by MzBeanz
Link to comment
Share on other sites

Maddie,

 

Your my hero! heh :)

 

I went in and changed it to have the highest sort order and boom worked like a champ :)

 

I was hacking at all kinds of code trying to figure it out and who would of thought it was a simple setting in the admin console... go figure

 

 

I have one more question for you. How is your credit class working in the payment module section? I can not get that going to save my life...

 

 

Thanks again,

Brann

Link to comment
Share on other sites

Brann... Thanks I too had been at it for days then I rememebred the problem with the infamous sort order from over a year ago.

 

I only use PayPal and moneyorders and it works great! Which ones are you using?

 

Maddie

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