Only warn user if wishlist contains products

This commit is contained in:
Jay Trees 2022-02-22 11:52:33 +01:00
parent 6a13151c36
commit 581d8d8f8e

View file

@ -32,25 +32,25 @@ $page->navigation();
/** /**
* Warn the wishlist creator * Warn the wishlist creator
*/ */
if (isset($user->id) && $user->id === intval($wishlist->data['user'])) { ?> if (isset($user->id) && $user->id === intval($wishlist->data['user']) && !empty($wishlist->products)) { ?>
<div class="ui icon warning message wishlist-own"> <div class="ui icon warning message wishlist-own">
<i class="exclamation triangle icon"></i> <i class="exclamation triangle icon"></i>
<div class="content"> <div class="content">
<div class="header"> <div class="header">
Careful Careful
</div> </div>
<div class="text"> <div class="text">
<p> <p>
You are viewing your own wishlist! You are viewing your own wishlist!
You will be able to see which products have already been bought for you. You will be able to see which products have already been bought for you.
Don't you want to be surprised? Don't you want to be surprised?
</p> </p>
<p> <p>
It's probably best to just close this tab. It's probably best to just close this tab.
</p> </p>
</div>
</div> </div>
</div> </div>
</div>
<?php } ?> <?php } ?>
<div class="ui segment"> <div class="ui segment">