Alter is not changing quantity in session
When I run:
$alter = array();
$alter[1]='remove';
$data = array(
'session_id' => $checkfront_session,
'alter' => $alter
);
return $this->instance->post('booking/session', $data);
The correct item is removed from the session, but when I change $alter[1]='remove' to $alter[1]=2, the quantity is not updating. Can someone please help?
The correct item is removed from the session, but when I change $alter[1]='remove' to $alter[1]=2, the quantity is not updating. Can someone please help?
Comments
Thank you for using our forums!
I will look into have our API documents updated, but the 'alter' parameter is a bit outdated. I believe it still works for 'simple' items, but because items can now have multiple parameters, we cannot just indicate a single value for a line item to change its quantity.
Instead, you should make a new rated query for the item, using the new parameter values. This will give you a new slip for the item with the new quantity. You can then replace the old slip on the booking session using:
POST /booking/session?session_id={session_id}&line_id={line_id}&slip={new_slip}
I am sorry for any confusion this caused, and please let me know if you have any more questions!
All the best,
Chase
Technical Support Analyst
Checkfront | www.checkfront.com/contact | Email: support@checkfront.com