Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

Credit Class/Gift Vouchers/Discount Coupons 5.10


4756 replies to this topic

#4701 valerif

  • Community Sponsor
  • 199 posts
  • Real Name:valeri

Posted 03 September 2009, 16:26

View Postvalerif, on Sep 3 2009, 01:02 PM, said:

HELLO,

REDEEM Problem/

I installed CCGV on new RC2a version

I am testing now the feature. Seems working mostly, but still learning how to use it.

I have one problem though. This the message I get when trying to send a voucher to another account after purchasing it:

Warning: mysql_insert_id(): supplied argument is not a valid MySQL-Link resource in /homepages/.../includes/functions/database.php on line 113

The another person receives email link but when trying to redeem the vaucher is not redeemed

I wonder if some one knows the solution to this problem. Perhaps is related to some settings I have done wrong

Looking forward to some help
Thanks

for those who have such problem:

i think i found a solution

on line 113 include/functions/dtatabase.php

change
return mysql_insert_id($$link);
to
return mysql_insert_id();

seems work fine now

cheers

#4702 johnnybebad

  • Community Member
  • 672 posts
  • Real Name:Johnny

Posted 04 September 2009, 21:30

Hi,

hope you can help?

installed the ccgv latest version.

the discount coupons work
the gift vouchers can be mailed out and sent
part of the gift voucher can be sent on to another person from ones account and the value is correctly deducted off the voucher balance.
the gift vouchers can be purchased and added to a persons account

not been able to verify the rest of the credit situation yet.



however redeeming the vouchers is a problem.

1. Cant redeem any ggift vouchers at all.
2. cant use the voucher balance in account (displayed in shopping cart box)

any idea where these problems are located or where i should lookm to find them?
Getting better with mods but no programmer am I.

#4703 valerif

  • Community Sponsor
  • 199 posts
  • Real Name:valeri

Posted 04 September 2009, 23:51

View Postjohnnybebad, on Sep 4 2009, 10:30 PM, said:

Hi,

hope you can help?

installed the ccgv latest version.

the discount coupons work
the gift vouchers can be mailed out and sent
part of the gift voucher can be sent on to another person from ones account and the value is correctly deducted off the voucher balance.
the gift vouchers can be purchased and added to a persons account

not been able to verify the rest of the credit situation yet.



however redeeming the vouchers is a problem.

1. Cant redeem any ggift vouchers at all.
2. cant use the voucher balance in account (displayed in shopping cart box)

any idea where these problems are located or where i should lookm to find them?

hello,

i am new to this contribution. but in the past few days i have been playing with it since some very valuable people on this forum advised me that this is the best to use

let me see if i understand you right:

1) you buy a voucher
2) it is released by admin (under the voucher/cupon options), and the produt is set us Delivered by admin (under the orders options)
3) the voucher appears into your cart box
4) you can send it. when send can the recepient use it?
5) but you can not use it if keep it for yourself

i had this problem and resolved it by changing the orders of the options in module/order total:

Discount Coupons 3
Vouchers 4
Shipping 2
Sub Total 1
Tax 5
Total 6

after doing this in the checkout_payment.php appears a tick box called To Be Used With Gift Vouchers. by the way the reddem button also changes its position from far right goes to left (not sure why, but works)

if you tick this box or put a code if you have one (in case sent the voucher) it discounts in the next step the voucher amount

hope this helped you

cheers

#4704 labbs

  • Community Member
  • 61 posts
  • Real Name:Chris Lander
  • Gender:Male
  • Location:Luton, Bedfordshire, United Kingdom

Posted 07 October 2009, 21:11

View Postvalerif, on 03 September 2009, 12:02, said:

I have one problem though. This the message I get when trying to send a voucher to another account after purchasing it:

Warning: mysql_insert_id(): supplied argument is not a valid MySQL-Link resource in /homepages/.../includes/functions/database.php on line 113
I found a similar problem when installing this contribution on a clients store.

The solution I found was to change the code around line #65 of gv_send.php

Search for
      $insert_id = tep_db_insert_id($gv_query);
      $gv_query=tep_db_query("insert into " . TABLE_COUPON_EMAIL_TRACK . " (coupon_id, customer_id_sent, sent_firstname, sent_lastname, emailed_to, date_sent) values ('" . $insert_id . "' ,'" . $customer_id . "', '" . addslashes($gv_customer['customers_firstname']) . "', '" . addslashes($gv_customer['customers_lastname']) . "', '" . $HTTP_POST_VARS['email'] . "', now())");
and replace it with
      $gv_query=tep_db_query("select coupon_id from " . TABLE_COUPONS . " where coupon_code = '" . $id1 . "'");
      $gv_new_coupon=tep_db_fetch_array($gv_query);
      $gv_query=tep_db_query("insert into " . TABLE_COUPON_EMAIL_TRACK . " (coupon_id, customer_id_sent, sent_firstname, sent_lastname, emailed_to, date_sent) values ('" . $gv_new_coupon['coupon_id'] . "' ,'" . $customer_id . "', '" . addslashes($gv_customer['customers_firstname']) . "', '" . addslashes($gv_customer['customers_lastname']) . "', '" . $HTTP_POST_VARS['email'] . "', now())");

I got the feeling that tep_db_insert_id($gv_query) was the cause of the problem, and I didn't want to edit the .../include/database.php in case other parts of osCommerce relied on it's current functionality, so I ended up getting the coupon information from the coupons file and then inserting a record in the email track table.


I also found that the remote IP wasn't being entered into the redeem track table so made the following change in gv_redeem.php around line #52

Search for
// Update redeem status
    $gv_query = tep_db_query("insert into  " . TABLE_COUPON_REDEEM_TRACK . " (coupon_id, customer_id, redeem_date, redeem_ip) values ('" . $coupon['coupon_id'] . "', '" . $customer_id . "', now(),'" . $REMOTE_ADDR . "')");
and replace it with
// Update redeem status
    $gv_query = tep_db_query("insert into  " . TABLE_COUPON_REDEEM_TRACK . " (coupon_id, customer_id, redeem_date, redeem_ip) values ('" . $coupon['coupon_id'] . "', '" . $customer_id . "', now(),'" . $_SERVER['REMOTE_ADDR'] . "')");

I believe the reason it wasn't working for me is that $REMOTE_ADDR requires register_globals to be on, so I used the super global $_SERVER['REMOTE_ADDR'] instead.

Best regards
LABBS Web Services

#4705 lroschi

  • Community Member
  • 4 posts
  • Real Name:Larry Roschi

Posted 12 October 2009, 16:26

I posted in the General Add-on Support (in error?) - I installed CCGV (latest version here) and, although the contrbution appears to be working correctly from what I've tested so far, I have a 2nd category column that shows up when I click on Checkout. Everything appears fine until I click on Checkout, then all the screens during checkout have 2 category columns along the left side of the screen, and stay there until I get back to the normal shopping screens. The contribution itself is working fine. Can anyone help or point me in the right direction? Thanks for your help!

#4706 lroschi

  • Community Member
  • 4 posts
  • Real Name:Larry Roschi

Posted 13 October 2009, 17:07

Hi again! I've been looking around to find an answer and something occurred to me. Is it possible that when I click on checkout, that the spacing for the 2 columns is changed so that they are equal, and so another category column is displayed to fill the extra space in the left side? Sometimes I see this behavior if the supplier's text or picture is too long and runs off the right side of the page, the products heading will repeat in the right margin. Does that make sense? Anyway, how and where would that change take place? Any help? Thanks again!

#4707 lroschi

  • Community Member
  • 4 posts
  • Real Name:Larry Roschi

Posted 13 October 2009, 18:40

Okay, I think I was wrong about the spacing issue. I looked at the source code in IE8 and I see 2 instances where it looks like it's calling to display the categories, hence the 2 columns of categories. This appears on the checkout_shipping, checkout_payment, and checkout_confirmation pages. I don't know where to look to find the code that would call the category column twice. Thanks for any help anyone can give.

#4708 JZM

  • Community Member
  • 46 posts
  • Real Name:Jess

Posted 16 October 2009, 22:33

Does anyone no why I get


Fatal error: Call to undefined method order_total::clear_posts() in /var/www/Bee/catalog/checkout_payment.php on line 87

Edited by JZM, 16 October 2009, 22:34.


#4709 minipassat

  • Community Member
  • 81 posts
  • Real Name:minipassat

Posted 19 October 2009, 02:59

Hello,

I'm using FEC (Fast Easy Checkout V1.6) with CCGV V5.19. My OSC is version MS2. At the checkout_confirmation.php page, when I select payment method with Paypal Standard module, I got this error message:

Fatal error: Cannot redeclare class paypal in .../includes/modules/payment/paypal_standard.php on line 13

and the code of line 13 is:

  class paypal_standard {

When pay with credit card:

Fatal error: Cannot redeclare class cc in .../includes/modules/payment/cc.php on line 13

and the code of line 13 is:

class cc {

Same thing happens to AuthorizeNet AIM module. It seems to be the "class" issue. I am new to PHP but i am not aware of this code. Can you help please? Or anyone can help please?

Thank you!

#4710 mvigil514

  • Community Member
  • 44 posts
  • Real Name:Michael
  • Location:Georgia

Posted 25 October 2009, 23:49

View PostMaxB, on 03 August 2005, 00:31, said:

Hi @all!

I have installed CCGV 5.14 and nearly everything is working fine, except for the Error or Success Messages when i try to redeem a coupon. These Messages just won�t show up. I always get an empty red information box.

I figured out why: The Error-Messages are posted in the redirect link like this:

http://www.mydomain.tld/catalog/checkout_payment.php?payment_error=ot_gv&error=You+did+not+enter+a+redeem+code.

The Problem is that somehow a amp; is added after the & before error=....

In catalog/includes/modules/order_total/ot_gv.php (arround line 220) it says
if ($HTTP_POST_VARS['submit_redeem_x'] && !$HTTP_POST_VARS['gv_redeem_code']) tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error='.$this->code.'&error=' . urlencode(ERROR_NO_REDEEM_CODE), 'SSL'));

I tried to solve the problem by entering
if ($HTTP_POST_VARS['submit_redeem_x'] && !$HTTP_POST_VARS['gv_redeem_code']) tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error='.$this->code.'&error=' . urlencode(ERROR_NO_REDEEM_CODE), 'SSL'));

but this reproduces a double amp;

http://www.mydomain.tld/catalog/checkout_payment.php?payment_error=ot_gv&error=You+did+not+enter+a+redeem+code.

Anyone might have an Idea why there is an "amp;" added after the "&" and how to fix this? Or am I the only one having this problem?


Thanks in advance!


Max

I am also having this problem. I have version 5.16 installed, with Ultimate SEO urls, Points and Rewards plus others. I can't say exactly when it quit working, but I suspect it was after I installed SEO urls. Has anybody found the solution to the problem. I have also updated to RC2a. If anyone has solved this, I would appreciate any help.

Michael

#4711 TELLO

  • Community Member
  • 7 posts
  • Real Name:Mike
  • Gender:Male
  • Location:Germany

Posted 04 November 2009, 22:58

Hi NG,

i installed CCGV5.16 for two projects. And i have problem to send the voucher as email.
I send a test voucher to only one email what i select from the pop down menue....

In one shop project it works perfect....
But in the other project it shows the right name and address in the preview - but if i click on send, it send the voucher to the wrong address or it takes more then one address...and send them vouchers...

So i checkt the gv_mail.php of both projects, but they simular!

Where can be the problem?


THanks so mutch for help!!!
TELLO

#4712 mellome

  • Community Member
  • 11 posts
  • Real Name:Mel

Posted 20 November 2009, 20:44

Hi,

I'm getting the following errors... any idea why?

Error 1:
"Warning: mysql_insert_id(): supplied argument is not a valid MySQL-Link resource in /home/content/b/b/s/bweets/html/catalog/includes/functions/database.php on line 113".
Line 113 = return mysql_insert_id($$link);
This error occurs after sending a gift certificate from the client's account (catalog/gv_send.php)

Error 2:
"TEP_HREF_LINK_ERROR2" (catalog/gv_send.php)
This error sits at the bottom of the catalog/gv_send.php page.

Please help.. I'm a php novice please post specifics. Thanks much.

Mel

Edited by mellome, 20 November 2009, 20:44.


#4713 mellome

  • Community Member
  • 11 posts
  • Real Name:Mel

Posted 21 November 2009, 19:15

View Postmellome, on 20 November 2009, 20:44, said:

Hi,

I'm getting the following errors... any idea why?

Error 1:
"Warning: mysql_insert_id(): supplied argument is not a valid MySQL-Link resource in /home/content/b/b/s/bweets/html/catalog/includes/functions/database.php on line 113".
Line 113 = return mysql_insert_id($$link);
This error occurs after sending a gift certificate from the client's account (catalog/gv_send.php)

Error 2:
"TEP_HREF_LINK_ERROR2" (catalog/gv_send.php)
This error sits at the bottom of the catalog/gv_send.php page.

Please help.. I'm a php novice please post specifics. Thanks much.

Mel


NEVER MIND.. I JUST REALIZED THAT THIS IS NOT COMPATIBLE WITH MYSQL5+... :(

#4714 labbs

  • Community Member
  • 61 posts
  • Real Name:Chris Lander
  • Gender:Male
  • Location:Luton, Bedfordshire, United Kingdom

Posted 30 November 2009, 08:14

View Postmellome, on 21 November 2009, 19:15, said:

NEVER MIND.. I JUST REALIZED THAT THIS IS NOT COMPATIBLE WITH MYSQL5+... :(
I had the same problem on my 'MySQL 5.0.67-Max' system, but I created a work around.

See Post #4704 above...

Best regards
LABBS Web Services

#4715 bexter

  • Community Member
  • 2 posts
  • Real Name:Boris B

Posted 06 December 2009, 16:33

Hi @ all CCGV´s !

i have a lil prob with the date and need help.
[IMG]http://img37.imageshack.us/img37/4135/gv1.th.gif[/IMG]

everytime when i create a coupon - the right box shows me a wrong date
what is the Problem with "create_date" it shows me everytime 01.01.1970
so i think its any problem in the coupon_admin.php but i have absolutly no idea with code it is.

Heeeeeeeeeeelp plz !

#4716 cLin

  • Community Member
  • 30 posts
  • Real Name:chris l

Posted 08 December 2009, 23:27

Anyone know if it's possible to move the input boxes down below where you enter in payment information (credit card information) and also combined the gift voucher and promo code into one boxes instead of two seperate boxes?

#4717 devine952

  • Community Member
  • 69 posts
  • Real Name:Rob
  • Gender:Male

Posted 18 December 2009, 21:16

Anyone experiencing a problem in explorer using the Treeview feature on the coupon_admin.php page? It works fine in Firefox, but doesn't seem to work in explorer.

I figure it must be some javascript incompatibility or browser setting, but it eludes me.

Thanks for reading.

Rob

#4718 kieran_mullen

  • Community Member
  • 141 posts
  • Real Name:Kieran D Mullen
  • Gender:Male

Posted 30 December 2009, 08:33

IT seems odd that once a coupon is redeemed that a user has to then remember or KNOW to click "to be used from Gift Vouchers" to have the voucher applied. Is there a way to turn off the radio buttona nd just apply it automatically?

Also tonight I installed on a fresh install and when a coupon was redeemed it looked like a red textbox came up but did not say it was valid or not.

Thank you

#4719 samsagaz

  • Community Member
  • 27 posts
  • Real Name:Jose

Posted 07 January 2010, 17:33

Hi guys, i was using this contrib for long time, but after update it, and add new modules now i have some problems.

I want to know if someone know if is possible to use

Credit Class and Gift Voucher/Coupon V5.21 + Points and Rewards V2.1rc2a_1 in the checout process?

i found that the manual have some tips abt how to use it, but i cant get it working in the checkout_payment.php when i set to use points (from Points and Rewars) and to use voucher (from CC and Gift Vouchers).

Someone know if is possible to get both contribs working at the same time?

when i just try to set both i get an error that say that need to choice another payment method because dont have enouch point, is like dont count the money that i have into my voucher

Thanks in advance

#4720 bhbilbao

  • Community Member
  • 291 posts
  • Real Name:BLACKHOLE
  • Gender:Male
  • Location:Spain

Posted 20 January 2010, 22:49

checkout_payment.php

Warning: Missing argument 1 for payment::javascript_validation(), called in /homepages/*/htdocs/checkout_payment.php on line 128 and defined in /homepages/*/htdocs/includes/classes/payment.php on line 84

The line84:

// Start - CREDIT CLASS Gift Voucher Contribution
// function javascript_validation() {
  function javascript_validation($coversAll) {
	//added the $coversAll to be able to pass whether or not the voucher will cover the whole
	//price or not.  If it does, then let checkout proceed when just it is passed.

ont understand this error.