Disable all User Editing

  • Posts: 12
  • Thank you received: 0
12 years 11 months ago #33504

Hi I'm new and still setting up Hikashop. Best cart application I've tried.
Is there a way to disable all "Joomla user account editing" features in Hikashop? Examples:

1) On Hikashop User Addresses screen, if I click on "cancel" it will go to the User Control Panel screen. I don't want that.
2) Without logging in, clicking on "Customer Orders" will display the Joomla log in interface. I just want to display a message like "please log in first".

Basically I do not want any Joomla User Login and Registration stuffs to be shown. They should all be replaced with simple error message like "Please ensure you are a Registered User and have logged in". The reason is that my site does not use the Joomla login/registration interface(and that's because I do not want any user data changes like "reset password","edit email" etc)

Thanks to anyone who can give some hints.

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

  • Posts: 82909
  • Thank you received: 13379
  • MODERATOR
12 years 11 months ago #33531

Hi,

1.You can edit the file "listing" of the view "address" via the menu Display->Views and remove the code of that button near the beginning of the file.

2. That's not possible without editing directly core files of HikaShop in the folder components/com_hikashop/controllers.
The best would be to edit the view file of the joomla login screen to remove the links you don't want.
On joomla 1.5 it's the file components/com_user/views/login/tmpl/default_login.php
On joomla 1.7 it's the file components/com_users/views/login/tmpl/default_login.php

Last edit: 12 years 11 months ago by nicolas. Reason: wrong file name

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

  • Posts: 12
  • Thank you received: 0
12 years 11 months ago #33547

Thank you.

1) I found the file address/form.php. You said "remove the code of that button near the beginning of the file". Please tell me which lines I should remove. (I can't do PHP code... so embarrassing)

2) On Joomla 1.7, I removed the section containing "forgot password"and problem SOLVED as according to your suggestion!

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

  • Posts: 12
  • Thank you received: 0
12 years 11 months ago #33549

By the way, is the behavior of menu link "User Addresses" different from "Customer Orders" ?
Clicking on "User Addresses" without logging in shows an empty page and does not bring up the Login Box, as in the case for "Customer Orders".

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

  • Posts: 82909
  • Thank you received: 13379
  • MODERATOR
12 years 11 months ago #33573

2.

It's that code:
<td>
<a href="<?php echo hikashop_completeLink('user');?>" >
<span class="icon-32-cancel" title="<?php echo JText::_('HIKA_CANCEL'); ?>">
</span>
<?php echo JText::_('HIKA_CANCEL'); ?>
</a>
</td>

There is indeed no check on the user state (logged or not) for the address listing. It just won't display anything in that case. Usually, people come from the user control panel which already checks on that or they set the joomla menu linking directly to it to only display for registered users, thus rendering that check not necessary.

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

  • Posts: 12
  • Thank you received: 0
12 years 11 months ago #33594

It should be the file "address/listing.php" and not "address/form.php" where I found this code to be removed. Great, that took care of the User Addresses cancel button.

I did the same for Customer Orders in the file "order/listing.php" and removed the cancel button as well.

Thanks for the solution on using joomla menu link for registered users, I had forgotten about that. I need to skip the control panel as it leads to the edit profile.

SOLVED - Closing this thread.

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

  • Posts: 82909
  • Thank you received: 13379
  • MODERATOR
12 years 11 months ago #33610

Yes, sorry for that, I gave you the wrong file name.

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

Time to create page: 0.064 seconds
Powered by Kunena Forum