Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Credit Class/Gift Vouchers/Discount Coupons 5.10


Strider

Recommended Posts

That is strange, the javascript is working fine for me.  I probably failed to mention something or another.  It's strange that changing that in your code fixed it...  The only thing I can think of is maybe the new code is inserted a line or two off?  Here is all the code from my checkout_payment.php, compare it to yours and see if you come up with any major differences that would be causing the errors.

 

http://shop.faerietreasures.com/checkout_p...nt_temp.php.txt

 

I will be removing that file after we fix this issue, since it is potentially a security risk when my shop goes live...

 

 

Well, it seems to be pretty much the same thing all the way through the file. Please post a copy of your includes/classes/payment.php so I can check that as well.

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

  • Replies 4.8k
  • Created
  • Last Reply

Top Posters In This Topic

Ok since there are so many updates/fixes to download and here in the forums, what would be the best way for someone to install this contrib? Any help/info would be greatly appreciated, thanks all.

Link to comment
Share on other sites

I am getting a problem when trying to access my admin area it returns the error message below

 

I was getting a similar message could not find navigation_history.php just to see what happened I put a copy of this file in /admin/includes/languages/ it found it then. But it seems that catalog/admin/includes/application_top.php is looking in the wrong place for the required files. I thought that these files should be in catalog/includes? Anyone know how to fix this please.

 

 

Warning: file(includes/spiders.txt): failed to open stream: No such file or directory in /home/o/d/odleyart/public_html/catalog/admin/includes/application_top.php on line 178

 

Warning: main(includes/languages/add_ccgvdc_application_top.php): failed to open stream: No such file or directory in /home/o/d/odleyart/public_html/catalog/admin/includes/languages/english.php on line 302

 

Fatal error: main(): Failed opening required 'includes/languages/add_ccgvdc_application_top.php' (include_path='.:/lib/php') in /home/o/d/odleyart/public_html/catalog/admin/includes/languages/english.php on line 302

Link to comment
Share on other sites

Hi, this is probably a common problem but have not been able to find anything about it so far.

 

Have installed Credit Class & Gift Voucher mod and all appears to be working fine and am only using the Discount Coupons.

 

BUT.......

 

All looks fine to the user, applies the 10% discount to the cart including tax, then adds on shipping and gives the correct total.

 

BUT.......

 

When checking what customers have then paid the discount has actually NOT been applied and they paid the full amount.

 

e.g.

 

Sub-Total: ?47.80

UK Royal Mail Rates (Shipping to GB : 0.70 kg(s)): ?2.95

VAT: ?7.12

Discount Coupons:eco2209: -?4.78

Total: ?45.97

 

But they actually are paying the full - ?50.65

 

We use Protx Direct (don't know if this would make any difference)

The customer is none the wiser until they see their bank statement.

 

www.ecotopia.co.uk

Discount code: eco2209

[email protected]

 

Many thanks.

Link to comment
Share on other sites

another fix for my update: Sorry I didn't fully test everything before I posted the change to how it calculates the $ amount.... That is what is causing all these problems. Anyways, look at http://shop.faerietreasures.com/checkout_p...nt_temp.php.txt again, it has some updates.

 

update 1: put an if statement around the radio selector javascript so people can't still click on the text and have the radio selected, even though it is disabled

update 2: added 2 lines of code, that both start with $temp= (note, when you add these 2 lines back it it will probably break your if statement you modded popthetop)

update3: changed the if statement that is after the $temp= lines...

update4: I probably updated more stuff but I can't remember, I'm very sleepy right now..

 

Hope this fixes yours popthetop

 

creztor: install version 5.11 or so, and the bug fix near the top, not the one that fixes with addslashes but the one before it. If you have paypal ipn module installed, also do the paypal ipn update. Hope this helps.

 

ecotopia: sorry, havn't heard of that one before. Only thing I can think of is maybe you missed one or two steps in the instal? Just a thought... Also try messing with the order total, that might fix it maybe.

Edited by jonyo
Link to comment
Share on other sites

Hello jonyo,

 

i have installed 5_12 but when i checkout after purchase a item,

and have a voucher from 2.50 $ it will not work right.

 

the user have to pay the full cost.

 

i use PayPal_Shopping_Cart_IPN_v3.1.5 too, can it be, that this both

contrib?s not work together ????

 

Cheers

Hobbes

Link to comment
Share on other sites

Ok since there are so many updates/fixes to download and here in the forums, what would be the best way for someone to install this contrib?  Any help/info would be greatly appreciated, thanks all.

 

 

I will, but due to the size and time it will take, I have to charge you $50

 

If interested, PM me.

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

another fix for my update:  Sorry I didn't fully test everything before I posted the change to how it calculates the $ amount....  That is what is causing all these problems.  Anyways, look at http://shop.faerietreasures.com/checkout_p...nt_temp.php.txt again, it has some updates. 

 

 

Question...

 

What is this file for and what does it do?

<?php include ('includes/ssl_provider.js.php'); ?>

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

ecotopia: sorry, havn't heard of that one before. Only thing I can think of is maybe you missed one or two steps in the instal? Just a thought... Also try messing with the order total, that might fix it maybe.

 

Thanks Jonyo.

 

Have since found a couple of threads on this subject but not solved it.

 

1. Tried messing about with the sort order on the order total - this doesn't seem to solve the problem and even though the shopping total shows as correct to the customer the website is passing the wrong total to our secure payment Protx. Any suggestions on what I might try?

 

2. Someone suggested that it is not working because the discount mod was installed AFTER the Protx payment module - so uninstalled it and tried again - but no luck.

 

3. Debugging the protx payment shows that the discounted amount is not being passed through from the payment page... even though it is showing.

 

4. If I have missed a bit of the install... is there any way of telling which bit!!!

 

Thanks again.

Link to comment
Share on other sites

another fix for my update:  Sorry I didn't fully test everything before I posted the change to how it calculates the $ amount....  That is what is causing all these problems.  Anyways, look at http://shop.faerietreasures.com/checkout_p...nt_temp.php.txt again, it has some updates. 

 

update 1:  put an if statement around the radio selector javascript so people can't still click on the text and have the radio selected, even though it is disabled

update 2:  added 2 lines of code, that both start with $temp=  (note, when you add these 2 lines back it it will probably break your if statement you modded popthetop)

update3:  changed the if statement that is after the $temp= lines...

update4:  I probably updated more stuff but I can't remember, I'm very sleepy right now..

 

Hope this fixes yours popthetop

 

 

Ok, I used your file and made the found changed to mine.

 

When I use your file, it will not display the CCGV balance and checkbox at all in the payment options box at all.

 

I changed

  if ($gv_result['amount']>0){

 

To this

  if ($temp > 0) {

 

and it shows up, but the Javascript that disables the other payment buttons when your CCGV balance is higher than the order total still does not work.

 

 

Like I said before, I think that it has something to do with my catalog/includes/classes/payment.php file. Can you please post a copy of your catalog/includes/classes/payment.php so I can compare?

 

The reason I asked is that I know I made a few changes to it like chganging forms[0] to checkout_payment

 

This is a copy of that section (but I can not remember if there were other areas I changed???

    function javascript_validation($coversAll) {
     $js = '';
     if (is_array($this->modules)) {
   //BOF added to check for diff stuff
   if ($coversAll) {
   $addThis = 'if (document.checkout_payment.cot_gv.checked) {
      payment_value=cot_gv;  alert (\'hey yo - includes-classes-payment_php\');
      } else ';
   } else {
     $addThis = '';
     }
     //EOF added to check for diff stuff

     $js = '<script language="javascript"><!-- ' . "\n" .
           'function check_form() {' . "\n" .
           '  var error = 0;' . "\n" .
           '  var error_message = "' . JS_ERROR . '";' . "\n" .
           '  var payment_value = null;' . "\n" . $addThis .
           '  if (document.checkout_payment.payment.length) {' . "\n" .
           '    for (var i=0; i<document.checkout_payment.payment.length; i++) {' . "\n" .
           '      if (document.checkout_payment.payment[i].checked) {' . "\n" .
           '        payment_value = document.checkout_payment.payment[i].value;' . "\n" .
           '      }' . "\n" .
           '    }' . "\n" .
           '  } else if (document.checkout_payment.payment.checked) {' . "\n" .
           '    payment_value = document.checkout_payment.payment.value;' . "\n" .
           '  } else if (document.checkout_payment.payment.value) {' . "\n" .
           '    payment_value = document.checkout_payment.payment.value;' . "\n" .
           '  }' . "\n\n";

     reset($this->modules);
     while (list(, $value) = each($this->modules)) {
       $class = substr($value, 0, strrpos($value, '.'));
       if ($GLOBALS[$class]->enabled) {
         $js .= $GLOBALS[$class]->javascript_validation();
       }
     }

     $js .= "\n" . '  if (payment_value == null && submitter != 1) {' . "\n" . // ICW CREDIT CLASS Gift Voucher System
            '    error_message = error_message + "' . JS_ERROR_NO_PAYMENT_MODULE_SELECTED . '";' . "\n" .
            '    error = 1;' . "\n" .
            '  }' . "\n\n" .
//  ICW CREDIT CLASS Gift Voucher System Line below amended
            '  if (error == 1 && submitter != 1) {' . "\n" .
            '    alert(error_message);' . "\n" .
            '    return false;' . "\n" .
            '  } else {' . "\n" .
            '    return true;' . "\n" .
            '  }' . "\n" .
            '}' . "\n" .
            '//--></script>' . "\n";
     }

     return $js;
   }

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

Question...

 

What is this file for and what does it do?

<?php include ('includes/ssl_provider.js.php'); ?>

it's for a contrib I don't use any more, it displays the ssl seal in an info box. That one line I suspect is to load the javascript needed by the contrib. I realized having the seal in an infobox was confusing to some customers, so I turned it off. later I'll add the seal to the footer or something instead.

 

I even had a little popup saying what it meant, but I realized most online customers already know what it means to be on a secure connection (or at least they think they know) and if they don't know then this would just confuse them.

 

Most customers are used to just having a little lock image or something telling them that the site is secure. I think I'm going to add a little lock image in front of the breadcrumb whenever they are on a secure page. (as well as have the seal in the footer somewhere) Theres a bunch of small details like that I still need to do... Hmm I should get busy with those...

 

ecotopia: Hmm sounds like it's a compatibility issue with Protx... (Like paypal IPN had it's own page for certain stuff, so a fix had to be made to make these two contribs conpatible) If you know enough php, dive in and see if you can figure out how the module for Protx figures out what amount to send to the protx site... I'm guessing it uses custon Protx code that bypasses the normal code to figure out the order total. In the order total, try putting the coupons BEFORE the subtotal and see what that does. If that works, it would be a nasty fix but at least it would work. Also if that works, it can help you come up with a solution since you know what the problem is better...

 

Hobbes_TheReal: Almost sounds like you did not install the update for paypal IPN? it's the one labeled "27 Jan 2005 - PayPal IPN Update" That update fixes compatibility issues with paypal IPN and this contrib.

Link to comment
Share on other sites

I do not know if this would be any easier or possible, but is there a way to use a new payment module like saving the MO or COD to credit_voucher.php and have all the needed code in that file and if a user has a CCGV balance, it would display that new credit_voucher.php payment module as a new payment option through an IF statement?

 

AND if that one is checked, either allow other payment options to be chosen along with it (again, through IF statements) or enter the data from the credit_voucher.php if checked as your payment and IF the CCGV balance is not enough to cover the full order total, have the checkout payment screen load again telling the customer to choose another payment option to cover the remainder of the balance (and not show the credit_voucher.php as one of the payment options in that screen???

 

Make since?

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

BTW, I hope you get well soon!

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

jonyo,  ;)

 

thx for answer me, but i have see, that in contrib?s 2 paypal ip?n add on?s.

 

The fix is for both ??

 

Greets

Hobbes

I used this paypal ipn since it says at the top that it is maintained by teh oscommerce team... http://www.oscommerce.com/community/contri...1/search,paypal

 

Is that what you were asking? Wasn't sure... I know there are like 10 different paypal ipn modules, I went with the one that says it's done by the oscommerce team...

 

popthetop: since the current method is almost working, it would be too much work to re-do it all... that if statement you changed, here is what it SHOULD be:

old:

if ($gv_result['amount']>0){

new:

  if ($testing['value']>0){

Again I have updated the file http://shop.faerietreasures.com/checkout_p...nt_temp.php.txt to be the latest.

 

Also, here is my code from catalog/includes/classes/payment.php (note: yours looks to me to be correct... don't know why it wouldn't work) http://shop.faerietreasures.com/payment_temp.php.txt note that I will be taking this file down after a week or so... Just don't want to crowd up this thread with source code that is 250 lines long...

 

BTW thanks :) I'm already feeling pretty good... still can't lift heavy stuff though (so I can't drive my stick shift cuz the clutch is hard to press in)

Edited by jonyo
Link to comment
Share on other sites

Heyo jonyo,

 

cool that you feeling better, sorry im not ask wink.gif

 

http://www.oscommerce.com/community/contri...arch,Paypal+ipn

 

That one i use, please can you make an working update for ?

I hope is not too many different from the other one.

Lemme know, what you think.

 

Greets

Hobbes

 

I don't have the time to make an update for that, sorry... (enough time is being tooken up by setting up my own shop) Maybe someone else that uses that contrib can make an update.

 

Unless there is some good reason why you are using that particular version, try installing the one I pointed out and see how you like it, since there is already a fix written for it.

Edited by jonyo
Link to comment
Share on other sites

Hi..Just installed this mod and love it...Only issue I have is that the Vouchers/Coupons link is listed twice in my admin screen...See the pic below to see what I mean...I couldn't find anything on this site about this problem, so I'm hoping someone here can tell me where this can be fixed to only show once. Thanks.

 

image.jpg

Link to comment
Share on other sites

Hi..Just installed this mod and love it...Only issue I have is that the Vouchers/Coupons link is listed twice in my admin screen...See the pic below to see what I mean...I couldn't find anything on this site about this problem, so I'm hoping someone here can tell me where this can be fixed to only show once.  Thanks.

 

image.jpg

 

Figured it out by accident! Just happened to open the colum_left.php file and saw it listed twice. Thanks!

Link to comment
Share on other sites

Figured it out by accident!  Just happened to open the colum_left.php file and saw it listed twice.  Thanks!

 

Hi

 

Just noticed that you managed to instal this contibution and seem happy. I tried and couldn't get things working properly.

 

Which link did you download it from (there are so many, I think maybe I downloaded an older version)? and how did you find it to install?

 

I'd really appreciate the link

 

Regards

Marc

Link to comment
Share on other sites

You have not done all edits from install file in your php?s.

Have you upload all files from contrib in the right folders ?

 

Cheers

Hobbes

 

Hi

 

Not quite sure if it was my post you answered. I went back an checked all my edits and I manage to get through the order and checkout process without any errors now.

 

Problem is I can't access my adimin area. Here is an exmple of the error:-

 

Warning: file(includes/spiders.txt): failed to open stream: No such file or directory in /home/o/d/odleyart/public_html/test/donski/includes/application_top.php on line 178

 

Warning: main(includes/functions/whos_online.php): failed to open stream: No such file or directory in /home/o/d/odleyart/public_html/test/donski/includes/application_top.php on line 421

 

After a bit of investigation it appears that it's looking in the admin/includes/functions/ directory rather than includes/functions have I somehow changed where DIR_WS_INCLUDES is pointing? I haven't altered my configure files.

 

So....can't test the voucher functions because I can't get into admin! Any idea what I have done wrong?

 

thanks

Marc

Link to comment
Share on other sites

ecotopia:  Hmm sounds like it's a compatibility issue with Protx...  (Like paypal IPN had it's own page for certain stuff, so a fix had to be made to make these two contribs conpatible)  If you know enough php, dive in and see if you can figure out how the module for Protx figures out what amount to send to the protx site...  I'm guessing it uses custon Protx code that bypasses the normal code to figure out the order total.  In the order total, try putting the coupons BEFORE the subtotal and see what that does.  If that works, it would be a nasty fix but at least it would work.  Also if that works, it can help you come up with a solution since you know what the problem is better...

 

Thanks Jonyo,

 

Have now tested using a cash on delivery payment module and that works fine with the discount - suggesting that it is definetly the Protx direct module that is causing the problem - I am however utterly useless at PHP so will see if I can get someone to help me out - any offers from anybody is much appreciated then we will have a working mod for people using protx direct - will post it if I get it working.

 

Steve

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