Welcome Guest, Not a member yet? Register   Sign In
Problem with Shopping Cart class and brackets
#1

[eluser]Unknown[/eluser]
I'm having some problems with the Shopping Cart class. When the item name containts brackets (e.g. "Budveiser (US)"), the item doesn't get added to the cart. My code is as follows:

Code:
if ($currentitemquantity>0)
                    {
                        $cart[] = array('id'=>$currentitem, 'qty'=>$currentitemquantity, 'price'=>$currentitemprice, 'name'=>$currentitemdesc, 'options'=>array('unit'=>$currentitemunit));
                    }
                

                $this->cart->insert($cart);

If $currentitemdesc contains brackets the item does not get added. Any ideas how to fix this?
#2

[eluser]Unknown[/eluser]
Ignore that - just seen this.

Should have used the search function Smile




Theme © iAndrew 2016 - Forum software by © MyBB