Regsitered Access Only

  • Posts: 447
  • Thank you received: 20
11 years 7 months ago #139737

detaineesupplies.co.uk
-- HikaShop version -- : 2.2.3
-- Joomla version -- : 3.21
-- PHP version -- : 5.3.22
-- Browser(s) name and version -- : Firefox 26


I have a site that is now live. The categories have been set to registered only. If you visit the site and try to access a category you are asked to login. So this works at it should. If you google the name some of the products are listed and consequently display. Note that the url is index.php?option= not the SEF URL. This needs to be prevented and is quite urgent.

Thanks

Dave B)

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

  • Posts: 447
  • Thank you received: 20
11 years 7 months ago #139746

Just a small update on this,

About 6 months ago I was given the follwoing code which I implemented and this works fine. (This Post) If this was added to the actual product template in Display >> Views where would it need to be added or changes required?

<?php $user = JFactory::getUser();if($user->guest && empty($this->rows)){ echo 'Please Register or Login'; } ?>

Thanks

Dave

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

  • Posts: 84242
  • Thank you received: 13686
  • MODERATOR
11 years 7 months ago #139834

That code is just to display a message.
Not to hide products/categories.
How did you set your categories to "registered only" ?
How about you set your products to "registered only" too ?

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

  • Posts: 447
  • Thank you received: 20
11 years 7 months ago #139872

Hi Nicolas

the categories were working fine. If you go on the site and try to access a list of products you are asked to register or login. However google listed some links that are not SEF but the full Joomla index.ph?=com_hikashop etc. This brought up the product and full details.

I set the categories to registered via the access level in Hiikashop.



I did not do that with the products because I didn't expect them to be visible if the category was registered only! So do I need to do the same thing with the products? If I do is there a way to do this via a line of MySQL.

I would then need the message to appear as it does for categories, in which case what template would I need to add this too? product show or show_default?

I am assuming that would be the solution?

Thanks

Dave

Attachments:

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

  • Posts: 84242
  • Thank you received: 13686
  • MODERATOR
11 years 7 months ago #139911

Hi,

Yes, you need to do it for the products. You can do it with such query:
UPDATE #__hikashop_product SET product_access=',ID1,ID2,';
where ID1 and ID2 are the ids of your user groups.
No message to add. The system will display an error if someone tries to access the product page of a product where he doesn't have any right.

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

  • Posts: 447
  • Thank you received: 20
11 years 7 months ago #139926

Hi Nicolas

I will update the product access shortly.

However the customer would prefer a message to be shown, so I would like to add similar code to that which is already added for categories.

Thanks

Dave

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

  • Posts: 447
  • Thank you received: 20
11 years 7 months ago #139945

I did get a message product not found and have now updated that in the language file, so all looks as it should. If you blieve there is an alternative I would welcome your suggestions.

Thanks

Dave B)

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

Time to create page: 0.076 seconds
Powered by Kunena Forum