Jump to content
Strider

Credit Class/Gift Vouchers/Discount Coupons 5.10

Recommended Posts

Does anyone know why some customers would receive the error message "No Payment method selected" when they have a voucher blalance greater than their purchase and others would not? :huh:

 

Rick

Share this post


Link to post
Share on other sites
So, the issue that I'm having is that if a make a coupon for 20% off without specifying a product or cpath catagory, it works perfectly, but if I want to limit the coupon to be 20% off only certain products or catagories, it simply stops working altogether.

 

Any help is appreciated, and thanks for this great contribution!  Even with the current snafu, it's saved me a ton of time.

 

 

I am having the same problem. Is there a fix?

Share this post


Link to post
Share on other sites

Hi,

 

I installed the Contribution Geburtstagsmail inkl. Geschenkgutschein (Bitrhday Reminder with Coupon) Geburtstagmail

 

As the contribution let mail a Customer on his Birthday a Coupon, i would like to send not a simply 5 $ coupon, but a specific Coupon, valid on some products in a certain catgory with a minimum purchase.

 

Well, does anybody how to call and mail this specific coupon which is already present in the DB ?

 

This should also be used to change the standard coupon released when a customer registered.

 

Thank you for your help

 

Sincerely

 

Roberto

Share this post


Link to post
Share on other sites

Just a note to users of the latest version.

There are so many bugs that its hard to start with.

sometime people change the code to fit their need but hard to tell if it work fine with other users.

I pay alot of respact to Ian C Wilson for all his hard work , looking at the original code i can tell that the contribution got cracked druing upgrades. so many tiny piecses of code that not in use .somebody have to clean up the mass and to start over with a cleaner code.(maybe I will do it but only after the official relese of osCommerce Version 2.2MS3 in July or August).

The big issue is at the Product-Category restrictions apply.

Stores owners using this module should know that when you set a Product/Category restrictions the check is only for the first item in cart so if the customer have few items in cart and only one of those items is a valid products,

he/she will still be able to use the coupon to pay for the order.

DEEP-SILVER


Remember - - - "STRESSED" spelled backwards "DESSERTS"

Share this post


Link to post
Share on other sites

Hi there guys. I have just installed the Credit Class/Gift Vouchers/Discount Coupons (Version 5.10) on a test site to make sure it didnt go all wrong. but i seem to be getting a major error. I did everything i was told to do in the instructions. But after copying over then hand editing the files that need it. i get this error

 

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

 

any help would be appreciated as i would like to get this working with my website. but i dont want to use it untill i work out what is wrong.

 

thanx in advance

Share this post


Link to post
Share on other sites
Hi there guys. I have just installed the Credit Class/Gift Vouchers/Discount Coupons (Version 5.10) on a test site to make sure it didnt go all wrong. but i seem to be getting a major error. I did everything i was told to do in the instructions. But after copying over then hand editing the files that need it. i get this error

 

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

 

any help would be appreciated as i would like to get this working with my website. but i dont want to use it untill i work out what is wrong.

 

thanx in advance

 

The code is repeated in both files - previously declared. Delete the following out of your general.php and then you will find it wont repeat. I think it has happened because so many people are working on the contribution and are doing a bit of doubling up. You will find the same error happening in your admin as well.

 

// Create a Coupon Code. length may be between 1 and 16 Characters

// $salt needs some thought.

 

function create_coupon_code($salt="secret", $length = SECURITY_CODE_LENGTH) {

$ccid = md5(uniqid("","salt"));

$ccid .= md5(uniqid("","salt"));

$ccid .= md5(uniqid("","salt"));

$ccid .= md5(uniqid("","salt"));

srand((double)microtime()*1000000); // seed the random number generator

$random_start = @rand(0, (128-$length));

$good_result = 0;

while ($good_result == 0) {

$id1=substr($ccid, $random_start,$length);

$query = tep_db_query("select coupon_code from " . TABLE_COUPONS . " where coupon_code = '" . $id1 . "'");

if (tep_db_num_rows($query) == 0) $good_result = 1;

}

return $id1;

}

////

// Update the Customers GV account

function tep_gv_account_update($customer_id, $gv_id) {

$customer_gv_query = tep_db_query("select amount from " . TABLE_COUPON_GV_CUSTOMER . " where customer_id = '" . $customer_id . "'");

$coupon_gv_query = tep_db_query("select coupon_amount from " . TABLE_COUPONS . " where coupon_id = '" . $gv_id . "'");

$coupon_gv = tep_db_fetch_array($coupon_gv_query);

if (tep_db_num_rows($customer_gv_query) > 0) {

$customer_gv = tep_db_fetch_array($customer_gv_query);

$new_gv_amount = $customer_gv['amount'] + $coupon_gv['coupon_amount'];

// new code bugfix

$gv_query = tep_db_query("update " . TABLE_COUPON_GV_CUSTOMER . " set amount = '" . $new_gv_amount . "' where customer_id = '" . $customer_id . "'");

// original code $gv_query = tep_db_query("update " . TABLE_COUPON_GV_CUSTOMER . " set amount = '" . $new_gv_amount . "'");

} else {

$gv_query = tep_db_query("insert into " . TABLE_COUPON_GV_CUSTOMER . " (customer_id, amount) values ('" . $customer_id . "', '" . $coupon_gv['coupon_amount'] . "')");

}

}

////

// Get tax rate from tax description

function tep_get_tax_rate_from_desc($tax_desc) {

$tax_query = tep_db_query("select tax_rate from " . TABLE_TAX_RATES . " where tax_description = '" . $tax_desc . "'");

$tax = tep_db_fetch_array($tax_query);

return $tax['tax_rate'];

}

 

Just make sure you delete out the repeated code in the general.php only.

 

Hope this helps.


Cath

Share this post


Link to post
Share on other sites

Ok i have removed the lines i was asked to put into

 

admin/includes/application_top.php

 

& Also

 

catalog/includes/application_top.php

 

which has brought my test site back up and running. but now i appear to be getting this error in the shopping cart saying

1146 - Table 'sdeath_osc3.TABLE_COUPON_GV_CUSTOMER' doesn't exist

 

select amount from TABLE_COUPON_GV_CUSTOMER where customer_id = '3'

 

i am sure i have inserted the sql correctly. as i have had no problems uploading other sql databases. please help

Share this post


Link to post
Share on other sites

Well Well. thanx very much Cath. really owe you 1.

 

Now to just get it working on my actual site.

 

Thanx again

Share this post


Link to post
Share on other sites

Hi. I seem to be having a new problem after installing the gift voucher contrib.

Everything seems to be going ok. Send mail and setting up of the gift vouchers but if i set up a dummy account and send myself a test ?10 gift voucher, there is no way of using the voucher to purchase a product.

 

It says in the install manual that a box will appear but i do not appear to be seeing any boxes. which means that a customer wont be able to use their vouchers in the checkout procedure.

 

I would really appreciate any help.

 

Thanx

Share this post


Link to post
Share on other sites
Its ok, finally managed to sort all the problems myself now.

 

I have the same problem, but noone has responded yet. Can you tell me how you resolved it please?

Share this post


Link to post
Share on other sites

I am having trouble with this error.

 

1146 - Table 'norms_osc2.TABLE_COUPON_GV_CUSTOMER' doesn't exist

 

select amount from TABLE_COUPON_GV_CUSTOMER where customer_id = '4'

 

[TEP STOP]

 

I tried to clear the sessions as noted in previous posts, but that didnt help. Please respond.

Share this post


Link to post
Share on other sites
I am having trouble with this error.

 

1146 - Table 'norms_osc2.TABLE_COUPON_GV_CUSTOMER' doesn't exist

 

select amount from TABLE_COUPON_GV_CUSTOMER where customer_id = '4'

 

[TEP STOP]

 

I tried to clear the sessions as noted in previous posts, but that didnt help. Please respond.

If you using oscommerce ms.2.2 put all databse names in catalog/includes/database.php for both admin and catalog side.


Remember - - - "STRESSED" spelled backwards "DESSERTS"

Share this post


Link to post
Share on other sites
If you using oscommerce ms.2.2 put all databse names in catalog/includes/database.php for both admin and catalog side.

i ment repeat this step for admin aswell


Remember - - - "STRESSED" spelled backwards "DESSERTS"

Share this post


Link to post
Share on other sites
I am having the same problem.  Is there a fix?

All the sections in regard to products ristrictions is fully buged and need alot of work out to fix it. not only that, if you cuntinue testing it carefuly you will find so many other errors and bugs that you haven't dreamed of.

untill this is fixed i think that the best thing to do is to have GV and coupons for a small amount only so when an error or bugs happend you will not loose much money or whatever.

for me I just don't see a reason why you should register(redeem) coupon at checkout if the customer can't use it for that order.

for example , right now when a customer enter a coupon code that is not valid for the items in cart he would still see Coupon redeemed text but when reached checkout confirmation page he see nothing no discount no text no nothing. and keep the customer wondring if he done something wrong.


Remember - - - "STRESSED" spelled backwards "DESSERTS"

Share this post


Link to post
Share on other sites
All the sections in regard to products ristrictions is fully buged and need alot of work out to fix it. not only that, if you cuntinue testing it carefuly you will find so many other errors and bugs that you haven't dreamed of.

untill this is fixed i think that the best thing to do is to have GV and coupons for a small amount only so when an error or bugs happend you will not loose much money or whatever.

for me I just don't see a reason why you should register(redeem) coupon at checkout if the customer can't use it for that order.

for example , right now when a customer enter a coupon code that is not valid for the items in cart he would still see Coupon redeemed text but when reached checkout confirmation page he see nothing no discount no text no nothing. and keep the customer wondring if he done something wrong.

 

 

Hello Deep-Silver,

 

It seems to me that you are very confided with this contribution and perhaps already an advanced user and coder of OSC.

 

Are you perhaps able to solve the problem regarding Tax calculation for coupons which I explained some posts before?

 

I would be very happy!

 

Best regards,

Hondo

Share this post


Link to post
Share on other sites
If you using oscommerce ms.2.2 put all databse names in catalog/includes/database.php for both admin and catalog side.

Thanks-- I had forgotten to add the following during install:

60) catalog/includes/application_top.php (EDIT)

Add the following line to the end of the file just before the closing ?> tag

require(DIR_WS_INCLUDES . 'add_ccgvdc_application_top.php'); // ICW CREDIT CLASS Gift Voucher Addittion

 

Added it and the problem seems to be gone.

Will also look at database.php though, just in case.

Share this post


Link to post
Share on other sites

I just copied the files over like is says in the easy installation and it is giving me the following error, anyone know what I might be doing wrong.

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

 

thanks for any help.

Doug

Share this post


Link to post
Share on other sites
I just copied the files over like is says in the easy installation and it is giving me the following error, anyone know what I might be doing wrong.

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

 

thanks for any help.

Doug

if you downloaded the latest upload the you got a buged files as who ever uploaded it mistaklly added the code to admin application_top twice.

the files to copy over a fresh install are NOT good for oscommerce ms.2.2.

Get the files for admin section from v5.13a


Remember - - - "STRESSED" spelled backwards "DESSERTS"

Share this post


Link to post
Share on other sites

i got the same thing. i just commented out all of the CGV functions declared in the general.php file and it seems to work just fine. i figured that if the debugger is complaining about something being REdeclared, then i would just go ahead and UNdeclare it. :)

 

i continue to have trouble limiting a coupons realm to a specific category. any ideas?

 

good luck,

daniel

 

if you downloaded the latest upload the you got a buged files as who ever uploaded it mistaklly added the code to admin application_top twice.

the files to copy over a fresh install are NOT good for oscommerce ms.2.2.

Get the files for admin section from v5.13a

:lol: :lol: :lol:

Share this post


Link to post
Share on other sites

I fixed my problem by replacing my catalog/includes/functions/general.php file with the one I was using before I copied the files, and it seems to be working fine. With a few adjustment all is back in good working order, except.... when I try to add the new products to make the gift certificates available, it give me this error after I add them, and there is no way to delete, edit or view them from the catalog admin. These buttons just are not there, instead I get this error message.

 

1146 - Table 'prospect_proscatalog.TABLE_ADDITIONAL_IMAGES' doesn't exist

 

SELECT additional_images_id, images_description, medium_images FROM TABLE_ADDITIONAL_IMAGES where products_id = '440'

 

it seems to be a problem with my images getting added to the database, any one have any ideas on how I can fix this.

 

thanks,Doug

Share this post


Link to post
Share on other sites

It sounds like the constant TABLE_ADDITIONAL_IMAGES has not been defined. Perhaps in your altering of files, you accidentally erased that constant and now OSC cannot access the information it needs to from the DB. It seems like you have the Additional Images contribution installed. I would go back and check the language files that the Credit Class and the Additional Images contributions have in common, and make sure that definitions for both contributions are present in the files.

 

Good luck,

Daniel

 

I fixed my problem by replacing my catalog/includes/functions/general.php file with the one I was using before I copied the files, and it seems to be working fine. With a few adjustment all is back in good working order, except.... when I try to add the new products to make the gift certificates available, it give me this error after I add them, and there is no way to delete, edit or view them from the catalog admin. These buttons just are not there, instead I get this error message.

 

1146 - Table 'prospect_proscatalog.TABLE_ADDITIONAL_IMAGES' doesn't exist

 

SELECT additional_images_id, images_description, medium_images FROM TABLE_ADDITIONAL_IMAGES where products_id = '440'

 

it seems to be a problem with my images getting added to the database, any one have any ideas on how I can fix this.

 

thanks,Doug

Share this post


Link to post
Share on other sites

Hi,

 

I tried searching for the below info, but could not find anything on it, so i'm sorry if this has been asked before.

 

I have installed ccgv without any issues and it seems to work fine.

 

Howevever, can only one coupon be applied to items during checkout?

 

What if the user has purchased two items, one that is 25% off and one that is 50% off? The system is only redeeming the last coupon I enter into the "Enter redeem code" field.

 

How can this situation be handled. Thanks very much for any help anyone can provide.

 

-Fractal

Share this post


Link to post
Share on other sites

I am trying to work out all the bugs in my site after installing the gift voucher contibution, and most are gone, but I cant figure out why when I go to define mainpage, it shows page can not be found, and it show up in address bar as;

/catalog/admin/FILENAME_DEFINE_MAINPAGE

instead of ;

/catalog/admin/define_mainpage.php

I know there is a simple way to fix this, but I am struggling, any help would greatly be appreciated,

 

Thanks Doug

Edited by Redeye_Joe

Share this post


Link to post
Share on other sites

I have the CCGV contribution up and running (everything seems to be running smooth) now my question is.. how do I add a gift voucher to my shopping cart and not get any shipping charge to it and then be automatically added to the users account?

 

Hope someone can help me.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×