highvisualproducts Posted May 17, 2008 Share Posted May 17, 2008 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']))); Quote Highvisualproducts Link to comment Share on other sites More sharing options...
shimonp Posted May 17, 2008 Share Posted May 17, 2008 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']))); Quote Link to comment Share on other sites More sharing options...
♥geoffreywalton Posted May 18, 2008 Share Posted May 18, 2008 And there was me thinking it was just having too many closing brackets. Quote 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 ======>>>>>. Link to comment Share on other sites More sharing options...
Guest Posted May 18, 2008 Share Posted May 18, 2008 And there was me thinking it was just having too many closing brackets. Yeah, I have to learn to count too. Quote Link to comment Share on other sites More sharing options...
highvisualproducts Posted May 18, 2008 Author Share Posted May 18, 2008 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 Quote Highvisualproducts Link to comment Share on other sites More sharing options...
Guest Posted May 18, 2008 Share Posted May 18, 2008 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 Quote Link to comment Share on other sites More sharing options...
♥geoffreywalton Posted May 18, 2008 Share Posted May 18, 2008 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'])); :-) Quote 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 ======>>>>>. Link to comment Share on other sites More sharing options...
Guest Posted May 19, 2008 Share Posted May 19, 2008 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: Quote Link to comment Share on other sites More sharing options...
highvisualproducts Posted May 20, 2008 Author Share Posted May 20, 2008 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 Quote Highvisualproducts Link to comment Share on other sites More sharing options...
desklancer.com Posted January 29, 2011 Share Posted January 29, 2011 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 Quote Link to comment Share on other sites More sharing options...
desklancer.com Posted January 29, 2011 Share Posted January 29, 2011 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.