Disable multiple wishlists

  • Posts: 162
  • Thank you received: 0
9 years 7 months ago #172239

-- HikaShop version -- : 2.3.2
-- Joomla version -- : 2.5.24
-- PHP version -- : 5.4.29

Hi,

Is there a possibility to disable multiple wishlists? I've already disabled multiple carts.

thanks!

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

  • Posts: 13201
  • Thank you received: 2322
9 years 7 months ago #172240

Hi,

If you have disabled the multi cart option, so it's ok, it's the same option for the carts and the wishlists.

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

  • Posts: 162
  • Thank you received: 0
9 years 7 months ago #172473

Hi,

I did that but sometimes when I login for the first time and go to User Control Panel, click on Wishlist link I'm taken to multiple wishlist page, second time when I click on the link everything is fine, I'm directed to wishlist cart view.

thanks!

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

  • Posts: 13201
  • Thank you received: 2322
9 years 7 months ago #172477

Hi,

Do you have any cache enabled ?
I just checked the code and it should only display the button to show the cart view and not the listing.

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

  • Posts: 162
  • Thank you received: 0
9 years 7 months ago #172672

Hi,

The cache is disabled because I'm developing, I've also have a cache extension that is deleting cache every time I save something in back-end. Actually I've notice that the problem is when I logout on the wishlist page and login on the same page. After login instead of displaying the single wishlist is displaying the multiple wishlist page.

thanks!

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

  • Posts: 13201
  • Thank you received: 2322
9 years 7 months ago #172683

Hi,

Yes there was indeed a missing thing, in "components/com_hikashop/views/cart/view.html.php" function "showcarts()" thanks to replace:

			$app->redirect(JRoute::_($url.'&return='.urlencode(base64_encode(hikashop_currentUrl('',false))),false));
By:
			if($config->get('enable_multicart','0'))
				$app->redirect(JRoute::_($url.'&return='.urlencode(base64_encode(hikashop_currentUrl('',false))),false));
			else
				$app->redirect(JRoute::_($url.'&return='.base64_encode(hikashop_completeLink('cart&task=showcart&cart_type='.$cart_type.'&Itemid='.$Itemid,false,false,true)),false));

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

  • Posts: 162
  • Thank you received: 0
9 years 7 months ago #172784

Hi,

I can't find this line of code in the components/com_hikashop/views/cart/view.html.php:

$app->redirect(JRoute::_($url.'&return='.urlencode(base64_encode(hikashop_currentUrl('',false))),false));

The only code related that I see in this file and in the showcarts() function is:
if($cartVal == null){
			global $Itemid;
			$url = HIKASHOP_LIVE.'index.php?option=com_hikashop&ctrl=cart&task=showcarts&cart_type='.$cart_type.'&Itemid='.$Itemid;
			$app->redirect($url);
		}

thanks!

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

  • Posts: 13201
  • Thank you received: 2322
9 years 7 months ago #172835

Hi,

So replace the found code by:

if($cartVal == null){
			global $Itemid;
if($config->get('enable_multicart','0'))
			$url = HIKASHOP_LIVE.'index.php?option=com_hikashop&ctrl=cart&task=showcarts&cart_type='.$cart_type.'&Itemid='.$Itemid;
else
			$url = HIKASHOP_LIVE.'index.php?option=com_hikashop&ctrl=cart&task=showcart&cart_type='.$cart_type.'&Itemid='.$Itemid;
			$app->redirect($url);
		}

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

  • Posts: 162
  • Thank you received: 0
9 years 7 months ago #173072

Hi,

I've changed the code and now when I try to load the wishlist page I get a redirect loop.

Please see screenshot.

thanks!

Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
9 years 7 months ago #173085

Hi,

Yes indeed that's not correct, after verification the code you found is in the wrong function and for the wrong thing.
Thanks to add:

		if(hikashop_loadUser() == null){
			global $Itemid;
			$url = '';
			if(!empty($Itemid)){
				$url='&Itemid='.$Itemid;
			}
			if(!HIKASHOP_J16){
				$url = 'index.php?option=com_user&view=login'.$url;
			}else{
				$url = 'index.php?option=com_users&view=login'.$url;
			}
			if($config->get('enable_multicart','0'))
				$app->redirect(JRoute::_($url.'&return='.urlencode(base64_encode(hikashop_currentUrl('',false))),false));
			else
				$app->redirect(JRoute::_($url.'&return='.base64_encode(hikashop_completeLink('cart&task=showcart&cart_type='.$cart_type.'&Itemid='.$Itemid,false,false,true)),false));
			return false;
		}
After:
$searchMap = array('a.cart_id','a.cart_name','a.cart_type');

The code will be in the next release.

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

  • Posts: 162
  • Thank you received: 0
9 years 7 months ago #173266

Hi,

now when I logout on the wishlist page I get a white page.

thanks!

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

  • Posts: 13201
  • Thank you received: 2322
9 years 7 months ago #173275

Hi,

I am not able to reproduce the issue on my end.
When I log out on the wishlist page, I am well redirected to a login page.

Thanks to wait until the next release for this issue.

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

Time to create page: 0.084 seconds
Powered by Kunena Forum