Skip to content
Public Ticket #20774

check if wishlist contains products

Conversation thread

PenciDesign Supporter replied

Staff Reply

Hi,

Please add it to the page you've set as a wishlist.

Regards,
PenciDesign.


daniel_ghre replied

Customer Reply

How to put it after the [penci_wishlist] shortcode ? 

PenciDesign Supporter replied

Staff Reply

Hi,

Unfortunately, the current version of Soledad doesn't support a hook after the wishlist products, but you can do it after the [penci_wishlist] shortcode.

Regards,
PenciDesign.


daniel_ghre replied

Customer Reply

Thanks it works ! :)

Do you have a hook to put a shortcut just below the wishlist ? Thanks 

PenciDesign Supporter replied

Staff Reply

Hi,

All the code I've sent working properly on my local devices.

Please check your code again or send me a code you're currently using.

Regards,
PenciDesign.


daniel_ghre replied

Customer Reply

Still not working, total is 0 even if I add products in the wishlist :(

PenciDesign Supporter replied

Staff Reply

Hi,

You can use the following functions to check the wishlist & compare items:

function get_total_product_compare(){
    ob_start();
    do_action( 'penci_current_compare' );
    $compare = ob_get_contents();
    ob_end_clean();
    return $compare;
}
function get_total_product_wishlist(){
    ob_start();
    do_action( 'penci_current_wishlist' );
    $wishlist = ob_get_contents();
    ob_end_clean();
    return $wishlist;
}

Regards,
PenciDesign.



daniel_ghre started the conversation

Conversation Start

Hello, I would like to know if there is a way to know if the wishlist is empty or not (by code) because I would like to present a form below if the wishlist is not empty. Thanks

Want to join this conversation or access attachments? Sign in first.