fix(wish): #107 price not setting
This commit is contained in:
parent
8257fcd2e8
commit
37fbf05862
1 changed files with 6 additions and 3 deletions
|
@ -50,8 +50,9 @@ class Wish
|
|||
global $database;
|
||||
|
||||
$wishQuery = $database->query(
|
||||
'SELECT *
|
||||
' SELECT `wishes`.*, `products`.`price`
|
||||
FROM `wishes`
|
||||
LEFT JOIN `products` ON `wishes`.`id` = `products`.`wish`
|
||||
WHERE `wishes`.`id` = :wish_id',
|
||||
array(
|
||||
'wish_id' => $wishId,
|
||||
|
@ -186,6 +187,7 @@ class Wish
|
|||
$this->status = $wishData['status'];
|
||||
$this->is_purchasable = $wishData['is_purchasable'];
|
||||
$this->edited = $wishData['edited'] ? \strtotime($wishData['edited']) : null;
|
||||
$this->price = $wishData['price'] ?? null;
|
||||
}
|
||||
|
||||
public function getCard(int $ofUser): string
|
||||
|
@ -422,6 +424,7 @@ class Wish
|
|||
'status' => $this->status,
|
||||
'is_purchasable' => $this->is_purchasable,
|
||||
'edited' => $this->edited,
|
||||
'price' => $this->price,
|
||||
);
|
||||
|
||||
return $wishArray;
|
||||
|
|
Loading…
Reference in a new issue