Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Credit Class/Gift Vouchers/Discount Coupons 5.10


Strider

Recommended Posts

Serious Bug in Credit Class & Gift Voucher

 

Hi Everybody,

 

I am using Credit Class & Gift Voucher contribution (http://www.oscommerce.com/community/contributions,282/). It is a great and powerful contribution. I am using the latest version(CCGV version 5.16) with "CCGV Easier to Understand Payment Addon v1.2". I also updated the CCGV to "bunch of fixes v1.1 (table/roundoff/etc.) -24 Feb 2006" aviram bugs fix.

 

But I got a serious issue (bug) in this contribution. So I list how this bug created. I think this bug in every install of this great contribution.

 

-------------------------------------------------------------------

Assume I have enable 2Checkout and Cheque payment methods in Admin.

 

Bugs happening activities

----------------------

 

1)When customer in the "checkout_payment.php" page for make payment and has total amount is less than "Gift Voucher" balance and if customer first select 2Checkout(or cheque) as payment method and proceed to "checkout_confirmation.php" and some reason if he decide to go back to "checkout_payment.php" and select Gift Voucher as payment method and proceed to "checkout_confirmation.php" given a problem that that text displayed Playment Method as 2Checkout and also ""Gift Vouchers (-) :$xx.xx" is also displayed. When we check the generated html code we can find the 2Checkout payment module is active and "<input type="hidden" name="x_amount" value="0.00">" and other 2Checkout related hidden fields. So if the user click "Confirm Order" button he will conduct to the 2Checkout page with 0 total amount instead of minus the amount of this Gift Voucher balance.

 

***If the user only select Gift Voucher as his payment method in "checkout_payment.php" page and proceed to "checkout_confirmation.php" page and clicking "Confirm Order" button will reduce the amount of this Gift Voucher balance in correct way.

 

***If the total amount is greater than "Gift Voucher" balance will work correctly and if user select gift voucher and 2Checkout as payment method and proeed to Checkout confirmation page and clicking "Confirm Order" button he will conduct to the 2Checkout page with correct amount.( total amount - gift voucher balance= remaining amount pass for 2CO)

 

---------------------------------------------------------------------------

 

Assume I have only enable 2Checkout payment method in Admin.

 

Bugs happening activities

----------------------

 

1)When customer in the "checkout_payment.php" page for make payment and has total amount is less than "Gift Voucher" balance and if customer select Gift Voucher as payment method proceed to "checkout_confirmation.php" will given a problem that that text displayed Playment Method as 2Checkout and also ""Gift Vouchers (-) :$xx.xx" is also displayed. When we check the generated html code we can find the 2Checkout payment module is active and "<input type="hidden" name="x_amount" value="0.00">" and other 2Checkout related hidden fields. So if the user click "Confirm Order" button he will conduct to the 2Checkout page with 0 total amount instead of minus the amount of this Gift Voucher balance.

 

***If the total amount is greater than "Gift Voucher" balance will work correctly and if user select gift voucher and 2Checkout as payment method and proeed to Checkout confirmation page and clicking "Confirm Order" button he will conduct to the 2Checkout page with correct amount.( total amount - gift voucher balance= remaining amount pass for 2CO)

 

-------------------------------------------------------

 

I don't know what is the problem. I check the all the PHP code related to Gift Voucher contribution but unfortunately I could't resolve the problem. Then I install the old versions of the CCGV. But same problem is there.

 

Unfortunately my site is not in the live system. Still I am developing the site in local environment.

 

So please help me to solve this problem.

 

Thanks for everyone to make this great contribution. thanks. :D

 

------------

Anuruddha

Link to comment
Share on other sites

  • Replies 4.8k
  • Created
  • Last Reply

Top Posters In This Topic

I had that too.

 

You need to change the order in Modules - Order Total so that Total appears last. This then captures any vouchers and coupon discounts.

 

W

 

I'm testing the CCGV and for some reason the credit is not being deducted from the total. Below is how it displays at checkout confirmation.

Sub-Total: $64.95

Flat Rate (Best Way): $5.00

Total: $69.95

Discount Coupons:93a6dc: -$16.09

Any suggestions? I've installed all the rollouts and patches and nothing.

Link to comment
Share on other sites

HI Wired PSF,

 

Thanks for your post.

 

I will try that. If it works it is great.

 

-------------------

Anuruddha

 

 

 

 

I had that too.

 

You need to change the order in Modules - Order Total so that Total appears last. This then captures any vouchers and coupon discounts.

 

W

Link to comment
Share on other sites

What exact file are you referring to? I cannot spot anything in the ot_total.php file, can you please post a snippet of code so I know what to look for and what files I need to adjust??

 

Thanks a million!

 

 

I had that too.

 

You need to change the order in Modules - Order Total so that Total appears last. This then captures any vouchers and coupon discounts.

 

W

Link to comment
Share on other sites

What exact file are you referring to? I cannot spot anything in the ot_total.php file, can you please post a snippet of code so I know what to look for and what files I need to adjust??

 

Thanks a million!

In admin control panel. It is in the install instructions.

Link to comment
Share on other sites

Hi guys, still clueless on how to add the value of a voucher to an account as soon as it is created?

 

Has anyone done this?

or can offer some tips / pointers?

 

Would be appreciated,

ally

Link to comment
Share on other sites

Hi guys... am having a few probs. I've installed CCGV v5.16, and just installed 'coupon admin rollup 3'. The first installation seemed to work fine, it was after installing the rollup that I've had problems. Now when I try to log into my admin it says:

 

Fatal error: Cannot redeclare tep_set_coupon_status() (previously declared in /var/.../catalog/admin/includes/functions/general.php:752) in /var/.../catalog/admin/includes/add_ccgvdc_application_top.php on line 100

 

I've gone though and double checked the installation instructions for the rollup, and I'm pretty sure I've followed it correctly - does anyone have any ideas? Has this happened to anyone else?

 

Thanks

Barbara

Link to comment
Share on other sites

Hi guys... am having a few probs. I've installed CCGV v5.16, and just installed 'coupon admin rollup 3'. The first installation seemed to work fine, it was after installing the rollup that I've had problems. Now when I try to log into my admin it says:

 

Fatal error: Cannot redeclare tep_set_coupon_status() (previously declared in /var/.../catalog/admin/includes/functions/general.php:752) in /var/.../catalog/admin/includes/add_ccgvdc_application_top.php on line 100

 

I've gone though and double checked the installation instructions for the rollup, and I'm pretty sure I've followed it correctly - does anyone have any ideas? Has this happened to anyone else?

 

Thanks

Barbara

Oh yeh, while I'm here, how do I open aviram's 'bunch of fixes v1.1 (table/roundoff/etc.)' contribution - it's a .gz file... i'm oh so confused :blink:

Edited by bobsi18
Link to comment
Share on other sites

No.

It looks like they are declared in both files (only needs to be in one). Take the CCGV mod out of general.php

 

If you have winrar you can extract the files, otherwise send me a Personal Message with your email address and I will email a zip version to you.

Link to comment
Share on other sites

Oh yeh, while I'm here, how do I open aviram's 'bunch of fixes v1.1 (table/roundoff/etc.)' contribution - it's a .gz file... i'm oh so confused :blink:

Sorry, just had a look at the .gz file (didn't use it myself). All you need to do is to take the .gz part off the filename so that it becomes CCGV5.16_fixes.txt (a text file).

 

Personally, I stopped doing mods when I got CCGV 5.51a2-parts1 2 working.

 

I am now waiting for the new updated version to be completed before I touch this contrib again.

Link to comment
Share on other sites

Hi

 

I have installed this (again!!, screwed up OSC and had to reinstall, so much for backing up!!).

 

All is fine, except in Modules, Order Totals Modules, I have installed both Coupons and GVs, but the Coupons install button does not switch to the Remove and Edit options. If I click on the little arror under Action, I can edit, but alas the Install button remains.

 

Any ideas on what I have missed. Have double checked ot_coupon.php in modules, and languages/english/mod/order_total, every thing seems to be in place.

 

Appreciate any ideas.

 

W

Link to comment
Share on other sites

Hi

 

Just done a test order. I bought a ?50 voucher and then used that to buy some goods.

 

In checkout it shows:

 

Sub-Total: ?9.99

Discount Coupons:club: -?1.00

Flat Rate (Best Way): ?5.00

Gift Vouchers (-) : ?13.99

Total: ?-13.99

 

When I confirm the ?13.99 does come off my voucher but the above does not look right if you are a customer. Given that the 13.99 comes off as the voucher, should the total not be ?0

 

Also, raised this last week. Is there any way of moving the negative sign next to Gift Vouchers to the left of the number. In the above case to become:

 

Gift Vouchers : -?13.99

 

Thanks

 

W

Link to comment
Share on other sites

No.

 

OK then...I am using Linkpoint. I have installed this contribution (v 5.16) and I get all the way thru checkout except after I enter a credit card number and click continue, the page comes up with an error referring to my linkpoinconnect.php file. This should be my checkout_confirmation.php page. And shouldn't the discount show up before then or does it come up after I pay and then show the subtotal, shipping, etc.?

 

Also, I ran the SQL but I don't have this in my admin>modules>order total. I think there should be the Discount Coupons that I'm supposed to install but it's not there.

 

I have been able to create a voucher and I emailed it to myself hoping to use it at checkout but as mentioned above, I get an error page.

 

Any suggestions would be fantastic! Thanks!

Link to comment
Share on other sites

Its been a few weeks since I messed with fixing this contribution.

 

Problem 1)

Right now all my problems exist with the gift vouchers. When someone purchases a gift voucher it sends them a order comfirmation just like all the rest. It does not include the information for redeeming the new voucher.

 

Problem 2)

I can send vouchers to customers via the admin interface and it shows up in their e-mail with the information needed to redeem the voucher. After checking out with the voucher the amount used is not deducted from the customers voucher account. So they can keep using the voucher if they want.

 

Does anyone know where to start looking to solve these two issues. If I can get these fixed I would be one happy camper.

Modules installed:

http://www.oscommerce.com/forums/index.php?showtopic=57259 - Options attributes

- wysiwyg editor

- cats on main page

- policies and terms

Link to comment
Share on other sites

I am having the same problem:

1) When the customer checks out and it forwards to paypal, the discount is not there. The customer will end up paying the original amount without the coupon discount.

I am currently using version 5.16 of CCG.

And I have the same problem as Arrowhead123 (QUOTE(Arrowhead123 @ Mar 17 2006, 05:01 PM) )

 

Can you please help, I have been trying to solve this for couple days.

Link to comment
Share on other sites

Hello,

So it seems that CCG came with two paypal files:

paypal.php (made by devosc)

paypal_ipn.php (seems to be made by osc)

 

So, I currently have two paypal modules installed. The one that you said you have working by devosc, I installed. However, when I try to checkout, it gives me these errors:

 

 

Warning: before_process(includes/modules/payment/paypal/classes/osC/osC.class.php): failed to open stream: No such file or directory in /homepages/27/d151568494/htdocs/includes/modules/payment/paypal.php on line 141

 

Warning: before_process(): Failed opening 'includes/modules/payment/paypal/classes/osC/osC.class.php' for inclusion (include_path='.:/usr/local/lib/php') in /homepages/27/d151568494/htdocs/includes/modules/payment/paypal.php on line 141

 

Fatal error: Undefined class name 'paypal_osc' in /homepages/27/d151568494/htdocs/includes/modules/payment/paypal.php on line 142

 

The following is lines 141 and 142:

if(!class_exists('PayPal_osC')) include_once(DIR_WS_MODULES . 'payment/paypal/classes/osC/osC.class.php');

if (PayPal_osC::check_order_status()) {

 

It appears that I don't have osC.class.php file and also this path doesn't exist. It seems as if CCG omitted this from their distribution.

 

Am I missing something here?

 

 

The file with that text also has in its header

$Id: paypal.php,v 1.1.1.1 2004/09/22 13:45:13 devosc Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

DevosC, Developing open source Code

http://www.devosc.com

 

Copyright ? 2003 osCommerce

Copyright ? 2004 DevosC.com

 

Released under the GNU General Public License

 

To me, this is the PayPal_IPN developed by Gregory Babool (DevOSC) and not the official OSC one.

 

The one by DevOSC is the one that I use and seems to work.

Link to comment
Share on other sites

Hello,

So it seems that CCG came with two paypal files:

paypal.php (made by devosc)

paypal_ipn.php (seems to be made by osc)

 

So, I currently have two paypal modules installed. The one that you said you have working by devosc, I installed. However, when I try to checkout, it gives me these errors:

The following is lines 141 and 142:

It appears that I don't have osC.class.php file and also this path doesn't exist. It seems as if CCG omitted this from their distribution.

 

Am I missing something here?

It is assumed that you have a PayPal contrib installed and working before this contrib is installed, not the other way around.

 

If you installed the DevOSC paypal contrib (I have version 3.1.5), get it working before getting CCGV working (I have CCGV 5.51a2-parts1 2) with it. Any questions regarding PayPal should be placed in the correct thread.

 

In one of the earlier versions of CCGV, there were instructions about installing the PayPal IPN. From memory, it referred to the ext folder as the one to use (but I may be wrong, and usually am).

Link to comment
Share on other sites

.......

Problem 2)

I can send vouchers to customers via the admin interface and it shows up in their e-mail with the information needed to redeem the voucher. After checking out with the voucher the amount used is not deducted from the customers voucher account. So they can keep using the voucher if they want.

 

Does anyone know where to start looking to solve these two issues. If I can get these fixed I would be one happy camper.

 

The DB update for deducting credit from acct is a function..

 

function apply_credit()

 

found in ... includes/modules/order_total/ot_coupon.php

 

try to trace out where and when its called - I found this earlier tonight... trying to debug err msg generating from the same file.

 

<sigh.. 22 hrs straight 2day and runnin outta juice ... >

Edited by _belly
Link to comment
Share on other sites

Hi guys... am having a few probs. I've installed CCGV v5.16, and just installed 'coupon admin rollup 3'. The first installation seemed to work fine, it was after installing the rollup that I've had problems. Now when I try to log into my admin it says:

 

Fatal error: Cannot redeclare tep_set_coupon_status() (previously declared in /var/.../catalog/admin/includes/functions/general.php:752) in /var/.../catalog/admin/includes/add_ccgvdc_application_top.php on line 100

 

I've gone though and double checked the installation instructions for the rollup, and I'm pretty sure I've followed it correctly - does anyone have any ideas? Has this happened to anyone else?

 

Thanks

Barbara

***hits herself on the head...*** I just gave it one more shot, and it looks like I was adding code 1 line above where I was supposed to add it - it's working now (fingers crossed!!!)

 

Sorry, just had a look at the .gz file (didn't use it myself). All you need to do is to take the .gz part off the filename so that it becomes CCGV5.16_fixes.txt (a text file).

 

Personally, I stopped doing mods when I got CCGV 5.51a2-parts1 2 working.

 

I am now waiting for the new updated version to be completed before I touch this contrib again.

 

Thanks Coopco, attempted to download it again and it just displayed a text file - certainly wasn't doing that last night!

Link to comment
Share on other sites

***hits herself on the head...*** I just gave it one more shot, and it looks like I was adding code 1 line above where I was supposed to add it - it's working now (fingers crossed!!!)

Thanks Coopco, attempted to download it again and it just displayed a text file - certainly wasn't doing that last night!

Once you have it working, I would suggest that you stop doing updates, rollups, etc.

 

Wait for the next full version. It should have enhancements, cleaner code etc.

Link to comment
Share on other sites

Hi

 

When I apply a coupon discount and a voucher I find the calculation is wrong ie

 

Sub-Total: ?99.90

Discount Coupons:club: -?9.99

Flat Rate (Best Way): ?5.00

Gift Vouchers (-) : ?50.00

Total: ?-5.09

 

Any thoughts on resolving this. becasue it is not a logical number (ie a negative of the balance) I am not sure where to start.

 

Darn, thought it was working too.

 

W

Link to comment
Share on other sites

If I just apply a voucher I get this (as an example)

 

Sub-Total: ?49.95

Flat Rate (Best Way): ?5.00

Gift Vouchers (-) : ?50.00

Total: ?-45.05

 

Cheers

 

W

 

Hi

 

When I apply a coupon discount and a voucher I find the calculation is wrong ie

 

Sub-Total: ?99.90

Discount Coupons:club: -?9.99

Flat Rate (Best Way): ?5.00

Gift Vouchers (-) : ?50.00

Total: ?-5.09

 

Any thoughts on resolving this. becasue it is not a logical number (ie a negative of the balance) I am not sure where to start.

 

Darn, thought it was working too.

 

W

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