Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (isset($_POST[self::QUANTITY)){
- foreach ($_POST[self::QUANTITY) as $pid => $value){
- if (!$this->isInt($pid) && !$this->isValidPid($pid)){
- $this->errorMessages[self::PID] = "Please enter a valid Product ID";
- }
- if (!$this->isInt($value)){
- $this->errorMessages[self::QUANTITY . $pid] = "Please enter a valid Quantity";
- }
- }
- }
- if ((count($_this->errorMessages) !==0)) {
- foreach ($this->pageArray as $index => $cartrow) {
- foreach ($POST[self::QUANTITY] as $pid => $quantity) {
- if ($cartrow[self::QUANTITY] as $pid => $pid) {
- $this->pageArray[$index] [self::QUANTITY] = Utilities::sanitizeFilter($quantity)
- }
- }
- }
- $this->currentView->setParameter(new GenericParameter("pageArray", $this->pageArray]
- }
- return (count($this->errorMessages) === 0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement