darrenultra Posted February 18, 2008 Share Posted February 18, 2008 Hi, I've recently installed the Google Checkout mod ...and have come across a problem. On the shopping_cart.php page i get this error message above the google checkout button: Warning: array_merge() [function.array-merge]: Argument #1 is not an array in C:\wamp\www\catalog\includes\classes\order.php on line 160 I have seen one mention of this error message in an old post on this forum. I don't think the problem was resolved. The exact same error message also appears above the google checkout button on the login.php page. Interestingly, once a customer is logged in the error message no longer appears. I have the PWA (Pay Without Account) contribution installed, which according to other advice shouldn't conflict with the Google Checkout Mod. However, the last line of the following code from order.php is line 160 (which is apparently causing the problem): $address = array_merge($country, array('customers_firstname' => $pwa_array_customer['customers_firstname'], 'customers_lastname' => $pwa_array_customer['customers_lastname'], 'entry_firstname' => $pwa_array_customer['customers_firstname'], 'entry_lastname' => $pwa_array_customer['customers_lastname'], 'customers_telephone' => $pwa_array_customer['customers_telephone'], 'customers_email_address' => $pwa_array_customer['customers_email_address'], 'entry_company' => (isset($pwa_array_address['entry_company'])? $pwa_array_address['entry_company']:''), 'entry_street_address' => $pwa_array_address['entry_street_address'], 'entry_suburb' => $pwa_array_address['entry_suburb'], 'entry_postcode' => $pwa_array_address['entry_postcode'], 'entry_city' => $pwa_array_address['entry_city'], 'entry_zone_id' => $pwa_array_address['entry_zone_id'], 'countries_id' => $pwa_array_address['entry_country_id'], 'entry_country_id' => $pwa_array_address['entry_country_id'], 'entry_state' => $pwa_array_address['entry_state'])); It would seem that this section of code has been altered by the PWA contribution ...so i can only imagine that PWA is in some way causing the problem. If anyone has any advice on how i may solve this problem i would be very grateful. Thanks, Nick Quote Link to comment Share on other sites More sharing options...
darrenultra Posted February 18, 2008 Author Share Posted February 18, 2008 OK, So i've played around with the code a little and i've managed to stop the error message appearing. I changed the beginning of the order.php code from: $address = array_merge($country, array('customers_firstname' => to $address = array_merge(array($country), array('customers_firstname' => this has got rid of the error message and I don't think it has caused any problems. Please tell me if I am making a huge mistage by changing the code in this way! I am not a programmer ...i just looked at the error message that appeared and tried to do something logical in response! Thanks, Nick 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.