CI Framework, full name CodeIgniter, I believe everyone is not unfamiliar, she is a small PHP framework, CI China official website document is also very comprehensive, now ci4.0 also came out, joined the namespace.
But I personally prefer the 2.0 version.
Later version has abandoned the shopping cart function, but for the use of ci2.0 students, I summed up the shopping cart category of several bugs,
The code is as follows:
1. The rules for judging product names are not friendly to Chinese. Often causes the add to fail.
Log_message (' Error ', ' An invalid name ' is submitted as the product name: '. $items [' name ']. ' The name can only contain alpha-numeric characters, dashes, underscores, colons, and spaces ');//return FALSE;
2. When the number is constant, the shopping cart information cannot be modified
if ($this->_cart_contents[$items [' rowID ']][' qty '] = = $items [' qty ']) { //return FALSE;}
3. Can only modify the quantity, cannot modify the additional option options
Modify options Add-ons
$this->_cart_contents[$items [' rowID ']][' qty '] = $items [' qty ']; $this->_cart_contents[$items [' rowID ']][' Options '] = $items [' Options '];//here new?
This article is provided by the PHP Chinese web,
Original address: http://www.php.cn/php-weizijiaocheng-374137.html
Please do not reprint ~ ~ ~