Skip to content

Instantly share code, notes, and snippets.

@alectoist
Created July 29, 2015 10:32
Show Gist options
  • Save alectoist/c85c84123ebf282965db to your computer and use it in GitHub Desktop.
Save alectoist/c85c84123ebf282965db to your computer and use it in GitHub Desktop.
Ajax order update on Prestashop, php part
//I know, it's horrible
if ($_POST['action']=='ajaxOrderUpdate'){
$orderId = $_POST['order_id'];
$changeTo = $_POST['change_to'];
Db::getInstance()->update('order_carrier', array(
'tracking_number' => $changeTo,
),
'id_order =' . $orderId, 1
);
//$sql = new DBQuery();
//$sql->select('tracking_number');
//$sql->from('order_carrier');
//$sql->where('id_order =' . $orderId);
//$dbResponse = Db::getInstance()->executeS($sql);
die();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment