Skip to content

Commit

Permalink
// Fix fatal error
Browse files Browse the repository at this point in the history
  • Loading branch information
sfroment committed Aug 25, 2014
1 parent 845718b commit 115bf41
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
8 changes: 8 additions & 0 deletions blockwishlist-extra.tpl
Expand Up @@ -23,6 +23,7 @@
* International Registered Trademark & Property of PrestaShop SA
*}

{if isset($wishlists) && count($wishlists) > 1}
<div class="buttons_bottom_block">
<div id="wishlist_button">
<select id="idWishlist">
Expand All @@ -35,3 +36,10 @@
</button>
</div>
</div>
{else}
<p class="buttons_bottom_block no-print">
<a id="wishlist_button" href="#" onclick="WishlistCart('wishlist_block_list', 'add', '{$id_product|intval}', $('#idCombination').val(), document.getElementById('quantity_wanted').value); return false;" rel="nofollow" title="{l s='Add to my wishlist' mod='blockwishlist'}">
{l s='Add to wishlist' mod='blockwishlist'}
</a>
</p>
{/if}
6 changes: 5 additions & 1 deletion blockwishlist.php
Expand Up @@ -238,7 +238,11 @@ public function hookProductActions($params)

$this->smarty->assign(array(
'id_product' => (int)(Tools::getValue('id_product')),
'wishlists' => WishList::getByIdCustomer($cookie->id_customer),
));

if (isset($cookie->id_customer))
$this->smarty->assign(array(
'wishlists' => WishList::getByIdCustomer($cookie->id_customer),
));

return ($this->display(__FILE__, 'blockwishlist-extra.tpl'));
Expand Down

0 comments on commit 115bf41

Please sign in to comment.