Jump to content
Vger

[CONTRIBUTION] CCGV (trad)

Recommended Posts

The Install instructions do say:

 

"Run the sql file - this is not optional"

 

I put it in bold deliberately, and it does even tell you how to run an sql file if you have never done it before.

 

Vger

Edited by Vger

Share this post


Link to post
Share on other sites

Hi there,

 

CCGV (trad) is a much simpler and working version to implement. Wonder why people would make other CCGV versions so complicate and even not working any more in the past several months.

 

I am testing on CCGV(trad) with a version of PWA and my initial testing shows they can work together without problem.

 

The only issue at the moment I come across with my installation is that CCGV seems to have a problem with Protx Form (protx_form.php). Normally, or as design, CCGV would by pass the Delivery information page and goes straight to Billing Information page, resulting in there being no delivery address. In protx_form.php, both delivery & billing addresses are passed to Protx server, which, stupidly, would insist both addresses must have a post code even the delivery address is an empty string :angry: . Since it 'fails' the post code test, Protx server returns an error msg complaining 'post code is missing', and the process won't go any further.

 

IMHO, the billing address is what is required to check against that registered with the credit/debit card used for the transecting. I contact protx support but they did not seem interested, and gave me a 'big stick style' answer, saying one only got that error msg when theres no post code in the address :angry:

 

I am still working on a solution. Anyone got the same problem? Or is there a solution out there already, which I may be missing? I do not think it has anything to do with PWA. In my set up, PWA is not available when a gift voucher is purchased.

 

Many thanks,

 

Ken

Edited by GemRock

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Share this post


Link to post
Share on other sites

Vger,

 

Just a couple of things I wanted to run by you.

 

1.) When I set the date of expiration of a coupon (say Aug,8 2018), I then confirm the coupon that was created, but later if I go back to make a change, then expiration date shows one year from the date I choose to change it?

 

2.) I don't know if anyone else experienced this in the past, but I just create about 70 coupons, and if 20 coupons show per page, I should have 4 pages worth of coupons. I do have the pages show at the both. 1 through 4, but I have all 70 coupons show on all pages? Any ideas?

 

3.) Is it possible to take a coupon from the inactive page and re-activate it?

 

Thanks

Matt

Share this post


Link to post
Share on other sites

I have found a fix to the above problem, which is similar to that suggested by Simon (http://forums.oscommerce.com/lofiversion/index.php/t140211.html). I check the validity of the "DeliveryAddress", rather than the product type. Ideally, the problem should be fixed at Protx, but it is not easy to get guys at Protx to listen and to move around, I believe.

 

Ken


commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Share this post


Link to post
Share on other sites

The default period for a coupon is twelve months, so if you go back to that page to edit it then it will show you the 12 month time period. If you do not choose to change the time period and click Cancel then it will remain at whatever time period you originally set it to.

 

Don't know why you are seeing all coupons on all four pages.

 

No, you can't reactivate Inactive Coupons.

 

Vger

Share this post


Link to post
Share on other sites
The Install instructions do say:

 

"Run the sql file - this is not optional"

 

I put it in bold deliberately, and it does even tell you how to run an sql file if you have never done it before.

 

Vger

 

 

I have run the script, but when I went to run it the second time I got an error message, saying that "coupon_email_track" table already exist. Looks like it wouldnt have progress through the rest.

 

I'll extract the part from the sql file which refers to the configuration, and run it as a seperate query,

 

Will that effect the operation of the GV system ??

 

ie. if I were to run each query individually, will it ignore the query if that ran correctly the first time round.

 

Cheers guys,

JP

Share this post


Link to post
Share on other sites
I have run the script, but when I went to run it the second time I got an error message, saying that "coupon_email_track" table already exist. Looks like it wouldnt have progress through the rest.

 

I'll extract the part from the sql file which refers to the configuration, and run it as a seperate query,

 

Will that effect the operation of the GV system ??

 

ie. if I were to run each query individually, will it ignore the query if that ran correctly the first time round.

 

Cheers guys,

JP

 

I suspected you had got at least some parts of the sql scripts run otherwise you'd not say it 'up&running like a treat'. I suppose while you are in phpMyAdmin, open the table called configuration to see what's there and what may somehow be missing with regard to CCGV(trad). If you run all the 'insert into' sql scripts a second time, it'd probably duplicate these records, which may confuse the system. Pleaes note, as suggested by Vger, do read & follow the instructions carefully.

 

Ken


commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Share this post


Link to post
Share on other sites

Hello all, Hello Rhea,

 

This issue doesn't pertain to CCGV only but nontheless I am hoping to find some answers here, because I am at a complete dead-end. I have just installed LinkPoint API and am having a big problem with it.

 

 

I have both the CCGV(trad) and Points/Rewards 1.6 installed. They both seem to work fine so far, with the exception of some logical issues that P/R modual has. So when LP API passes the aleged grand total to the gateway it sends the ammount which is before the CCGV or P/R discounts were applied.

 

I think I found the lines in linkpoint_api.php that deal with the passing of total, but lack the savvy to know what to do with them.

$grantotal = number_format($order->info['total'], 2);
  $myorder["chargetotal"] = str_replace(",", "", $grantotal);

 

Please help, I am under a lot of pressure.

 

Thank you for your time.

Edited by Voland

People dont change, people realize.

Share this post


Link to post
Share on other sites

Hi

 

Try changing

$grantotal = number_format($order->info['total'], 2);

 

to

$grantotal = number_format($HTTP_POST_VARS['ord_total'], 2);

 

Tom

Share this post


Link to post
Share on other sites

Does this contribution allow the next?

 

1) customer tell friend about my site

2) friend buy a product

3) customer gets 10e gift?

 

Becouse I have free stuff from manufactures and would like to give them as a reward for people who spread word about my site. If this contribution does not allow this, is there one which does?

Share this post


Link to post
Share on other sites

'Tell A Friend' is part of osCommerce itself.

 

CCGV(trad) is for selling Gift Vouchers and issuing Discount Coupons - it is not best suited for the giving away of free products, so you need to look in the Contributions section for one which does that.

 

Vger

Share this post


Link to post
Share on other sites

For everyone's benefit, I think this bug fix should be mentioned here as it can only be found on the CCGV 5.16 pages, but the bug also exists in CCGV (trad) (once you check the 'use Gift Voucher account balance' check box you have no way to chnage your mind) and my test shows the fix works as well on CCGV (trad). It is a bug fix posted by Phocea, so full credit goes to Phocea. Below is the full text posted by Phocea:

 

 

***************************** Text by Phocea Starts ******************************

Hello just thought I would post a bug fix for a small problem which occurs if a customer decide to change his mind and NOT use his gift voucher balance after all.

Basically once the box is ticked, even if you go back to checkout_payment and leave the box unticked, the balance is still used.

Even if you log off and back in, its still registered with the session !

 

Anyway here is the line that need to be added to get rid of this bug:

 

In checkout_payment.php

After:

if(tep_session_is_registered('credit_covers')) tep_session_unregister('credit_covers'); //CCG

 

Add:

if(tep_session_is_registered('cot_gv')) tep_session_unregister('cot_gv'); //CCGV

 

And we might as well clean this up in logoff.php also

After

tep_session_unregister('gv_id');

 

Add:

tep_session_unregister('cot_gv');

 

Note that this problem does not apply to Discount codes, only the gift vouchers.

 

***************************** Text by Phocea Ends ******************************

 

Hope the next CCGV (trad) update includes this bug fix.

 

Ken

Edited by GemRock

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Share this post


Link to post
Share on other sites

The next CCGV update will not include that code, and I do not consider the way CCGV works to be a bug. Please take the time to read all of the relevant posts for an explanation.

 

Vger

Share this post


Link to post
Share on other sites

Vger, maybe you should simply settled with including this code change in the install or readme file.

Reading the relevant post, a few person did agree that this is a bug. So include it to get people a chance to make up their mind.

 

A quick fix that might be even better is to have the checkbox ticked if someone as already been throught the process and ticked it once already. Giving them a chance to have a display that is exactly correct and inline with the checkout actual settings, and also giving them a chance to untick it if they choose to !!

Share this post


Link to post
Share on other sites
The next CCGV update will not include that code, and I do not consider the way CCGV works to be a bug. Please take the time to read all of the relevant posts for an explanation.

 

Vger

 

Ager

 

Thank you for your pointer to the other posts, but unfortunately I could not find any good explanation other than agree that it is a matter of choices of how one may think their implementation should work/behave, and everyone should have the full right to make their own decision.

 

Well, maybe it does not fully qualify for a ?bug?, in fact, when I first tested CCGV (trad) and found this ?bit? the word ?bug? did not actually come into my mind, but thought that was ?something? that could be improved upon. Based on my many years of application software programming/testing experience, I?ve got into the habit of trying out all the scenario to ensure that every line of code is run through and is correct as intended. It is also my humble opinion that, as a developer, I?d not dictate how a user may think or do.

 

OK, let?s forget about the word ?bug?, and have a look at how CCGV (trad) works or intends to work: Say, you have some money in your gift voucher account. You now arrive at the check out payment page. There?s ?Tick to use Gift Voucher account balance? check box, and you check it, then click Continue to go to the next confirmation page. There there?s the ?Payment Method (Edit)? option, and you think you still have some money in your Paypal account and you want to use it, or you have been offered 1 yr zero interest on purchase on your credit card and you want to take advantage of this, or whatever, then you click the edit (payment method) link but only to find that you can not actually ?edit? the payment method despite the ?Tick to use Gift Voucher account balance? being shown unchecked and you having clicked the other payment option! Now, the ?logic? here it seems to me either you do not allow the user to ?edit? payment method by not showing this option at all (albeit the user may still try to press the Back button on keyboard to return to the previous page), or you genuinely allow the user to edit the payment method by, e.g., adding the two extra lines of code. Shoppers frustration is the last thing any shop owner wants.

 

Whatever, CCGV (trad), as many have said, remains a great contribution.

 

Ken


commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Share this post


Link to post
Share on other sites

And on the reverse side of things, if that mod is applied and someone applies a Gift Voucher to a purchase, doubles back and it gets unregistered and then proceeds without noticing that they are no longer using their Gift Voucher then they are going to be really hacked off if they notice and have to double back again, and even more hacked off if they don't notice at all and end up paying more than they intended to.

 

No. I am not applying that mod to CCGV(trad).

 

Vger

Share this post


Link to post
Share on other sites
And on the reverse side of things, if that mod is applied and someone applies a Gift Voucher to a purchase, doubles back and it gets unregistered and then proceeds without noticing that they are no longer using their Gift Voucher then they are going to be really hacked off if they notice and have to double back again, and even more hacked off if they don't notice at all and end up paying more than they intended to.

 

No. I am not applying that mod to CCGV(trad).

 

Vger

 

 

Ager

 

I am not here to ask, or let alone to force, you to include the 'fix'. But I honestly do not follow what you say above and am seriously thinking of me missing something on my own tests?

 

1. ...doubles back and it gets unregistered and then proceeds without noticing that they are no longer using their Gift Voucher...

 

The user can not proceed without selecting at least one payment method, either use the gift voucher or pay by card or something else. Instead there will be a pop up error box informing the user of this, which is by design as far as osCom & CCGV (trad) are concerned.

 

2. ...if they don't notice at all and end up paying more than they intended to...

 

There is no way the user would end up paying more: if both 'use gift voucher' and other payment method are clicked, the gift voucher option, if there's enough amount, would automatically be the default payment method. This behaviour is also by design of CCGV (trad). On my tests, I backed & forwarded 10 times and found no possibility of over-payment, well, at least not on my implementation.

 

I actually have a working test site (see my home page, pls ignore the layout, background etc) that connects to Protx test server. Anyone could use fictitious details to buy anything albeit there?s no delivery! :P

 

The above is based on the tests on my test site.

 

 

Ken


commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Share this post


Link to post
Share on other sites

Ken even though I fully support your cause for the fix. Rehea's argument holds water. I think she means the following scenerio: a customer clicks back for example, but not to change their mind about using the discount but say to use a different credit card number and hen proceeds forward again without noticing that the discount is not being used anymore ... . Although that could probably be addressed somehow with a visible message or something I dont know. I am not proposing whos right or rong just felt like commenting :). I might use the fix; still thinking about it.

Edited by Voland

People dont change, people realize.

Share this post


Link to post
Share on other sites

Hi Top,

 

Thank you for your sugestion. I havnt gotten around to trying it. A consultant I hired fixed the problem the other way. When I have the time I will try your fix to see if it works too, out of professional curiosity. The problem he found was in the checkout_process.php. "Gran total is calculated in before_checkout function. But orders total processing is done after this function" Solution was to put orders total processing code before before_process method.

 

  require(DIR_WS_CLASSES . 'order_total.php');
 $order_total_modules = new order_total;

 $order_totals = $order_total_modules->process();

 $payment_modules->before_process();

instead of

  $payment_modules->before_process();

 require(DIR_WS_CLASSES . 'order_total.php');
 $order_total_modules = new order_total;

 $order_totals = $order_total_modules->process();

 

So if your solution works too, which should I use. What do you think? :)

 

Arkady

 

 

Hi

 

Try changing

$grantotal = number_format($order->info['total'], 2);

 

to

$grantotal = number_format($HTTP_POST_VARS['ord_total'], 2);

 

Tom


People dont change, people realize.

Share this post


Link to post
Share on other sites
Ken even though I fully support your cause for the fix. Rehea's argument holds water. I think she means the following scenerio: a customer clicks back for example, but not to change their mind about using the discount but say to use a different credit card number and hen proceeds forward again without noticing that the discount is not being used anymore ... . Although that could probably be addressed somehow with a visible message or something I dont know. I am not proposing whos right or rong just felt like commenting :). I might use the fix; still thinking about it.

 

Hi Voland,

No I am not here to argue anything. I simply think that may make things better and some people could benefit from it. I found what she said did not match what I saw in my tests and thought maybe I did not test it properly? I do not use the discount part of CCGV (trad) so I can not make any comment on it but I believe the principle would still apply, i.e., no tick no use - a matter of consistency. Note that Ager did use the word 'Gift Voucher', not 'discount voucher'. Also note that the fix does not apply to discount code, as Phocea clearly states in the fix, so you do need to think about/test it if you want to use it on the Discount feature of CCGV (trad).

Ken


commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Share this post


Link to post
Share on other sites

Ken, you did test it right.

i think the solution for everyone to agree is right in front off everyone eyes ..

As I said before, yes someone could be annoyed to have to step back because the gift voucher is not used anymore ...

However at the moment it is IMPOSSIBLE for someone to remove it if thy change their mind ... hence why once the bos is ticked, it should remain tick when u get back to checkout_payment, but it should be possible to untick if if so we choose

 

I am also a developper for many years now and stopping a user doig what he could want is simply one of the first thing you try to avoid in the logic...

Share this post


Link to post
Share on other sites

Arkady - I would be interested to find out if your fix works in the following scenario:

 

1. Multiple payment options on the checkout_payment.php page.

2. CCGV (any version) installed

 

The reason I ask is that the previous fix was posted for a problem with Authorize Net, but did not work when multiple payments options and CCGV was installed - it then resulted in a 'class' error on the checkout_payment.php page. This was tried months ago and so I cannot now remember exactly what the error was. I would be interested to know if the fix you have applied works in that scenario.

 

Vger

Hi Top,

 

Thank you for your sugestion. I havnt gotten around to trying it. A consultant I hired fixed the problem the other way. When I have the time I will try your fix to see if it works too, out of professional curiosity. The problem he found was in the checkout_process.php. "Gran total is calculated in before_checkout function. But orders total processing is done after this function" Solution was to put orders total processing code before before_process method.

 

  require(DIR_WS_CLASSES . 'order_total.php');
 $order_total_modules = new order_total;

 $order_totals = $order_total_modules->process();

 $payment_modules->before_process();

instead of

  $payment_modules->before_process();

 require(DIR_WS_CLASSES . 'order_total.php');
 $order_total_modules = new order_total;

 $order_totals = $order_total_modules->process();

 

So if your solution works too, which should I use. What do you think? :)

 

Arkady

Share this post


Link to post
Share on other sites

Just afew more lines to add to my previous post below. I just did some tests on Discount Coupons and found that once you redeemed a discount code you could not un-redeem it as there's no tick box or un-redeem button, and as such, you can not 'forget' to redeem it and end up paying more (without discount). That may make sense as discount coupon, unlike Gift Vouchers which you need to spend money to buy, is simply a give-away gift from the shop so why not just use it any way. In summary, my tests show that Phocea's fix does not have any effect on the Discount Coupon feature of CCGV (trad), and IMHO, there need not be.

 

Ken

Hi Voland,

No I am not here to argue anything. I simply think that may make things better and some people could benefit from it. I found what she said did not match what I saw in my tests and thought maybe I did not test it properly? I do not use the discount part of CCGV (trad) so I can not make any comment on it but I believe the principle would still apply, i.e., no tick no use - a matter of consistency. Note that Ager did use the word 'Gift Voucher', not 'discount voucher'. Also note that the fix does not apply to discount code, as Phocea clearly states in the fix, so you do need to think about/test it if you want to use it on the Discount feature of CCGV (trad).

Ken


commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Share this post


Link to post
Share on other sites

Hi Rhea,

 

Well, the solution works when either or combined the coupon or voucher or points (P/R contrib) are applied. I beleive I have your latest CCGV(trad) installed. I also have the Check/Money Order method of payment installed/turned on which shows up as an option on the checkout_payment.php together with the LinkPoint API. I am planing to Install the PayPal API in the near future so I'm not sure how it will work then. But so far so good. If you have any particular scenario youd like me to test let me know.

 

Arkady - I would be interested to find out if your fix works in the following scenario:

 

1. Multiple payment options on the checkout_payment.php page.

2. CCGV (any version) installed

 

The reason I ask is that the previous fix was posted for a problem with Authorize Net, but did not work when multiple payments options and CCGV was installed - it then resulted in a 'class' error on the checkout_payment.php page. This was tried months ago and so I cannot now remember exactly what the error was. I would be interested to know if the fix you have applied works in that scenario.

 

Vger

Edited by Voland

People dont change, people realize.

Share this post


Link to post
Share on other sites

Yes, I've just tested it with Authorize Net and it is working - no more class error. I have to try it with the osCommerce Pay Pal IPN next.

 

Thanks.

 

Vger

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

×