Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

newbee help on check out problem please


haydn27

Recommended Posts

Hi i am trying to set up my OSC and getting on OK untill i try to go to the check out, then i am in the Shopping cart and click checkout i get error message "Parse error: parse error, unexpected T_FUNCTION, expecting T_STRING in /homepages/21/d122087644/htdocs/Shop/catalog/includes/classes/order.php on line 13"

I would like to set up payment via Paypal,

 

Any help would be very much welcome, I have spent hours searching the forums for help but cant find what i am looking for.

 

Sorry if this is a repeat question.

 

Many thanks

 

Haydn

Link to comment
Share on other sites

Hi i am trying to set up my OSC and getting on OK untill i try to go to the check out, then i am in the Shopping cart and click checkout i get error message "Parse error: parse error, unexpected T_FUNCTION, expecting T_STRING in /homepages/21/d122087644/htdocs/Shop/catalog/includes/classes/order.php on line 13"

I would like to set up payment via Paypal,

 

Any help would be very much welcome, I have spent hours searching the forums for help but cant find what i am looking for.

 

Sorry if this is a repeat question.

 

Many thanks

 

Haydn

 

Hello,

 

Sounds as if you have a syntax error in your code. It would be helpful if you could post line 13 here.

 

Be well,

 

Tina

If you're not having fun you're not doing it right

 

Teach a person to fish rather than give them a loaf of bread or however that saying goes.

Link to comment
Share on other sites

Hello,

 

Sounds as if you have a syntax error in your code. It would be helpful if you could post line 13 here.

 

Be well,

 

Tina

 

Thanks for quick Reply Tina,

Here is the first section not sure if i have to count from top line and include blanks so have copied a bit more.

 

Many thanks

 

Haydn

Link to comment
Share on other sites

Thanks for quick Reply Tina,

Here is the first section not sure if i have to count from top line and include blanks so have copied a bit more.

 

Many thanks

 

Haydn

 

OOPS forgot to paste LOL,

 

<?php

/*

$Id: order.php,v 1.33 2003/06/09 22:25:35 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

class function order($order_id = '') {

$this->info = array();

$this->totals = array();

$this->products = array();

$this->customer = array();

$this->delivery = array();

 

if (tep_not_null($order_id)) {

$this->query($order_id);

} else {

// >>> BEGIN REGISTER_GLOBALS

link_post_variable('cc_type');

link_post_variable('cc_owner');

link_post_variable('cc_number');

link_post_variable('cc_expires');

link_post_variable('comments');

// <<< END REGISTER_GLOBALS

 

$this->cart();

}

}

}

 

function query($order_id) {

global $languages_id;

 

$order_id = tep_db_prepare_input($order_id);

Link to comment
Share on other sites

OOPS forgot to paste LOL,

 

<?php

/*

  $Id: order.php,v 1.33 2003/06/09 22:25:35 hpdl Exp $

 

  osCommerce, Open Source E-Commerce Solutions

  http://www.oscommerce.com

 

  Copyright ? 2003 osCommerce

 

  Released under the GNU General Public License

*/

 

  class function order($order_id = '') {

      $this->info = array();

      $this->totals = array();

      $this->products = array();

      $this->customer = array();

      $this->delivery = array();

 

      if (tep_not_null($order_id)) {

        $this->query($order_id);

      } else {

// >>> BEGIN REGISTER_GLOBALS

      link_post_variable('cc_type');

      link_post_variable('cc_owner');

      link_post_variable('cc_number');

      link_post_variable('cc_expires');

      link_post_variable('comments');

// <<< END REGISTER_GLOBALS

 

        $this->cart();

      }

    }

    }

 

    function query($order_id) {

      global $languages_id;

 

      $order_id = tep_db_prepare_input($order_id);

 

Ok, it appears that the top of the class defination managed to get all scrambled up for some reason. This is a snipit of what the top of that file should look like:

 

 class order {
   var $info, $totals, $products, $customer, $delivery, $content_type;

   function order($order_id = '') {
     $this->info = array();
     $this->totals = array();
     $this->products = array();
     $this->customer = array();
     $this->delivery = array();

 

If you notice in your code you start to define the class and then immediately start defining the function before the class signature is completed. I would say to simply grab a fresh version of order.php from the download and overwrite what you have with it. However I assume that you have installed a contribution or something. Did you say that? I'm sorry its still early LOL

 

Anyway, I still believe that its best you start with a fresh order.php file and if you are installing a contrib that requires changes, make them to that fresh copy.

 

Be well,

 

Tina

If you're not having fun you're not doing it right

 

Teach a person to fish rather than give them a loaf of bread or however that saying goes.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...