In Recently Viewed Product block, there are links for adding product to wishlist. These links are not working because data-post attribute is empty.

File path:-



<a href="#" data-post='<?= $block->getAddToWishlistParams($item) ?>'  class="action towishlist" data-action="add-to-wishlist" title="<?= __('Add to Wish List') ?>">
    <span><?= __('Add to Wish List') ?></span>

$block->getAddToWishlistParams($item); returns no content.

How can I fix this? Thanks in advance

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.