Access registered content

  • Posts: 137
  • Thank you received: 2
13 years 3 months ago #23443

Hi!

When trying to access the customer account not logged-in and SEF has been displayed a login form is displayed and after successful login he get's redirected to the customer account site. When we have SEF enabled, the user gets the 404 error message from Joomla. Is it possible to display the login form also when SEF is enabled?

Best regards

Last edit: 13 years 3 months ago by emergentec. Reason: typo

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

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
13 years 3 months ago #23448

Hi,

Please give the SEF and non SEF URLs of the pages you're talking about so that we can understand the problem.

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

  • Posts: 137
  • Thank you received: 2
13 years 3 months ago #23458

nicolas wrote:

Please give the SEF and non SEF URLs of the pages you're talking about so that we can understand the problem.


SEF: example.com/mybio/accountadmin
Non-SEF: example.com/index.php?option=com_hikasho...ut=cpanel&Itemid=112

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

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
13 years 3 months ago #23461

How did you create that link ?
Did you use the joomla menu manager to create a new menu of the type hikashop user control panel ?
What SEF system are you using ? Joomla's ? sh404sef ? Another one ?

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

  • Posts: 137
  • Thank you received: 2
13 years 3 months ago #23466

nicolas wrote:

How did you create that link ?
Did you use the joomla menu manager to create a new menu of the type hikashop user control panel ? yes
What SEF system are you using ? Joomla's ? sh404sef ? Another one ?

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

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
13 years 3 months ago #23471

And do the other links on your website work when SEF is activated ?
Because the SEF process for menu URLs are completely handled by joomla. So I'm not really sure of what could be the cause...

Could you try do download the latest version on our website and install it again on your website ? Just in case you don't have the latest build of the 1.5.3 version.

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

  • Posts: 137
  • Thank you received: 2
13 years 3 months ago #23477

Other links also don't work, but we only need it for the HikaShop part.

I do have the latest version of HikaShop.

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

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
13 years 3 months ago #23489

If other links don't work, it means that you didn't setup SEF properly on your website. So it's really not related to HikaShop.
You should just fix the SEF settings of joomla and make sure that the htaccess file has been renamed correctly at the root of your website.

Here is a tutorial on SEF setup for joomla0 that you might want to follow:
docs.joomla.org/Enabling_Search_Engine_F...(SEF)_URLs_on_Apache

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

  • Posts: 137
  • Thank you received: 2
13 years 3 months ago #23791

I now disabled SEF and tried to access a product details page without being logged in. Insteadt of a login form the message "Product not found" is displayed!

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

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
13 years 3 months ago #23794

Could you give us the links so that we can look at the problem ?

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

  • Posts: 137
  • Thank you received: 2
13 years 3 months ago #23839

Our development version is not reachable from outside. What should happen when a user tries to access a product details page which has custom access level?

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

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
13 years 3 months ago #23853

First, the product should not appear on products listings if they don't have access to it, so the users should not even be able to access the product page. But if they try to access it via a direct URL, HikaShop will give that error message: "Product not found"

Last edit: 13 years 3 months ago by nicolas.

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

  • Posts: 137
  • Thank you received: 2
13 years 3 months ago #23912

nicolas wrote:

First, the product should not appear on products listings if they don't have access to it, so the users should not even be able to access the product page. But if they try to access it via a direct URL, HikaShop will give that error message: "Product not found"

We are linking from a Silverlight application to the shop, when a user tries to access a module in Silverlight, which hasn't been purchased in HikaShop. If the Joomla session of a user has expired we would like to display the login form and afterwards redirect him to the product details page. How would this be possible?

Best regards

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

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
13 years 3 months ago #23914

You need to edit the file show of the view product via the menu Display->Views and add a redirect to the login form after the line:
$app->enqueueMessage(JText::_('PRODUCT_NOT_FOUND'));

redirects can be done like that:
$app->redirect(' mywebsite.com/mypage ');

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

  • Posts: 137
  • Thank you received: 2
13 years 3 months ago #23915

But to which page should I redirect, that after the login the user is back on the product details page?

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

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
13 years 3 months ago #23923

You should do like that:

$app->enqueueMessage(JText::_('PLEASE_LOGIN_FIRST'));
			global $Itemid;
			$url = '';
			if(!empty($Itemid)){
				$url='&Itemid='.$Itemid;
			}
			if(version_compare(JVERSION,'1.6','<')){
				$url = 'index.php?option=com_user&view=login'.$url;
			}else{
				$url = 'index.php?option=com_users&view=login'.$url;
			}
			$app->redirect(JRoute::_($url.'&return='.urlencode(base64_encode(hikashop_currentUrl())),false));

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

  • Posts: 137
  • Thank you received: 2
13 years 3 months ago #24066

Thank your very much! This part is working, we are now trying to fix the problem with SEF.

Best regards

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

  • Posts: 137
  • Thank you received: 2
13 years 3 months ago #24253

When I try to access the product listing via the URL and not being logged in, I get to see the header part of the product listing (which is only a graphic in our case). The associated modules are not displayed. Is it possible to forward to the login form when trying to access the product listing as Public-User?

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

  • Posts: 82910
  • Thank you received: 13379
  • MODERATOR
13 years 3 months ago #24258

You can change the permissions of that menu in the joomla menu manager so that public users cannot see it.
I don't know if joomla is smart enough to redirect to the login though. If not, you would have to edit the file listing of the view product and do your redirect there for non logged in users with some php code.

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

  • Posts: 137
  • Thank you received: 2
13 years 3 months ago #24269

nicolas wrote:

You can change the permissions of that menu in the joomla menu manager so that public users cannot see it.
I don't know if joomla is smart enough to redirect to the login though. If not, you would have to edit the file listing of the view product and do your redirect there for non logged in users with some php code.

How can I execute the redirect for non logged in users?

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

Time to create page: 0.090 seconds
Powered by Kunena Forum