Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Checkout Error...Help!


NovemberDirge

Recommended Posts

Hello OSC gurus,

 

The store I work on was operating "normally", but recently (i.e., today!) we've been getting customer inquiries about the checkout process not working.

 

1. You add stuff to cart

2. You login

3. Select Delivery Method

4. Select Payment Method - Credit Card

5. Click Continue to Confirmation page

 

OSC spits out this error: Parse error: syntax error, unexpected '}' in /home/candleli/public_html/store/checkout_confirmation.php on line 52

 

Here's the code from line 41 to 62:

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

if (!tep_session_is_registered('comments')) tep_session_register('comments');

if (tep_not_null($HTTP_POST_VARS['comments'])) {

$comments = tep_db_prepare_input($HTTP_POST_VARS['comments']);

}

 

// load the selected payment module

require(DIR_WS_CLASSES . 'payment.php');

$payment_modules = new payment($payment);

 

require(DIR_WS_CLASSES . 'order.php');

 

} <--- THIS is line 52!

 

$payment_modules->update_status();

 

if ( ( is_array($payment_modules->modules) && (sizeof($payment_modules->modules) > 1) && !is_object($$payment) ) || (is_object($$payment) && ($$payment->enabled == false)) ) {

tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_NO_PAYMENT_MODULE_SELECTED), 'SSL'));

}

 

if (is_array($payment_modules->modules)) {

$payment_modules->pre_confirmation_check();

}

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

 

I'm running OSC 2.2 RC2 with a .htaccess admin pass protected login.

 

Thanks!

 

PS. Could it be something the host is doing? I see the file was modified 10/7/2011 and the permissions are 644. I didn't modify anything actually.

Link to comment
Share on other sites

The error is telling you you have mismatched curly braces.

 

You haven't posted enough code to discern the problem.

 

Post all the code up to and including line 52.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Not enough code to tell where the missing/extra brace is. But please don't post the whole damn file here, just check the code carefully. A good PHP editor helps you find these things.

OSC User Definitions

"I can add modules to OSC" = I can search, cut and paste. But not well, or I wouldn't be here.

"I start my posting with 'works like a charm' = I'm letting you down gently, nothing works and I have no idea why

"I finish postings with "plzzzz....hlp" = My installation is buggered and I know I'm going to have to pay someone, but I really, really don't want to.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...