Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Problem with CCGV


milauskas

Recommended Posts

Hi,

 

I've never used the CCGV contrib but I just went through the install process and this is what I see as soon as I enter my credit card info and hit the Continue button:

 

 

Parse error: syntax error, unexpected $end in /home/foldername/public_html/catalog/checkout_confirmation.php on line 417

 

I'm not really good at PHP and I can't tell what I may have done to checkout_confirmation.php that is causing this error. Luckily, everything is backed up so I can re-upload the original files for now, but I need to get this working. I haven't found anything in the forums yet, so if someone can give me a hand, I'd appreciate it.

 

I used CCGV 5.18.

 

Thanks.

Link to comment
Share on other sites

For anyone who experiences the same problem, I noticed an omission in the install instruction text for the catalog/checkout_confirmation.php page.

 

It says in step one of catalog files to edit:

 

1) catalog/checkout_confirmation.php

 

 

Right Under:

 

require(DIR_WS_CLASSES . 'payment.php'); (around line 47)

 

 

 

Add:

 

// ################# Added CGV Contribution ##################"

 

if ($credit_covers) $payment='';

 

// ################# End Added CGV Contribution ##################"

 

$payment_modules = new payment($payment);

 

// ################# Added CGV Contribution ##################"

 

require(DIR_WS_CLASSES . 'order_total.php');

 

// ################# End Added CGV Contribution ##################"

 

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

 

 

 

Right Under:

 

$order = new order;

 

$payment_modules->update_status(); (around line 61)

 

 

 

Replace:

 

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')); (around line 55)

 

}

 

 

 

With:

 

// ################# Added CGV Contribution ##################"

 

// CCGV Contribution

 

$order_total_modules = new order_total;

 

$order_total_modules->collect_posts();

 

$order_total_modules->pre_confirmation_check();

 

 

 

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

 

if ( (is_array($payment_modules->modules)) && (sizeof($payment_modules->modules) > 1) && (!is_object($$payment)) && (!$credit_covers) ) {

 

// ################# End Added CGV Contribution ##################"

 

However, I implemented this verbatim and got the error I mentioned previously. I took a look at the code and it seemed that there was an extra line that needed to be replaced by the contrib code but which was not.

 

This is

 

$payment_modules = new payment($payment);

which is right beneath

require(DIR_WS_CLASSES . 'payment.php');

 

Since the contrib code also contains this line, you need to delete the original one (around line 48) That fixed this problem.

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