Just installed this module few days ago. It works great ! Thank you for this contribution!
There are a few kinks that needed to be worked out. Finally resolved them and here are my solutions in case someone finds this useful.
1. Problem #1:
if not logged in, adding an item to wishlist sends you to shopping cart after logging in. There was a solution to ask people to login first, but i did not like that. I found this code to work perfectly well instead:
PHP Code:
<!--bof Wishlist button -->
<?php
if (UN_MODULE_WISHLISTS_ENABLED) {
echo '<a href="' . zen_href_link(UN_FILENAME_WISHLIST, 'products_id=' . (int)$_GET['products_id'] . '&action=wishlist_add_product', 'NONSSL') . '">' . zen_image_button(UN_BUTTON_IMAGE_WISHLIST_ADD, UN_BUTTON_WISHLIST_ADD_ALT, 'name="wishlist" value="yes"') . '</a>';
}
?>
<!--eof Wishlist button -->
2. wishlist default template has 'SSL' hard coded which may result in switching to SSL when it's not needed.
Solution is to find and replace every instance of 'SSL' by $request_type in tpl_wishlist_default.php file .
3. two calls to zen_href_link function in wishlist default template have a bug in them, which results in "Security Warning" in certain situations.
in file tpl_wishlist_default.php need to replace the following lines:
PHP Code:
<?php echo zen_draw_form('wishlist', zen_href_link(UN_FILENAME_WISHLIST, zen_get_all_get_params(array('action'), 'SSL') . 'action=un_update_wishlist')); ?>
by
PHP Code:
<?php echo zen_draw_form('wishlist', zen_href_link(UN_FILENAME_WISHLIST, zen_get_all_get_params(array('action')) . 'action=un_update_wishlist', $request_type)); ?>
and
PHP Code:
echo zen_draw_form('cart_quantity', zen_href_link(UN_FILENAME_WISHLIST, zen_get_all_get_params(array('action'), 'SSL') . 'action=add_product'));
by
PHP Code:
echo zen_draw_form('cart_quantity', zen_href_link(UN_FILENAME_WISHLIST, zen_get_all_get_params(array('action')) . 'action=add_product', $request_type));
Bookmarks