Skip to content

Commit

Permalink
Added trimming to product code and receipt title (#355)
Browse files Browse the repository at this point in the history
- also simplified title trimming
  - removes possibility of cms users creating cart validation errors when adding a product to a cart on the front end
  • Loading branch information
mak001 committed Nov 13, 2018
1 parent 3abaae1 commit bbec30a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Page/ProductPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,9 @@ public function onBeforeWrite()
$holders->add($currentParent);
}

$title = ltrim($this->Title);
$title = rtrim($title);
$this->Title = $title;
$this->Title = trim($this->Title);
$this->Code = trim($this->Code);
$this->ReceiptTitle = trim($this->ReceiptTitle);
}

public function onAfterWrite()
Expand Down

0 comments on commit bbec30a

Please sign in to comment.