I recomended , you use WebService and API for prestashop, you can try
$id_cart = (int)$this->context->cookie->id_cart;
$id_customer = (int)(isset($this->context->customer))? $this->context->customer->id : 0;
$cart=new Cart($id_cart);
$addressDeliveryID = $cart->id_address_delivery;
$shopID = (int)Context::getContext()->shop->id;
$rq = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS("select * from ato_product where reference ='".$reference."'");
if (isset ($rq[0]['id_product'])){
$productAttributeID = Product::getDefaultAttribute($rq[0]['id_product']);
$success &= $cart->updateQty(
(int)$row[1],
(int)$rq[0]['id_product'],
(int)$product['id_product_attribute'],
null,
'up',
(int)$id_address_delivery,
new Shop((int)$cart->id_shop),
false
);
If have any problem you cant ask me in http://digitaldot.es/soporte-prestashop
Regards