Not logged in wishlist message wrong

  • Posts: 3
  • Thank you received: 0
10 years 2 months ago #143370

-- url of the page with the problem -- : www.ushistorytouring.com/tour-registration/2014-summer-tour
-- HikaShop version -- : HikaShop Essential: 2.2.3
-- Joomla version -- :3.2.2
-- PHP version -- : 5.3.28
-- Browser(s) name and version -- : All
-- Error-message(debug-mod must be tuned on) -- : Error_message

When not logged in, clicking on the Add to Wishlist button on a product page (see above url) I get only a blank page with the word: notLogged

That isn't in the language file. The page does not go to LOGIN_REQUIRED_FOR_WISHLISTS="You must be logged in to use the wishlists." as the code would seem to indicate it should. When logged in the wishlist is shown correctly.

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

  • Posts: 2334
  • Thank you received: 403
10 years 2 months ago #143406

Hi there,

Actually, the "add to wishlist" button should not be displayed if you are not logged.
Did you edited anything that forces the display?

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

  • Posts: 3
  • Thank you received: 0
10 years 2 months ago #143515

The only changes to the code I have made are minor - language overrides and a break for spacing. I have the most recent download since I just purchased the software.

I have now set in Configuration for the wishlist button to not show to guests. That's fine for my purposes, however, you should know that if someone sets the button to show for guests, the glitch I described above occurs.

Last edit: 10 years 2 months ago by riskin.

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

  • Posts: 2334
  • Thank you received: 403
10 years 2 months ago #144611

I finally reproduced this issue, my bad for not catching it early.
We'll work on it and come back when it's fixed.

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

  • Posts: 2334
  • Thank you received: 403
10 years 2 months ago #144621

We solved this issue.
It was actually working only with the ajax mode enable. So you can either use this mode or change the code in componenents/com_hikashop/controllers/product.php:

						echo 'notLogged';
						exit;

By:
if($tmpl!='component'){
						if(!empty($_SERVER['HTTP_REFERER'])){
							if(strpos($_SERVER['HTTP_REFERER'],HIKASHOP_LIVE)===false && preg_match('#^https?://.*#',$_SERVER['HTTP_REFERER'])) return false;
							$app->redirect( str_replace('&popup=1','',$_SERVER['HTTP_REFERER']));
						}
					}else{
						echo 'notLogged';
						exit;
					}

It should work!

The following user(s) said Thank You: riskin

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

  • Posts: 3
  • Thank you received: 0
10 years 2 months ago #144677

Thank you for pursuing this. Since it is up to the client, I don't know yet which way we will go, but it is nice to see we now have the option.

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

Time to create page: 0.074 seconds
Powered by Kunena Forum