Post by hanssvane » Fri May 04, 2012 2:28 am

Well for some weird reason the PHP function JSON_ENCODE did not encode the special characters in one server but does in the other I notice that for example in the ADD function of the CART CONTROLLER if you utf8_encode() encode the things Works greate I recommend to do this by default in the code as it will make it more solid on poor servers configurations.

Here is the replace for the original line on cart controller:

$json['success'] = sprintf($this->language->get('text_success'), $this->url->link('product/product', 'product_id=' . $this->request->post['product_id']), $product_info['name'], $this->url->link('checkout/cart'));

New one:

$json['success'] = utf8_encode(sprintf($this->language->get('text_success'), $this->url->link('product/product', 'product_id=' . $this->request->post['product_id']), $product_info['name'], $this->url->link('checkout/cart')));

If some one knows a php.ini option that helps to solve this or an .htaccess option too is good to know so we did not have to do the modification with vqmod or other ways.

I hope it helps some one. Have a good time.

Newbie

Posts

Joined
Fri May 04, 2012 2:21 am
Who is online

Users browsing this forum: No registered users and 1 guest