Multi wishlist but no multi cart

  • Posts: 198
  • Thank you received: 74
2 years 8 months ago #311178

-- HikaShop version -- : 4.2.1
-- Joomla version -- : 3.9.11

Hi,

we would like users to have only one cart, but they are allowed to have multiple wishlists.
In the configuration we've switched "Enable multi carts" to NO and "Enable multi wishlists" to YES, but this doesn't work entirely. Users can move products to different wishlists, the problem is that there is no way to access the different wishlists as the listing page is inaccessible, both the "Cart listing" menu item with wishlist selected and in the user cpanel "Wishlists" will not redirect to a listing but directly to only one wishlist.

We can see in the sourcecode this is because both multicart and multiwishlist must be true to be able to see the wislist listing page. This means at the moment you only have 3 options: multicart/multiwishlist, multicart/singlewishlist or singlecart/singlewishlist.
We would like to propose making the configuration settings "Enable multi carts" and "Enable multi wishlists" independent of each other so the option singlecart/multiwishlist is also possible.

We've had a look at the code and the changes appear to be only a few to make this work:

In views/user/view.html.php change line 82 from
	if($config->get('enable_multicart') && $config->get('enable_multiwishlist', 1))
to
	if($config->get('enable_multiwishlist', 1))
In controllers/cart.php change line 196 from
		if($cart_type == 'wishlist' && $multi_cart)
to
		if($cart_type == 'wishlist')
In views/cart/view.html.php change line 423 from
	if($cart->cart_type == 'wishlist' && $multi_cart)
to
	if($cart->cart_type == 'wishlist')
And perhaps a small mistake we found on line 285, instead of
		$multi_wishlist = (int)$config->get('enable_wishlist', 1);
should this be
		$multi_wishlist = (int)$config->get('enable_multiwishlist', 1);

Thanks.

Please Log in or Create an account to join the conversation.

  • Posts: 75529
  • Thank you received: 11766
  • MODERATOR
2 years 8 months ago #311219

Hi,

Thank you for your feedback. I can confim the 3 patchs. I've added them on our end.

Please Log in or Create an account to join the conversation.

Time to create page: 0.056 seconds
Powered by Kunena Forum