Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Credit Class/Gift Vouchers/Discount Coupons 5.10


Strider

Recommended Posts

For one thing, if I'm not mistaken sql injection fixes the same thing that addslashes does...  and addslashes is suppost to be the incorrect way to fix it.  Although I might be wrong on that.  There used to be an update that said to not use the addslashes fix, but it got removed so I do not know what the case is. 

 

The section of code you provided is EXACTLY like mine, and I'm not getting that error.  From the error it looks like it's not finding the tep function, make sure you havn't commented out any require's or anything.  in mine, it requires aplication_top.php, header.php, footer.php, and application_bottom.php

 

EDIT: just read connorm's post.  looks like connorm went more in depth so listen to them  :blush:

 

Thank you! :thumbsup: :D Joanna xXx

Half your problems aren't problems at all and the other half are only half as bad as you think they are :)

Link to comment
Share on other sites

  • Replies 4.8k
  • Created
  • Last Reply

Top Posters In This Topic

Quick question I have been running this for some time and it works great so kudos for that , but just today I enabled the Welcome Guest Discoutn COupon and it doe snot send an email to the web based accounts or isop ones what can I do to fix this? Been reading boards for hours with no solution. I am assuming it sends a welcoem email with the coupon code but nothing ever shows up? Thanks!

Link to comment
Share on other sites

Quick question I have been running this for some time and it works great so kudos for that , but just today I enabled the Welcome Guest Discoutn COupon and it doe snot send an email to the web based accounts or isop ones what can I do to fix this?  Been reading boards for hours with no solution. I am assuming it sends a welcoem email with the coupon code but nothing ever shows up? Thanks!

 

It just tags a few lines onto the bottom of the default Osc welcome mail with the discount code.

 

Does the rest of your shop send mails OK ?

Link to comment
Share on other sites

Hi,

 

Firstly, big thanks to all who have been involved in making this contribution - it's fantastic.  I hope that the information below helps in making it even better.

 

I am using the latest versions of all the files for this contrib on MS2.2.

 

Firstly, there is a small ommission of the ICW comment string in the includes/boxes/shopping_cart file.  There is some Javascript at the start that makes the popup_coupon_help work:

 

<!-- shopping_cart //-->
<script language="javascript"><!--
function couponpopupWindow(url) {
?window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,re
sizable=yes,copyhistory=no,width=450,height=280,screenX=150,screenY=150,top=150,l
eft=150')
}
//--></script>

 

That will fix the problem for anyone who has been wondering why the popup does nothing (and generates an error).

 

Next, I have also made some other changes to this file.  Using this code, instead of having

 

"coupon: more info"

 

in the shopping cart infobox, you will have:

 

"coupon: (name of coupon you entered in admin)

more info"

 

To me this makes more sense, but that's a matter of opinion.  Here is the code for includes/boxes/shopping_cart:

 

Find ~line 90:

if (tep_session_is_registered('cc_id') && $cc_id) {
? ?$info_box_contents[] = array('align' => 'left','text' => tep_draw_separator());
? ?$info_box_contents[] = array('align' => 'left','text' => '<table cellpadding="0" width="100%" cellspacing="0" border="0"><tr><td class="smalltext">' . CART_COUPON . '</td><td class="smalltext" align="right" valign="bottom">' . '<a href="javascript:couponpopupWindow(\'' . tep_href_link(FILENAME_POPUP_COUPON_HELP, 'cID=' . $cc_id) . '\')">' . CART_COUPON_INFO . '</a>' . '</td></tr></table>');

 

Replace with:

if (tep_session_is_registered('cc_id') && $cc_id) {
?$coupon_query = tep_db_query("select * from " . TABLE_COUPONS . " where coupon_id = '" . $cc_id . "'");
?$coupon = tep_db_fetch_array($coupon_query);
?$coupon_desc_query = tep_db_query("select * from " . TABLE_COUPONS_DESCRIPTION . " where coupon_id = '" . $cc_id . "' and language_id = '" . $languages_id . "'");
?$coupon_desc = tep_db_fetch_array($coupon_desc_query);
?$text_coupon_help = sprintf($coupon_desc['coupon_name']);
? ?$info_box_contents[] = array('align' => 'left','text' => tep_draw_separator());
? ?$info_box_contents[] = array('align' => 'left','text' => '<table cellpadding="0" width="100%" cellspacing="0" border="0"><tr><td class="infoBoxContents">' . CART_COUPON . $text_coupon_help . '<br>' . '<a href="javascript:couponpopupWindow(\'' . tep_href_link(FILENAME_POPUP_COUPON_HELP, 'cID=' . $cc_id) . '\')">' . CART_COUPON_INFO . '</a>' . '</td></tr></table>');

 

 

Thanks in advance.

-Christian

 

Well I did this andthe file still does not pop up and I made sure the fiel wasuploaded..... does it need to have the rul in there? I have no moreideas to trry thanks!

 

Maddie

Link to comment
Share on other sites

Hi,

 

The file /admin/gv_mail.php has a minor bug, the following code block:

 

if (SEARCH_ENGINE_FRIENDLY_URLS == 'true') {
 $message .= HTTP_SERVER  . DIR_WS_CATALOG . 'gv_redeem.php' . '/gv_no,'.$id1 . "\n\n";
} else {
 $message .= HTTP_SERVER  . DIR_WS_CATALOG . 'gv_redeem.php' . '?gv_no='.$id1 . "\n\n";
}

 

if a site is using SE friendly url set to true/enabled, the code above is of course writing out the URL as follows:

 

https://www.example.com/gv_redeem.php/gv_no,c8s37c

 

and if a customer tries to use it, this cause osCommerce to 'go beserk', and the following message appears:

 

"Redirection limit for this URL exceeded. Unable to load the requested page. This may be caused by cookies that are blocked."

 

Cookies are not blocked, the code correction is shown in blue

 

=================

 

if (SEARCH_ENGINE_FRIENDLY_URLS == 'true') {

$message .= HTTP_SERVER . DIR_WS_CATALOG . 'gv_redeem.php' . '/gv_no/'.$id1 . "\n\n";

} else {

$message .= HTTP_SERVER . DIR_WS_CATALOG . 'gv_redeem.php' . '?gv_no='.$id1 . "\n\n";

}

 

=================

 

Peter

Link to comment
Share on other sites

How about posting that line of code along with about 5 lines before and after.

 

Sorry about that, You would think that it would be obvious to post the code that was causing me the problems.

 

This is the start and a few lines after

 

<?php

if ($HTTP_POST_VARS['message']) {

?>

<tr>

<td class="main"><?php echo sprintf(PERSONAL_MESSAGE, $gv_result['customers_firstname']); ?></td>

</tr>

<tr>

<td class="main"><?php echo stripslashes($HTTP_POST_VARS['message']); ?></td>

</tr>

<?php

}

Link to comment
Share on other sites

Hey Folks-

 

I am curious to know if anyone else is thinking along the same lines as I am....

 

here we have a great contrib with some holes in it that sorely need to be fixed, and I think (but don't KNOW) that most of the things that need to be fixed are errors in the contrib, not due to errors in the osC release. so I'm not sure if waiting for a new release is the answer!

 

perhaps, between those of us who need to use the contrib and are frustrated with the waiting and sifting through bits of added code on this thread, and those of us who have development skills and even some development history with osC and its contribs [especially this one], we should figure out a course of action for the future of this contrib, if there is to be one!

 

i mean, how can you count on a contrib that has no backing, just a bunch of people conjecturing?

 

I was thinking that perhaps we should take it upon ourselves to push the open source concept a little further.

 

Perhaps some of us, like jonyo, hobbes, and popthetop, among others, should put our heads together, keep in more direct touch, and try to hammer our the bugs. And, perhaps those seeking answers without contributing more than test cases would consider earmarking $5-$20 each to pay the developers a pittance for their work.

I could pony up $100 of my contract fee for making this client's store work, if i thought it would help.

 

I guess I'd like to start by seeing if its possible to marshall the development troops. What does everyone think of this??? How about a meeting sometime in an IRC channel? Where are developers located and when are possible availability times?

 

Maybe I'm crazy.. but im on the west coast of usa... PST [gmt -8]... but id be willing to meet for an hour or two, ANY TIME, to get this moving. This is sort of a last-ditch idea; its not worth it for me to fix it all on my own, and i cant use it like it is, and there isn't enough support, so the next obvious option appears to be to RUN AWAY... and i cant imagine anyone has any better options [but if you do, TELL US! lol]

 

peace

allen

 

I'm in on this...anyone else?

Link to comment
Share on other sites

Hi

 

I hope someone can help me with this intermitent fault.

 

Basicly when a user logs in with an empty shopping cart and selects a product in the shopping_cart.php they are directed straight to checkout_payment.php without first going to checkout_shipping.php. Subsequently they can not complete the transaction after choosing their payment method and remain in the checkout_payment.php.

 

This has only occured since I added the Credit Card & Gift Vouchers Contribution.

 

I used the following contributions:

 

Credit Class & Gift Vouchers

 

4 Feb 2005 - The final

7 Feb 2005 - Corrections

10 Feb 2005 - gv_redeem bug

19 Feb 2005 - GV_redeem anti SQL injection

21 Feb 2005 - add addslashes will fix the bug

 

I think it may have something to do with the radio buttons for the selection of payment methods but I'm not sure why this occurs. Perhaps it is a problem with checkout_shipping.php? :huh:

 

I would be really grateful if anyone can help me sort this out please. Thanks in advance for any help. :blush:

 

 

Kind regards Joanna

Half your problems aren't problems at all and the other half are only half as bad as you think they are :)

Link to comment
Share on other sites

Hi

 

I hope someone can help me with this intermitent fault.

 

Basicly when a user logs in with an empty shopping cart and selects a product in the shopping_cart.php they are directed straight to checkout_payment.php without first going to checkout_shipping.php.  Subsequently they can not complete the transaction after choosing their payment method and remain in the checkout_payment.php.

 

This has only occured since I added the Credit Card & Gift Vouchers Contribution.

 

I used the following contributions:

 

Credit Class & Gift Vouchers

 

4 Feb 2005 - The final

7 Feb 2005 - Corrections

10 Feb 2005 - gv_redeem bug

19 Feb 2005 - GV_redeem anti SQL injection

21 Feb 2005 - add addslashes will fix the bug

 

I think it may have something to do with the radio buttons for the selection of payment methods but I'm not sure why this occurs.  Perhaps it is a problem with checkout_shipping.php?  :huh: 

 

I would be really grateful if anyone can help me sort this out please.  Thanks in advance for any help.  :blush:

Kind regards Joanna

 

I took out the line od code that was changed for the virtual shipping and it workd fine now as we do not sell virtual goods :thumbsup:

Half your problems aren't problems at all and the other half are only half as bad as you think they are :)

Link to comment
Share on other sites

Hi

 

Can anyone help me with this new problem? :huh: In coupon_admin.php when I enter the start date and expire date and go to preview they are listed as 01/01/1970 instead of the dates I selected, how can I rectify this? I replaced some of the code for the startdate and finishdate but it hasn't changed anything >_< can anyone point me in the right direction or possibly offer some code that can sort this out?

 

I used:

 

Credit & Gift Vouchers

 

4 Feb 2005 - The final

7 Feb 2005 - Corrections

10 Feb 2005 - gv_redeem bug

19 Feb 2005 - GV_redeem anti SQL injection

21 Feb 2005 - add addslashes will fix the bug

 

Thanks in advance for any help. :blush:

 

 

Kind regards Joanna

Half your problems aren't problems at all and the other half are only half as bad as you think they are :)

Link to comment
Share on other sites

Hi

 

I hope someone can help. For some reason since I added this contribution the tax is not getting added to my goods and the voucher isn't getting taken off :'(

 

This is the cart with no gift voucher at all:

 

Sub-Total: ?64.00

Zone Rates (Shipping to GB : 6 lb(s)): ?4.50

UK TAX 17.5%: ?9.53

Total: ?68.50

 

 

This is the cart with a ?10 gift voucher:

 

Sub-Total: ?64.00

Zone Rates (Shipping to GB : 6 lb(s)): ?4.50

UK TAX 17.5%: ?9.53

Total: ?68.50

 

Only the goods and the shipping is getting added up >_<

 

I have my admin/order totals set to this as per the instructions:

 

Tax recalculation required:

 

Sub-total - Sort order = 1

Shipping - Sort order = 2

Gift Voucher - Sort order = 740

Discount Coupons - Sort Order =760

Tax - Sort order = 800

Total - Sort Order = 900

 

Discount Coupon To:

 

Display Total: true

Sort Order: 760

Include Shipping: true

Include Tax: true

Re-calculate Tax: Standard

Tax Class: --none--

 

Gift Vouchers To:

 

Display Total: true

Sort Order: 740

Queue Purchases: true

Include Shipping: false

Include Tax: false

Re-calculate Tax: Standard

Tax Class: --none--

Credit including Tax: true

 

The tax is being calculated but not being added on :'( is it a bit of code in the order_total.php or the or other pages I need to edit or just the order and number listed for them? and not discount. :huh: Thank you in advance for any help.

 

 

Kind regards Joanna

Half your problems aren't problems at all and the other half are only half as bad as you think they are :)

Link to comment
Share on other sites

I am an idiot!! :blush: the tax was inclusive in the total price it is just the gift voucher which is not being deducted, sorry grovel, grovel . . . .

 

I hope someone can help. For some reason the voucher isn't getting taken off

 

This is the cart with no gift voucher at all:

 

Sub-Total: ?64.00

Zone Rates (Shipping to GB : 6 lb(s)): ?4.50

UK TAX 17.5%: ?9.53

Total: ?68.50

 

 

This is the cart with a ?10 gift voucher:

 

Sub-Total: ?64.00

Zone Rates (Shipping to GB : 6 lb(s)): ?4.50

UK TAX 17.5%: ?9.53

Total: ?68.50

 

I have my admin/order totals set to this as per the instructions:

 

Tax recalculation required:

 

Sub-total - Sort order = 1

Shipping - Sort order = 2

Gift Voucher - Sort order = 740

Discount Coupons - Sort Order =760

Tax - Sort order = 800

Total - Sort Order = 900

 

Discount Coupon To:

 

Display Total: true

Sort Order: 760

Include Shipping: true

Include Tax: true

Re-calculate Tax: Standard

Tax Class: --none--

 

Gift Vouchers To:

 

Display Total: true

Sort Order: 740

Queue Purchases: true

Include Shipping: false

Include Tax: false

Re-calculate Tax: Standard

Tax Class: --none--

Credit including Tax: true

 

Is it a bit of code in the order_total.php or the or other pages I need to edit or just the order and number listed for them? Thank you in advance for any help and sorry for the earlier post :blush:

 

 

Kind regards Joanna

Half your problems aren't problems at all and the other half are only half as bad as you think they are :)

Link to comment
Share on other sites

Hey Folks-

 

I am curious to know if anyone else is thinking along the same lines as I am....

 

here we have a great contrib with some holes in it that sorely need to be fixed, and I think (but don't KNOW) that most of the things that need to be fixed are errors in the contrib, not due to errors in the osC release. so I'm not sure if waiting for a new release is the answer!

 

perhaps, between those of us who need to use the contrib and are frustrated with the waiting and sifting through bits of added code on this thread, and those of us who have development skills and even some development history with osC and its contribs [especially this one], we should figure out a course of action for the future of this contrib, if there is to be one!

 

i mean, how can you count on a contrib that has no backing, just a bunch of people conjecturing?

 

I was thinking that perhaps we should take it upon ourselves to push the open source concept a little further.

 

Perhaps some of us, like jonyo, hobbes, and popthetop, among others, should put our heads together, keep in more direct touch, and try to hammer our the bugs. And, perhaps those seeking answers without contributing more than test cases would consider earmarking $5-$20 each to pay the developers a pittance for their work.

I could pony up $100 of my contract fee for making this client's store work, if i thought it would help.

 

I guess I'd like to start by seeing if its possible to marshall the development troops. What does everyone think of this??? How about a meeting sometime in an IRC channel? Where are developers located and when are possible availability times?

 

Maybe I'm crazy.. but im on the west coast of usa... PST [gmt -8]... but id be willing to meet for an hour or two, ANY TIME, to get this moving. This is sort of a last-ditch idea; its not worth it for me to fix it all on my own, and i cant use it like it is, and there isn't enough support, so the next obvious option appears to be to RUN AWAY... and i cant imagine anyone has any better options [but if you do, TELL US! lol]

 

peace

allen

 

I agree to this comment, I took the latest full package available and made the necessary security updates to find out that many functionalities are buggy! Reading this forum I found many people with problems but no real support. This contribution is great, but the code is quite complicated.

I have made a list of found bugs and as I prefer coding than reading forums, I'm preparing a new release (should be ready this week).

 

Please advise if you found more bugs.

 

- Gift voucher checkbox to use the balance in checkout_payment page is not visible.

- If visible, the checkbox is not working correctly: try to go to next page with the checkbox checked, then back, then again next page but with checkbox unchecked. In my case it was still using the balance even I unchecked the box.

- Division by zero error when customer wants to use its balance to pay, but he also enters a discount coupon code that is enough to pay the total. (So zero to pay with the gift voucher)

- The errors generated by the modules are visible only in the URL! Nothing shown on the checkout_payment page like other payment module do.

- The shopping_cart infobox link to popup is not working if you use STS.

 

Some tips for new users:

- install it using a comparison tool (like Beyond Compare). I did it on a moded store without problem.

- read the documentation on how to configure it.

- Be careful the order total sort order. Calculations are made in the order defined. For example everything put after the final total will not be counted inside the total.

 

Back soon,

 

Rigadin

Link to comment
Share on other sites

Hello people!

I'm on the verge of a nervous breakdown while writing this, seconds away from running to my doctor and getting a prescription on some sort of sedative >_<

 

The thing is, that I run a heavily modified store, (with a MS-2 core), and i'm trying to the best of my abilities to implement CCGV 5.12 (someone really ought to fix the downloads for this contrib by the way - it confuses the hell out of me, and probably lots of others).

 

It is a great contrib. no question about it, but I really only want the discount-coupons, well.. that's not my issue so i'll let it be for now :)

 

I've manged to get pretty far.. but when I (as a customer) am on checkout_payment.php, and want to either redeem a code, or skip it (move forward), i get sendt to login.php -> and no, i am not loosing my session or beeing logged out. I just can't figure out why, or -where- in the functions/code, something that would cause this lies.

 

Hence my post, i am wondering if a.) someone's experienced something similar, or b.) someone knows where i might track down the code in mentioning.

 

Best regards vebj?rn l. berg B)

Link to comment
Share on other sites

I have an addition that needs to be added. Under Gift Voucher's Sent/b], there needs to be an expriration date set so they can be deleted or you will have so many getting added into the database that it will begin to hog it down with useless data.

 

Or at lease a DELETE option when you hightlight one. I for one have 6 of them that were sent to myself while testing and no longer need them the database.

L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Link to comment
Share on other sites

I agree to this comment, I took the latest full package available and made the necessary security updates to find out that many functionalities are buggy! Reading this forum I found many people with problems but no real support. This contribution is great, but the code is quite complicated.

I have made a list of found bugs and as I prefer coding than reading forums, I'm preparing a new release (should be ready this week).

 

Please advise if you found more bugs.

 

- Gift voucher checkbox to use the balance in checkout_payment page is not visible.

- If visible, the checkbox is not working correctly: try to go to next page with the checkbox checked, then back, then again next page but with checkbox unchecked. In my case it was still using the balance even I unchecked the box.

- Division by zero error when customer wants to use its balance to pay, but he also enters a discount coupon code that is enough to pay the total. (So zero to pay with the gift voucher)

- The errors generated by the modules are visible only in the URL! Nothing shown on the checkout_payment page like other payment module do.

- The shopping_cart infobox link to popup is not working if you use STS.

 

Some tips for new users:

- install it using a comparison tool (like Beyond Compare). I did it on a moded store without problem.

- read the documentation on how to configure it.

- Be careful the order total sort order. Calculations are made in the order defined. For example everything put after the final total will not be counted inside the total.

 

Back soon,

 

Rigadin

 

Glad to hear someone has the time to do this! Just thought I would help out with one or two of the bugs, although they are such a simple fix I imagine you have already fixed them.

 

I do not have the checkbox problem, what exactly is the problem with it not showing up? My guess is that it is because the voucher is already registered as having been applied. (so this bug would go along with the other bug that if you went back, unchecked the box, then went forward it is still applied) I have already come up with a fix for this, that is used in my make-shift "easier to understand" update that I posted earlier in this thread. I imagine you already have the same or simular fix since all it entails is unregistering a session variable. If you need help figuring out which variable, either look at my update (it is one of the first instructions in my update) or ask and I'll go dig it up myself for you.

 

Another bug (which prompted me to create the "easier to understand" update):

Enter a redeem code for a voucher that you already have applied to your account. Check the box for applying the voucher. Click the Redeem. Different buggy stuff happens every time I do that, so I can't say for certain the exact result.

 

I have not figured out how to fix this bug, so instead I made it so that it is easier to understand the voucher process, so that the customer does not do what creates the bug. In other words I got rid of the probability that a customer will make the bug happen, but did not take away the problem itself.

 

I will try to help out if you need it, but like I said in previous posts I don't have the free time to do a major part of it.

Link to comment
Share on other sites

I have fixed all what I found. But I did not read enough backward inside this thread and did not see your "easier to understand" solution, which makes quite much sense.

 

The problem I had with the checkbox not showing up was when the coupon modules has bigger sort order than the gift voucher module, so it overwrites the checkbox (I'm using v5.12 as a base).

 

I found a much complicated fix for the "unregister", which will work for all modules without modifying checkout_payment.php, but is there many modules coming? Probably not => I'll take your more simple solution into my next update.

 

For your "Anoter bug", I did not see it but will make some more tests tomorrow.

 

I'm now testing another solution for the "easier to understand" stuff by using a payment module that checks the amounts => behaves like a normal payment module => no need to make many modifications to the existing code.

 

Back tomorrow...

 

- Rigadin

Link to comment
Share on other sites

Hi People,

 

I got this error at admin/order_total after installation of ccgv:

 

"Cannot redeclare class ot_coupon"

 

If I remove the the ot_coupon.php and ot _gv.php files the order_total page will load.

 

 

Any help will be appreciated.

 

 

Rich

Link to comment
Share on other sites

I have fixed all what I found. But I did not read enough backward inside this thread and did not see your "easier to understand" solution, which makes quite much sense.

 

The problem I had with the checkbox not showing up was when the coupon modules has bigger sort order than the gift voucher module, so it overwrites the checkbox (I'm using v5.12 as a base).

 

I found a much complicated fix for the "unregister", which will work for all modules without modifying checkout_payment.php, but is there many modules coming? Probably not => I'll take your more simple solution into my next update.

 

For your "Anoter bug", I did not see it but will make some more tests tomorrow.

 

I'm now testing another solution for the "easier to understand" stuff by using a payment module that checks the amounts => behaves like a normal payment module => no need to make many modifications to the existing code.

 

Back tomorrow...

 

- Rigadin

 

What do you mean by "using a payment module that checks the amounts => Ect Ect"? Do you mean you created a payment module to act like a payment method? You say you didn't see the "easier to understand" update-

 

Here is a Screen cap of how it looks in action.

Here are all the posts to do with the "easier to understand" update (note I found these by searching for "understand" on this thread":

 

"Easy to understand" base

 

fix- takes into account voucher not being used for tax/shipping

 

bug fix

 

another damn fix

 

last bug fix

 

Doing all of these bug fixes will bring you up to speed... or if you want to wait I will consolidate them some time soon and come up with an updated post of the base instructions. I know it seems complicated, with all the bug fixes, so if you are intimidated by it wait and I will come out with... oops I'm being redundant...

 

I also made the javascript logic like this: (through a mix of php code and javascript)

if voucher amount "that can be applied" = total -> when option selected, it disables other payment methods, and lets the person hit next

 

if voucher amount "that can be applied" < total -> when option selected, doesn't do anything special and user still has to click on another payment method before they can proceed

 

The reason I put "that can be applied" in quotes is to bring your attention that the original code didn't take into account whether or not the voucher is applied to taxes and shipping. the second link has a fix for it (and the rest of the links are bug fixes to that post, since I did not test anything before I submited it)

 

As it pertains to the current disscussion: how easy would it be to integrate this update to make it into a payment module option, with all the special javascript as described above? Popthetop came up with the idea initially to turn it into a payment module, but since my knowledge of payment modules is not very good, I figured it would be more work to get it to work like that since the way I have it coded is already working. What are your thoughts Rigadin?

Link to comment
Share on other sites

Hi People,

 

I got this error at admin/order_total after installation of ccgv:

 

"Cannot redeclare class ot_coupon"

 

If I remove the the ot_coupon.php and ot _gv.php files the order_total page will load.

Any help will be appreciated.

Rich

look at the order_total php file. Make sure you are not requiring the same file more than once. (so do a search for "require" in that file and if you see a line that is repeated comment out one of them)

 

Although I do not know why it would work when you removed the files, it should break the code...

Link to comment
Share on other sites

Hi

 

My coupons are now discounting correctly but I still have this annoying problem! >_< In coupon_admin.php when I enter the start date and expire date and go to preview they are listed as 01/01/1970 instead of the dates I selected, how can I rectify this? I replaced some of the code for the startdate and finishdate but it hasn't changed anything can anyone point me in the right direction or possibly offer some code that can sort this out? I don't know where it's getting the date from as the date in the database is 0000/00/00 00.00.00!? <_<

 

I used:

 

Credit & Gift Vouchers

 

4 Feb 2005 - The final

7 Feb 2005 - Corrections

10 Feb 2005 - gv_redeem bug

19 Feb 2005 - GV_redeem anti SQL injection

21 Feb 2005 - add addslashes will fix the bug

 

Thanks in advance for any help.

 

 

Kind regards Joanna

Half your problems aren't problems at all and the other half are only half as bad as you think they are :)

Link to comment
Share on other sites

look at the order_total php file.  Make sure you are not requiring the same file more than once.  (so do a search for "require" in that file and if you see a line that is repeated comment out one of them) 

 

Although I do not know why it would work when you removed the files, it should break the code...

jonyo,

 

There are no "require" calls in the file (there are "include" calls but I could not find any duplicate call). I replaced the classes/order_total.php with the old order_total.php file but the error shows up still (Fatal error: Cannot redeclare class ot_coupon in /home/virtual/site21/fst/var/www/html/catalog/includes/modules/order_total/ot_coupon.php on line 15

) - which gave me the impression that the order_total.php is fine. Like I said, if both the ot_gv and the ot_coupon files are removed, the order_total page still loads (although, still shows error) I could paste my order_total.php for you to take a look at may be you can spot what the problem is.

 

Many thanks in advance.

 

Rich

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