[RESOLVED] disable multiple wishlist

  • Posts: 63
  • Thank you received: 0
  • Hikamarket Multivendor Hikashop Business
1 week 2 days ago #312773

-- HikaShop version -- : 4.2.2
-- Joomla version -- : 3.9.12
-- PHP version -- : 7

Hello
Even if I disabled the option to have multiple wishlist, when I go to my wishlist I still see the button to move an item to another wishlist and/or create a new one.
What should I do to see only the default wishlist?
I attach the screenshoots
thank you
Elena

Attachments:

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

  • Posts: 67389
  • Thank you received: 9992
  • MODERATOR
1 week 2 days ago #312774

Hi,

Try changing the line:

if($this->multi_wishlist || empty($user_wishlists)) {
to:
if($this->multi_wishlist || ($cart->cart_type != 'wishlist' && empty($user_wishlists))) {
in the file components/com_hikashop/views/cart/view.html.php

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

  • Posts: 63
  • Thank you received: 0
  • Hikamarket Multivendor Hikashop Business
1 week 1 day ago #312819

Hi nicolas,
thank you. Your tip resolved only half of the problem: now I cannot create a new wishlist but I still have the button 'move to'.
Since I already have the button to move to the cart the products I checked, I don't have any need to show it.
Hiding it by css seems dirty trick to me... can you suggest anything that hide it unless I (my client) decide to enable the multi-wishlist?thank you
Elena

Attachments:
Last edit: 1 week 1 day ago by lensky.

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

  • Posts: 67389
  • Thank you received: 9992
  • MODERATOR
1 week 1 day ago #312822

Hi,

Ah yes. You need to also change the code:

$toolbar['move_to'] = array(
						'dropdown' => array(
							'label' => !empty($manage) ? JText::_('HIKA_MOVE_TO') : JText::_('HIKA_ADD_TO'),
							'data' => $dropData,
							'options' => array('type' => 'link', 'right' => true, 'up' => false, 'hkicon' => 'icon-32-wishlist', 'main_class' => 'hikabtn')
						),
						'fa' => array(
							'size' => 1,
							'html' => array('<i class="fas fa-list-ul fa-stack-2x" style="top:15%"></i>','<i class="fas fa-star fa-stack-1x" style="left:-36%;top:-20%;"></i>'),
						),
					);
to:
				if(count($dropData)) {
					$toolbar['move_to'] = array(
						'dropdown' => array(
							'label' => !empty($manage) ? JText::_('HIKA_MOVE_TO') : JText::_('HIKA_ADD_TO'),
							'data' => $dropData,
							'options' => array('type' => 'link', 'right' => true, 'up' => false, 'hkicon' => 'icon-32-wishlist', 'main_class' => 'hikabtn')
						),
						'fa' => array(
							'size' => 1,
							'html' => array('<i class="fas fa-list-ul fa-stack-2x" style="top:15%"></i>','<i class="fas fa-star fa-stack-1x" style="left:-36%;top:-20%;"></i>'),
						),
					);
				}
in that same file to avoid that.
We'll add that patch too on our end.

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

  • Posts: 63
  • Thank you received: 0
  • Hikamarket Multivendor Hikashop Business
1 week 20 hours ago #312848

Now is perfect! thank you!

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

Time to create page: 0.040 seconds
Powered by Kunena Forum