Jump to content
Sign in to follow this  
highvisualproducts

Parse error: syntax error, unexpected T_DOUBLE_ARROW

Recommended Posts

Ive currently installed Giftwrap v1.1 and I am experiencing this error at the checkout at checkout_shipping.php

 

Parse error: syntax error, unexpected T_DOUBLE_ARROW in /home/public_html/catalog-dreamgirl/osc/includes/classes/order.php on line 56

 

Below I have provided lines 50-72

 

Any help would great! Thank you in advance

 

 

 

 

$giftwrap_method_query = tep_db_query("select title from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . $order_id . "' and class = 'ot_giftwrap'");

$giftwrap_method = tep_db_fetch_array($giftwrap_method_query);

 

$order_status_query = tep_db_query("select orders_status_name from " . TABLE_ORDERS_STATUS . " where orders_status_id = '" . $order['orders_status'] . "' and language_id = '" . (int)$languages_id . "'");

$order_status = tep_db_fetch_array($order_status_query);

 

'shipping_method' => ((substr($shipping_method['title'], -1) == ':') ? substr(strip_tags($shipping_method['title']), 0, -1) : strip_tags($shipping_method['title'])));<----

 

 

'giftwrap_method' => ((substr($giftwrap_method['title'], -1) == ':') ? substr(strip_tags($giftwrap_method['title']), 0, -1) : strip_tags($giftwrap_method['title'])),

 

$this->info = array('currency' => $order['currency'],

'currency_value' => $order['currency_value'],

'payment_method' => $order['payment_method'],

'cc_type' => $order['cc_type'],

'cc_owner' => $order['cc_owner'],

'cc_number' => $order['cc_number'],

'cc_expires' => $order['cc_expires'],

'date_purchased' => $order['date_purchased'],

'orders_status' => $order_status['orders_status_name'],

'last_modified' => $order['last_modified'],

'total' => strip_tags($order_total['text']),

'shipping_method' => ((substr($shipping_method['title'], -1) == ':') ? substr(strip_tags($shipping_method['title']), 0, -1) : strip_tags($shipping_method['title'])));


Highvisualproducts

Share this post


Link to post
Share on other sites

It is a syntax error, indeed! :)

 

Move lines with "=>" under $this->info = array(...) You used operator of array elements assignment outside of array. Check for another line with

'shipping_method' to see where it should be and move 'giftwrap_method' there too.

 

Shimon

 

Ive currently installed Giftwrap v1.1 and I am experiencing this error at the checkout at checkout_shipping.php

 

Parse error: syntax error, unexpected T_DOUBLE_ARROW in /home/public_html/catalog-dreamgirl/osc/includes/classes/order.php on line 56

 

Below I have provided lines 50-72

 

Any help would great! Thank you in advance

 

 

 

 

$giftwrap_method_query = tep_db_query("select title from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . $order_id . "' and class = 'ot_giftwrap'");

$giftwrap_method = tep_db_fetch_array($giftwrap_method_query);

 

$order_status_query = tep_db_query("select orders_status_name from " . TABLE_ORDERS_STATUS . " where orders_status_id = '" . $order['orders_status'] . "' and language_id = '" . (int)$languages_id . "'");

$order_status = tep_db_fetch_array($order_status_query);

 

'shipping_method' => ((substr($shipping_method['title'], -1) == ':') ? substr(strip_tags($shipping_method['title']), 0, -1) : strip_tags($shipping_method['title'])));<----

 

 

'giftwrap_method' => ((substr($giftwrap_method['title'], -1) == ':') ? substr(strip_tags($giftwrap_method['title']), 0, -1) : strip_tags($giftwrap_method['title'])),

 

$this->info = array('currency' => $order['currency'],

'currency_value' => $order['currency_value'],

'payment_method' => $order['payment_method'],

'cc_type' => $order['cc_type'],

'cc_owner' => $order['cc_owner'],

'cc_number' => $order['cc_number'],

'cc_expires' => $order['cc_expires'],

'date_purchased' => $order['date_purchased'],

'orders_status' => $order_status['orders_status_name'],

'last_modified' => $order['last_modified'],

'total' => strip_tags($order_total['text']),

'shipping_method' => ((substr($shipping_method['title'], -1) == ':') ? substr(strip_tags($shipping_method['title']), 0, -1) : strip_tags($shipping_method['title'])));

Share this post


Link to post
Share on other sites

And there was me thinking it was just having too many closing brackets.


Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Share this post


Link to post
Share on other sites
And there was me thinking it was just having too many closing brackets.

Yeah, I have to learn to count too.


The Coopco Underwear Shop

 

If you live to be 100 years of age, that means you have lived for 36,525 days. Don't waste another, there aren't many left.

Share this post


Link to post
Share on other sites

Heya,

 

Thank you for your help, i have attempted this but have not solved anything could i be cheeky and ask for an example to check i am doing it correctly please

 

Many Thanks

Louise


Highvisualproducts

Share this post


Link to post
Share on other sites
Heya,

 

Thank you for your help, i have attempted this but have not solved anything could i be cheeky and ask for an example to check i am doing it correctly please

 

Many Thanks

Louise

'shipping_method' => ((substr($shipping_method['title'], -1) == ':') ? substr(strip_tags($shipping_method['title']), 0, -1) : strip_tags($shipping_method['title'])));<----

 

should be

 

'shipping_method' => ((substr($shipping_method['title'], -1) == ':') ? substr(strip_tags($shipping_method['title']), 0, -1) : strip_tags($shipping_method['title']));

 

is my guess


The Coopco Underwear Shop

 

If you live to be 100 years of age, that means you have lived for 36,525 days. Don't waste another, there aren't many left.

Share this post


Link to post
Share on other sites

No you removed the third bracket, should have been the first one

 

'shipping_method' => ((substr($shipping_method['title'], -1) == ':') ? substr(strip_tags($shipping_method['title']), 0, -1) : strip_tags($shipping_method['title']));

 

:-)


Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Share this post


Link to post
Share on other sites
No you removed the third bracket, should have been the first one

 

'shipping_method' => ((substr($shipping_method['title'], -1) == ':') ? substr(strip_tags($shipping_method['title']), 0, -1) : strip_tags($shipping_method['title']));

 

:-)

OMG, you are right. :rolleyes:


The Coopco Underwear Shop

 

If you live to be 100 years of age, that means you have lived for 36,525 days. Don't waste another, there aren't many left.

Share this post


Link to post
Share on other sites

Hi,

 

Thank you for all your helps guys its really appreciated but unfortunatly I have tried all of the above and I still do not seem to be getting anywhere I am still getting the following error.

 

Parse error: syntax error, unexpected T_DOUBLE_ARROW in /home/pinktoys/public_html/catalog-dreamgirl/osc/includes/classes/order.php on line 56

 

Please help if you can, thank you!

 

Louise


Highvisualproducts

Share this post


Link to post
Share on other sites

i am in the same problem not sure how to fix but i think i got an idea where the problem is

 

$this->info = array('currency' => $order['currency'],
'currency_value' => $order['currency_value'],
'payment_method' => $order['payment_method'],
'cc_type' => $order['cc_type'],
'cc_owner' => $order['cc_owner'],
'cc_number' => $order['cc_number'],
'cc_expires' => $order['cc_expires'],
'date_purchased' => $order['date_purchased'],
'orders_status' => $order_status['orders_status_name'],
'last_modified' => $order['last_modified'],
'total' => strip_tags($order_total['text']), //() seems extra
<!-- it should look like --> 'total' => strip_tags($order_total['text'],
'shipping_method' => ((substr($shipping_method['title'], -1) == ':') ? substr(strip_tags($shipping_method['title']), 0, -1) : strip_tags($shipping_method['title'])));

so we should try make our additional code a part of $this->info = array

lets try

Share this post


Link to post
Share on other sites

yes got it working

 

find bellow block and replace with bellow code

<?php
$this->info = array('currency' => $order['currency'],
'currency_value' => $order['currency_value'],
'payment_method' => $order['payment_method'],
'cc_type' => $order['cc_type'],
'cc_owner' => $order['cc_owner'],
'cc_number' => $order['cc_number'],
'cc_expires' => $order['cc_expires'],
'date_purchased' => $order['date_purchased'],
'orders_status' => $order_status['orders_status_name'],
'last_modified' => $order['last_modified'],
'total' => strip_tags($order_total['text']),
'shipping_method' => ((substr($shipping_method['title'], -1) == ':') ? substr(strip_tags($shipping_method['title']), 0, -1) : strip_tags($shipping_method['title']))); //or try , instead of ;

?>

 

in your case

'total' => strip_tags($order_total['text']),

) was missing

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
Sign in to follow this  

×