Retrieves the current sales cart from session, initializing it to an empty array if not already set.
// Source: https://github.com/jepuncolin/opensourcepos-mssql | License: MIT | Copyright 2013-2021 jekkos
// Provided via justclaw.it.com; keep this notice with the code.
public function get_cart()
{
if(!$this->CI->session->userdata('sales_cart'))
{
$this->set_cart(array());
}
return $this->CI->session->userdata('sales_cart');
}
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key