[eluser]mudshark[/eluser]
Hi everyone,
I'm currently developing an e-commerce site for a wine merchant. I'm using CI's cart class, which as you probably know has this syntax for adding items to the cart:
Code:
$data = array(
'id' => 'sku_123ABC',
'qty' => 1,
'price' => 39.95,
'name' => 'T-Shirt',
'options' => array('Size' => 'L', 'Color' => 'Red')
);
$this->cart->insert($data);
This works fine for me - except when the name of the item is something along the lines of "Côtes du Rhône rouge 37.5 cl 2007", or "Crème d'Abricot". Obviously the accented characters are preventing insertion of the product to the cart.
I've tried the following within the product's shopping cart form to "neutralize" the accented characters:
Code:
<?php echo form_hidden('name', ascii_to_entities($product_name)); ?>
... but even with that function in use, I cannot insert the item in the cart.
Am I doing something wrong? How can I get this to work?
Thanks for your help! :-)