blr044 Posted January 17, 2008 Share Posted January 17, 2008 I installed PWA V 1.65 As doing a test run, after clicking checkout to continue without creating a account. Then once at catalog/checkout_shipping.php & checkout_payment.php, I notice the address is not in the upper right corner. I continued on thinking maybe it is color of text problem. Then once at catalog/checkout_confirmation.php I receive these two errors: Warning: htmlspecialchars() expects parameter 1 to be string, array given in /hsphere/local/home2/brussell/brs-giftshop.com/oscommerce2/catalog/includes/functions/general.php on line 42 Warning: htmlspecialchars() expects parameter 1 to be string, array given in /hsphere/local/home2/brussell/brs-giftshop.com/oscommerce2/catalog/includes/functions/general.php on line 42 After searching I found a few - one at http://www.oscommerce.com/forums/lofiversion/i...hp?t199587.html I did try this code: In catalog\includes\functions\general.php find in tep_address_format: } elseif (isset($address['country']) && tep_not_null($address['country'])) { $country = tep_output_string_protected($address['country']); and replace with } elseif (isset($address['country']) && tep_not_null($address['country'])) { $country = tep_output_string_protected($address['country']['title']); After that change this is what I get then: Warning: htmlspecialchars() expects parameter 1 to be string, array given in /hsphere/local/home2/brussell/brs-giftshop.com/oscommerce2/catalog/includes/functions/general.php on line 42 The other method I tried was this: if (isset($address['country']['id']) && tep_not_null($address['country']['id'])) { $country = tep_get_country_name($address['country']['id']); if (isset($address['zone_id']) && tep_not_null($address['zone_id'])) { $state = tep_get_zone_code($address['country']['id'], $address['zone_id'], $state); } } elseif (isset($address['country']) && tep_not_null($address['country'])) { $country = tep_output_string_protected($address['country']); } else { $country = ''; } Tried to purchase again. Now I get my first again. But I continue through the process, I do end up at my main index page with an email in box showing my purchase. So am hoping that some one else any other suggestions. Thanks. blr044 Quote Link to comment Share on other sites More sharing options...
psxgunman Posted February 16, 2008 Share Posted February 16, 2008 Scroll down a bit from the above change where you add the [title] and find $statecomma = ''; $streets = $street; if ($suburb != '') $streets = $street . $cr . $suburb; if ($country == '') $country = tep_output_string_protected($address['country']); if ($state != '') $statecomma = $state . ', '; and change that to $statecomma = ''; $streets = $street; if ($suburb != '') $streets = $street . $cr . $suburb; if ($country == '') $country = tep_output_string_protected($address['country']['title']); if ($state != '') $statecomma = $state . ', '; That should do it 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.