From 581d8d8f8ebcc46d508f438019980b3a66158c7b Mon Sep 17 00:00:00 2001 From: Jay Trees Date: Tue, 22 Feb 2022 11:52:33 +0100 Subject: [PATCH] Only warn user if wishlist contains products --- src/pages/wishlist.php | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/pages/wishlist.php b/src/pages/wishlist.php index a5a1f736..9890b3c2 100644 --- a/src/pages/wishlist.php +++ b/src/pages/wishlist.php @@ -32,25 +32,25 @@ $page->navigation(); /** * Warn the wishlist creator */ - if (isset($user->id) && $user->id === intval($wishlist->data['user'])) { ?> -
- -
-
- Careful -
-
-

- You are viewing your own wishlist! - You will be able to see which products have already been bought for you. - Don't you want to be surprised? -

-

- It's probably best to just close this tab. -

+ if (isset($user->id) && $user->id === intval($wishlist->data['user']) && !empty($wishlist->products)) { ?> +
+ +
+
+ Careful +
+
+

+ You are viewing your own wishlist! + You will be able to see which products have already been bought for you. + Don't you want to be surprised? +

+

+ It's probably best to just close this tab. +

+
-