Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Credit Class/Gift Vouchers/Discount Coupons 5.10


Strider

Recommended Posts

Hi Shane

 

I have tried to install this contrib 4 times without success. Your package should have appeared straight away. Could you please try again?

 

it is now up. Had to convert to rar to get it under 300k limit so it would post. Change filename back to rar and you should be set.

 

Hope it helps

Link to comment
Share on other sites

  • Replies 4.8k
  • Created
  • Last Reply

Top Posters In This Topic

Wow, I can't believe how many questions are asked more than once... but the question I have does not seem to be here yet. If so, please pardon the duplicate request for help.

 

I'm installing this. Looks fantastic so far. However, I am stuck on one thing. My sql added all the new tables but did not insert the stuff into the Configuration Table.

 

The line of instructions reads:

INSERT INTO CONFIGURATION (yada, yada) VALUES

'NEW_SIGNUP_GIFT_VOUCHER_AMOUNT', '0', (or other amount), 1, 32, NULL, '2003-12-05 05:01:41', NULL, NULL

 

I need to know:

What Type is this?

Do I enter 1, 32 under the Length/Values field?

Where do I enter the '0' or other amount?

And, can I change that date to the current date?

 

Any help with any of these questions will be greatly appreciated.

 

Kymberlyn

Link to comment
Share on other sites

Wow, I can't believe how many questions are asked more than once

 

It is impossible to look through 168 pages of posts to see if a question has already appeared. There should be a search function to searcch through a thread (only a forum search is not enough if you have 168 pages per thread).

Matthias Thoen

my contribution: Photo Gallery for osCommerce

--check my homepage in my CARD--

Link to comment
Share on other sites

It is impossible to look through 168 pages of posts to see if a question has already appeared. There should be a search function to searcch through a thread (only a forum search is not enough if you have 168 pages per thread).

 

Agreed or start a new tread with each new release (old problems should be fixed in new release)

Link to comment
Share on other sites

It is impossible to look through 168 pages of posts to see if a question has already appeared. There should be a search function to searcch through a thread (only a forum search is not enough if you have 168 pages per thread).

 

That's true. Now back to the question...

 

Can someone who is using ccgv please open their phpmyadmin, look at the osc1 database, click on configuration and let me know how your line reads - the line starting with new_signup_gift_voucher?

 

I've read the whole forum over the past 48 hours. Sadly, no one ever answers this question. It's been asked, albeit only one other person, but it has never been answered.

 

Kym

Edited by LadyK
Link to comment
Share on other sites

That's true. Now back to the question...

 

Can someone who is using ccgv please open their phpmyadmin, look at the osc1 database, click on configuration and let me know how your line reads - the line starting with new_signup_gift_voucher?

 

I've read the whole forum over the past 48 hours. Sadly, no one ever answers this question. It's been asked, albeit only one other person, but it has never been answered.

 

Kym

 

 

Not finding new_signup_gift_voucher but I think this is what you are looking for:

 

INSERT INTO `configuration` VALUES (143, 'To offer a gift voucher', 'NEW_SIGNUP_GIFT_VOUCHER_AMOUNT', '0', 'Please indicate the amount of the gift voucher which you want to offer a new customer.<br><br>Put 0 if you do not want to offer gift voucher.<br>', 1, 31, NULL, '2003-12-05 05:01:41', NULL, NULL);

INSERT INTO `configuration` VALUES (144, 'To offer a discount coupon', 'NEW_SIGNUP_DISCOUNT_COUPON', '', 'To offer a discount coupon to a new customer, enter the code of the coupon.<br><br>Leave empty if you do not want to offer discount coupon.<BR>', 1, 32, NULL, '2003-12-05 05:01:41', NULL, NULL);

INSERT INTO `configuration` VALUES (145, 'Display Total', 'MODULE_ORDER_TOTAL_COUPON_STATUS', 'true', 'Do you want to display the Discount Coupon value?', 6, 1, NULL, '2006-01-06 10:35:38', NULL, 'tep_cfg_select_option(array(''true'', ''false''),');

INSERT INTO `configuration` VALUES (146, 'Sort Order', 'MODULE_ORDER_TOTAL_COUPON_SORT_ORDER', '9', 'Sort order of display.', 6, 2, NULL, '2006-01-06 10:35:38', NULL, NULL);

INSERT INTO `configuration` VALUES (147, 'Include Shipping', 'MODULE_ORDER_TOTAL_COUPON_INC_SHIPPING', 'false', 'Include Shipping in calculation', 6, 5, NULL, '2006-01-06 10:35:38', NULL, 'tep_cfg_select_option(array(''true'', ''false''),');

INSERT INTO `configuration` VALUES (148, 'Include Tax', 'MODULE_ORDER_TOTAL_COUPON_INC_TAX', 'false', 'Include Tax in calculation.', 6, 6, NULL, '2006-01-06 10:35:38', NULL, 'tep_cfg_select_option(array(''true'', ''false''),');

INSERT INTO `configuration` VALUES (149, 'Re-calculate Tax', 'MODULE_ORDER_TOTAL_COUPON_CALC_TAX', 'Standard', 'Re-Calculate Tax', 6, 7, NULL, '2006-01-06 10:35:38', NULL, 'tep_cfg_select_option(array(''None'', ''Standard'', ''Credit Note''),');

INSERT INTO `configuration` VALUES (150, 'Tax Class', 'MODULE_ORDER_TOTAL_COUPON_TAX_CLASS', '0', 'Use the following tax class when treating Discount Coupon as Credit Note.', 6, 0, NULL, '2006-01-06 10:35:38', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(');

INSERT INTO `configuration` VALUES (151, 'Affichage', 'MODULE_ORDER_TOTAL_GV_STATUS', 'true', 'Voulez-vous autoriser l''affichage de la remise pour les ch?ques cadeaux ?', 6, 1, NULL, '2006-01-06 10:35:42', NULL, 'tep_cfg_select_option(array(''true'', ''false''),');

INSERT INTO `configuration` VALUES (152, 'Ordre de tri', 'MODULE_ORDER_TOTAL_GV_SORT_ORDER', '740', 'Ordre de tri pour l''affichage (Le plus petit nombre est montrer en premier).<br>', 6, 2, NULL, '2006-01-06 10:35:42', NULL, NULL);

INSERT INTO `configuration` VALUES (153, 'Ch?ques en attente', 'MODULE_ORDER_TOTAL_GV_QUEUE', 'true', 'Voulez-vous mettre les ch?ques en attente de validation ?', 6, 3, NULL, '2006-01-06 10:35:42', NULL, 'tep_cfg_select_option(array(''true'', ''false''),');

INSERT INTO `configuration` VALUES (154, 'Livraison', 'MODULE_ORDER_TOTAL_GV_INC_SHIPPING', 'true', 'Voulez-vous inclure la livraison dans le caclule ?', 6, 5, NULL, '2006-01-06 10:35:42', NULL, 'tep_cfg_select_option(array(''true'', ''false''),');

INSERT INTO `configuration` VALUES (155, 'Taxe', 'MODULE_ORDER_TOTAL_GV_INC_TAX', 'true', 'Voulez-vous inclure la taxe dans le calcule ?', 6, 6, NULL, '2006-01-06 10:35:42', NULL, 'tep_cfg_select_option(array(''true'', ''false''),');

INSERT INTO `configuration` VALUES (156, 'Mode de calcule', 'MODULE_ORDER_TOTAL_GV_CALC_TAX', 'None', 'Quel mode utiliser pour recalculer la taxe ?', 6, 7, NULL, '2006-01-06 10:35:42', NULL, 'tep_cfg_select_option(array(''None'', ''Standard'', ''Credit Note''),');

INSERT INTO `configuration` VALUES (157, 'Type de Taxe', 'MODULE_ORDER_TOTAL_GV_TAX_CLASS', '0', 'Quel type de taxe voulez-vous utiliser pour les coupons de r?duction ?<br>', 6, 0, NULL, '2006-01-06 10:35:42', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(');

INSERT INTO `configuration` VALUES (158, 'Inclure taxe', 'MODULE_ORDER_TOTAL_GV_CREDIT_TAX', 'false', 'Voulez-vous ajouter la taxe sur le ch?que cadeau ?', 6, 8, NULL, '2006-01-06 10:35:42', NULL, 'tep_cfg_select_option(array(''true'', ''false''),');

INSERT INTO `configuration` VALUES (159, 'Sort order of display.', 'MODULE_PAYMENT_CCERR_SORT_ORDER', '99', 'Sort order of display. Lowest is displayed first.', 6, 0, NULL, '2006-01-06 13:31:52', NULL, NULL);

INSERT INTO `configuration` VALUES (164, 'Set Order Status', 'MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID', '0', 'Set the status of orders made with this payment module to this value', 6, 0, NULL, '2006-01-06 13:32:09', 'tep_get_order_status_name', 'tep_cfg_pull_down_order_statuses(');

INSERT INTO `configuration` VALUES (169, 'Tax Class', 'MODULE_SHIPPING_TABLE_TAX_CLASS', '1', 'Use the following tax class on the shipping fee.', 6, 0, NULL, '2006-01-06 13:32:59', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(');

INSERT INTO `configuration` VALUES (170, 'Shipping Zone', 'MODULE_SHIPPING_TABLE_ZONE', '0', 'If a zone is selected, only enable this shipping method for that zone.', 6, 0, NULL, '2006-01-06 13:32:59', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(');

INSERT INTO `configuration` VALUES (171, 'Sort Order', 'MODULE_SHIPPING_TABLE_SORT_ORDER', '0', 'Sort order of display.', 6, 0, NULL, '2006-01-06 13:32:59', NULL, NULL);

Link to comment
Share on other sites

Hello here is my problem.

 

Now this is the amount of the discount that is saved in the dababase, and I need that also

that the rate could be saved in the dabase.

 

For example, if somebody has a discount of 10% on 120 ?, the discount amount is 12 ?

 

I need to be saved in the database, the amount like now ,it do 12 ? , but I need also to have to be saved the 10 of the rate of discount.

 

How could I do ?

 

I hope you will understand, I'm french ;)

 

Sincerely,

 

No?l

Link to comment
Share on other sites

Thanks for your help Joe. I had a few mistakes in the gv file and that cleared it up. I really appreciate it.

 

For the "Cart Total Less Than Voucher Amount" error:

 

Instead of modifying the checkout_confirmation.php, I did a fix in the pre_confirmation_check() "function" of the payment.php "class" instead:

 

function pre_confirmation_check() {

// global $credit_covers, $payment_modules; //ICW CREDIT CLASS Gift Voucher System

// *** Add the $cot_gv global variable.

global $credit_covers, $cot_gv, $payment_modules; //ICW CREDIT CLASS Gift Voucher System

if (is_array($this->modules)) {

if (is_object($GLOBALS[$this->selected_module]) && ($GLOBALS[$this->selected_module]->enabled) ) {

// if ($credit_covers) { // ICW CREDIT CLASS Gift Voucher System

// *** Add the conditional check to execute the else condition if the apply gift voucher box isn't checked

if ($credit_covers && $cot_gv) { // ICW CREDIT CLASS Gift Voucher System

$GLOBALS[$this->selected_module]->enabled = false; //ICW CREDIT CLASS Gift Voucher System

$GLOBALS[$this->selected_module] = NULL; //ICW CREDIT CLASS Gift Voucher System

$payment_modules = ''; //ICW CREDIT CLASS Gift Voucher System

} else { //ICW CREDIT CLASS Gift Voucher System

$GLOBALS[$this->selected_module]->pre_confirmation_check();

}

}

}

} //ICW CREDIT CLASS Gift Voucher System

Link to comment
Share on other sites

For the "Cart Total Less Than Voucher Amount" error:

 

Instead of modifying the checkout_confirmation.php, I did a fix in the pre_confirmation_check() "function" of the payment.php "class" instead:

 

function pre_confirmation_check() {

// global $credit_covers, $payment_modules; //ICW CREDIT CLASS Gift Voucher System

// *** Add the $cot_gv global variable.

global $credit_covers, $cot_gv, $payment_modules; //ICW CREDIT CLASS Gift Voucher System

if (is_array($this->modules)) {

if (is_object($GLOBALS[$this->selected_module]) && ($GLOBALS[$this->selected_module]->enabled) ) {

// if ($credit_covers) { // ICW CREDIT CLASS Gift Voucher System

// *** Add the conditional check to execute the else condition if the apply gift voucher box isn't checked

if ($credit_covers && $cot_gv) { // ICW CREDIT CLASS Gift Voucher System

$GLOBALS[$this->selected_module]->enabled = false; //ICW CREDIT CLASS Gift Voucher System

$GLOBALS[$this->selected_module] = NULL; //ICW CREDIT CLASS Gift Voucher System

$payment_modules = ''; //ICW CREDIT CLASS Gift Voucher System

} else { //ICW CREDIT CLASS Gift Voucher System

$GLOBALS[$this->selected_module]->pre_confirmation_check();

}

}

}

} //ICW CREDIT CLASS Gift Voucher System

 

 

Tim,

 

Just backed out my changes in /catalog/checkout_confirmation.php and added your change to /catalog/includes/classes/payment.php. It works great and it a much more elegant solution. Thanks...less code is better code ;-).

 

Joe

Link to comment
Share on other sites

Hi

I've just installed this contribution. I did it the "easy way" by installing all the files included and edited the few files in red by hand.

 

All went smoothly except at the end I got this:

 

Fatal error: Cannot redeclare create_coupon_code() (previously declared in /hsphere/local/home/catscrea/catscreationsandcrafts.com/catalog/includes/functions/general.php:17) in /hsphere/local/home/catscrea/catscreationsandcrafts.com/catalog/includes/add_ccgvdc_application_top.php on line 36

 

 

Anyone know what I can do to fix it?

Link to comment
Share on other sites

Hi

I've just installed this contribution. I did it the "easy way" by installing all the files included and edited the few files in red by hand.

 

All went smoothly except at the end I got this:

 

Fatal error: Cannot redeclare create_coupon_code() (previously declared in /hsphere/local/home/catscrea/catscreationsandcrafts.com/catalog/includes/functions/general.php:17) in /hsphere/local/home/catscrea/catscreationsandcrafts.com/catalog/includes/add_ccgvdc_application_top.php on line 36

Anyone know what I can do to fix it?

 

nevermind

Edited by shanejackson
Link to comment
Share on other sites

Not finding new_signup_gift_voucher but I think this is what you are looking for:

 

INSERT INTO `configuration` VALUES (143, 'To offer a gift voucher', 'NEW_SIGNUP_GIFT_VOUCHER_AMOUNT', '0', 'Please indicate the amount of the gift voucher which you want to offer a new customer.<br><br>Put 0 if you do not want to offer gift voucher.<br>', 1, 31, NULL, '2003-12-05 05:01:41', NULL, NULL);

(etc)

 

Thanks. I tried it... still have errors so I guess I need to look for something else. Thanks for offering the code though. I was almost certain that that was the problem.

 

On aside, the problem is, my new member emails do not contain the gift voucher code. I think I will just try to find a way to edit the auto-email so that the code is not offered. (It tells them there is a code but the code does not appear.)

 

Kym - back to the drawing board

Link to comment
Share on other sites

doest the new release fix the issue of having to enter the coupon code 2x before it actually gets added to the basket? Because as is right now if i enter the redeem code once it wont work...

 

Bob, I had that problem and fixed it as follows:

 

in /catalog/includes/modules/order_total/ot_coupon.php, find this code in Function Collect_Posts:

 

if (!tep_session_is_registered('cc_id')) tep_session_register('cc_id');

$cc_id = $coupon_result['coupon_id'];

 

Move this code here (just up a few lines) and place it below the code shown here in bold:

 

global $order,$ot_coupon,$currency;

// BEGIN >>> CCVG 5.15 - Custom Modification - fix Coupon code redemption error

// Moved code up a few lines

if (!tep_session_is_registered('cc_id')) tep_session_register('cc_id');

$cc_id = $coupon_result['coupon_id'];

// END <<< CCVG 5.15 - Custom Modification - fix Coupon code redemption error

 

Joe

Link to comment
Share on other sites

Hey everyone, I installed this contribution the other day and everything is working good except my error messages are blank

 

notexterror7vu.th.jpg

 

If I enter the code correctly I get the red box at the top, but it's empty, if I enter the code wrong I get the same thing. Does anyone have any ideas as to why this is happening?

Link to comment
Share on other sites

Fantastic! I see a new full version download that promises to have all the updates and fixes. My fingers are crossed that this one will work.

 

Thanks ShaneJackson for putting the time into this.

 

Kym

Link to comment
Share on other sites

ok, so i downloaded shanejackson's 5.15a, installed it, and added the lines as required per the install instructions. the sql file has been added to the db via myphpadmin. everything works good.

 

i enter a coupon "test" for 15% discount, for a certain product. i enable coupons and gift vouchers, put them above total in the order total module.

 

i then create a test account, select the product, and proceed to checkout. i select my shipping method and click continue. i then get a blank white page, on checkout_payment.php.

 

i change the coupon, so there is no valid product, and even selected another product in the store, and it does the same thing.

 

it also does this when i disable coupons and gift vouchers

 

what's wrong?

Edited by trustco
Link to comment
Share on other sites

Bob, I had that problem and fixed it as follows:

 

in /catalog/includes/modules/order_total/ot_coupon.php, find this code in Function Collect_Posts:

 

if (!tep_session_is_registered('cc_id')) tep_session_register('cc_id');

$cc_id = $coupon_result['coupon_id'];

 

Move this code here (just up a few lines) and place it below the code shown here in bold:

 

global $order,$ot_coupon,$currency;

// BEGIN >>> CCVG 5.15 - Custom Modification - fix Coupon code redemption error

// Moved code up a few lines

if (!tep_session_is_registered('cc_id')) tep_session_register('cc_id');

$cc_id = $coupon_result['coupon_id'];

// END <<< CCVG 5.15 - Custom Modification - fix Coupon code redemption error

 

Joe

 

 

Hi joe,

 

i had originally looked into the problem and foud 2 fixes for it. One of the fixes was the one you posted above...but neither worked for me..i still get the same error :\

Link to comment
Share on other sites

Does anyone if the CCGV contrib causes conflicts with other contribs?

 

I have tried 5 times (using 5 different starting points) to get this working, but always end up with the same problem (the layout of the payment page, or the payment page is blank.

 

Any ideas would be welcome.

Link to comment
Share on other sites

I tried installing v5.14 - had some problems.

Uninstalled it.

Started whole store from scratch and installed the brand new 5.15a.

5.15a fixed all the problems I had encounted in 5.14 but it created so many new ones.

 

Has this happened to anyone else? And, have you found a fix for it?

 

1 - Under admin/configuration I have 'Offer a Gift Voucher' listed 7 times, ditto for the Discount Coupon.

 

2 - Under Admin/Vouchers-Coupons/Coupon Admin - when trying to insert a coupon I receive this:

Fatal error: Call to undefined function: tep_draw_date_selector() in /home/pangaia/public_html/witchcraft/shop/admin/coupon_admin.php on line 727

(Comparing the file to v5.14 it is exactly the same but that install did not have this error.)

 

3 - Under Admin/Vouchers-Coupons/Mail Gift Voucher - after composing the email, selecting recipient, entering amount, etc. I hit send. I preview the letter and hit send again. The email is not delivered and the following page has this error:

Fatal error: Call to undefined function: create_coupon_code() in /home/pangaia/public_html/witchcraft/shop/admin/gv_mail.php on line 42

 

4 - When trying to create a new (test) account I enter the information and recieve this error:

Fatal error: Call to undefined function: create_coupon_code() in /home/pangaia/public_html/witchcraft/shop/create_account.php on line 250

 

 

So... has anyone else had these problems or am I just a dummy?

 

Kym - banging my head on the desk

Link to comment
Share on other sites

I tried installing v5.14 - had some problems.

Uninstalled it.

Started whole store from scratch and installed the brand new 5.15a.

5.15a fixed all the problems I had encounted in 5.14 but it created so many new ones.

 

Has this happened to anyone else? And, have you found a fix for it?

 

1 - Under admin/configuration I have 'Offer a Gift Voucher' listed 7 times, ditto for the Discount Coupon.

 

2 - Under Admin/Vouchers-Coupons/Coupon Admin - when trying to insert a coupon I receive this:

Fatal error: Call to undefined function: tep_draw_date_selector() in /home/pangaia/public_html/witchcraft/shop/admin/coupon_admin.php on line 727

(Comparing the file to v5.14 it is exactly the same but that install did not have this error.)

 

3 - Under Admin/Vouchers-Coupons/Mail Gift Voucher - after composing the email, selecting recipient, entering amount, etc. I hit send. I preview the letter and hit send again. The email is not delivered and the following page has this error:

Fatal error: Call to undefined function: create_coupon_code() in /home/pangaia/public_html/witchcraft/shop/admin/gv_mail.php on line 42

 

4 - When trying to create a new (test) account I enter the information and recieve this error:

Fatal error: Call to undefined function: create_coupon_code() in /home/pangaia/public_html/witchcraft/shop/create_account.php on line 250

So... has anyone else had these problems or am I just a dummy?

 

Kym - banging my head on the desk

 

1.. is caused by running the sql file more than once. Delete them all and run the "best" sql again.

2.. 3.. 4.. go back to 5.14 since (imho) 5.15a is incomplete

Link to comment
Share on other sites

1.. is caused by running the sql file more than once. Delete them all and run the "best" sql again.

2.. 3.. 4.. go back to 5.14 since (imho) 5.15a is incomplete

 

Thanks for the quick response. You were right. I had to fix the sql.

 

I figured out that if I choose not to offer new account vouchers or coupons then the create account would work again.

 

All in all, I'm going to borrow bits and pieces from both versions and hopefully I can get it functional enough to use it.

 

Thanks for the help.

 

Kym

Link to comment
Share on other sites

Thanks for the quick response. You were right. I had to fix the sql.

 

I figured out that if I choose not to offer new account vouchers or coupons then the create account would work again.

 

All in all, I'm going to borrow bits and pieces from both versions and hopefully I can get it functional enough to use it.

 

Thanks for the help.

 

Kym

 

No problem, it looks like we are in the boat and doing the same thing.

 

If you want to compare files, send me a PM with your e-mail address.

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