esstebanr Posted May 8, 2017 Share Posted May 8, 2017 (edited) Hi I just want to change some information on SEO + URL section but when I try to enter to a page form this part an error with white page appear. I've turned on Debug mode and show this error: Parse error: syntax error, unexpected 'version' (T_STRING) in /public_html/controllers/front/StoresController.php on line 238 Thanks in advice! { $stores = $this->getStores(); $parnode = new SimpleXMLElement('<?xml version="1.0" encoding="UTF-8"?><markers></markers>'); Edited May 8, 2017 by esstebanr (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted May 8, 2017 Share Posted May 8, 2017 what is the version of your prestashop ? Link to comment Share on other sites More sharing options...
esstebanr Posted May 8, 2017 Author Share Posted May 8, 2017 Hi I'm using Prestashop 1.6.1.1 Link to comment Share on other sites More sharing options...
esstebanr Posted May 9, 2017 Author Share Posted May 9, 2017 I'm uploading the full code of that part protected function displayAjax() { $stores = $this->getStores(); $parnode = new SimpleXMLElement('<?xml version="1.0" encoding="UTF-8"?><markers></markers>'); foreach ($stores as $store) { $other = ''; $newnode = $parnode->addChild('marker'); $newnode->addAttribute('name', $store['name']); $address = $this->processStoreAddress($store); $other .= $this->renderStoreWorkingHours($store); $newnode->addAttribute('addressNoHtml', strip_tags(str_replace('<br />', ' ', $address))); $newnode->addAttribute('address', $address); $newnode->addAttribute('other', $other); $newnode->addAttribute('phone', $store['phone']); $newnode->addAttribute('id_store', (int)$store['id_store']); $newnode->addAttribute('has_store_picture', file_exists(_PS_STORE_IMG_DIR_.(int)$store['id_store'].'.jpg')); $newnode->addAttribute('lat', (float)$store['latitude']); $newnode->addAttribute('lng', (float)$store['longitude']); if (isset($store['distance'])) $newnode->addAttribute('distance', (int)$store['distance']); } Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now