Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

MountainMan

checkout_payment.php payment_error

Recommended Posts

Error message is not displaying in checkout_payment.   Am looking for tips in how to diagnose.

This bit of error handling code has been around a long time.  In OSC 2.3.4.1,   it starts at line #130 in checkout_payment.php

 if (isset($HTTP_GET_VARS['payment_error']) && is_object(${$HTTP_GET_VARS['payment_error']}) && ($error = ${$HTTP_GET_VARS['payment_error']}->get_error())) {

First question I have, is:  Why is there a single "=" instead of a "==" for the "$error = $" in the line above

Second question is:   Where does "$error['title']" come from?  I am assuming it is an array element...but where created and loaded with data.  I know these error messages come from payment or order total modules, but I cannot find any code referencing "title".

echo '<strong>' . tep_output_string_protected($error['title']) 

Third question:  Why is OSC 2.3.4.1  still using $HTTP_GET_VARS ?  Thought we were past that.

Edited by MountainMan
Further clarification

Share this post


Link to post
Share on other sites

Answering my own questions:

1.  The single "=" is required because there is in fact an assignment to the variable $error going on there

2.  $error['title']  is assigned in the get_error() functions found in the order total modules

3.  Above my pay grade

The reason the error messages were not showing up was because I left off a "return" in the get_error() function I was repurposing.

Share this post


Link to post
Share on other sites
21 hours ago, MountainMan said:

Third question:  Why is OSC 2.3.4.1  still using $HTTP_GET_VARS ?  Thought we were past that.

That version of oscommerce hasn't been updated in about 5 years. 


Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Share this post


Link to post
Share on other sites
53 minutes ago, Jack_mcs said:

That version of oscommerce hasn't been updated in about 5 years. 

Thanks.  Which version(s) are the latest and greatest has gotten confusing.  Can you school me on that?    

 

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

×