public function order() { $orderData = $this->getRequest()->filter($this->fields); $orderData['date'] = tool::getDate(); $orderData['goods'] = serialize($_COOKIE['cart']); $orderData['ordernum'] = Tool::getOrderNum(); return parent::add($orderData); }
public function order() { $_orderData = $this->getRequest()->filter($this->_fields); $_orderData['date'] = Tool::getDate(); $_orderData['ordernum'] = Tool::getOrderNum(); foreach ($_COOKIE['cart'] as $_key => $_value) { $_COOKIE['cart'][$_key] = stripslashes($_value); } $_orderData['goods'] = serialize($_COOKIE['cart']); return parent::add($_orderData); }