Advertisement
Guest User

Untitled

a guest
Dec 19th, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. if (isset($_POST[self::QUANTITY)){
  2. foreach ($_POST[self::QUANTITY) as $pid => $value){
  3. if (!$this->isInt($pid) && !$this->isValidPid($pid)){
  4. $this->errorMessages[self::PID] = "Please enter a valid Product ID";
  5. }
  6. if (!$this->isInt($value)){
  7. $this->errorMessages[self::QUANTITY . $pid] = "Please enter a valid Quantity";
  8. }
  9. }
  10. }
  11. if ((count($_this->errorMessages) !==0)) {
  12. foreach ($this->pageArray as $index => $cartrow) {
  13. foreach ($POST[self::QUANTITY] as $pid => $quantity) {
  14. if ($cartrow[self::QUANTITY] as $pid => $pid) {
  15. $this->pageArray[$index] [self::QUANTITY] = Utilities::sanitizeFilter($quantity)
  16. }
  17. }
  18. }
  19. $this->currentView->setParameter(new GenericParameter("pageArray", $this->pageArray]
  20. }
  21. return (count($this->errorMessages) === 0);
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement