Customer Account Cpanel - Edit Profile link to item101 (homepage)

  • Posts: 5
  • Thank you received: 0
6 years 11 months ago #268774

When I click Edit Profile button from Customer Account Cpanel, the login information displays on Homepage (itemid 101) while all the other links, such as address, order, etc. go on itemid number of the Cpanel page.

I have a image slide module on the homepage and that appears with the current Edit Profile page and would like to have the Edit Profile link to appear on the same menu page as Cpanel itemid. I understand that it is Joomla Edit Profile page and not of Hikashop. But appreciate it if you can share your insight as to how to fix this.

Thanks.

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

  • Posts: 81515
  • Thank you received: 13069
  • MODERATOR
6 years 11 months ago #268775

Hi,

As you understand, it's not possible to use the same itemid. If you try to display a page of a component with the itemid of another one there is a high chance that it will result in a 404 error due to the SEF system of Joomla.
The best is to use an itemid of the component displaying the page. And you can configure it in the settings of the HikaShop joomla user account link plugin via the Joomla plugins manager.

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

  • Posts: 5
  • Thank you received: 0
6 years 11 months ago #269887

nicolas wrote: Hi,

As you understand, it's not possible to use the same itemid. If you try to display a page of a component with the itemid of another one there is a high chance that it will result in a 404 error due to the SEF system of Joomla.
The best is to use an itemid of the component displaying the page. And you can configure it in the settings of the HikaShop joomla user account link plugin via the Joomla plugins manager.


Thank you Nicolas for your reply. I did what you suggested. The interesting thing is that it works from one of the menus which is to create an account (registration menu), but it doesn't from the manage your account menu (Customer Cpanel menu). When I am logged in, then I click on create an account menu and I click on the edit profile menu, it works fine (edit profile page would be displayed on cpanel page, which I want). But when I am logged in, then I click on manage your account menu and click on the edit profile menu, the edit profile page goes on home page (itemid 101 with slide show). I would appreciate if you can tell me how to fix this problem. Thanks.

Last edit: 6 years 11 months ago by sakuramann.

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

  • Posts: 81515
  • Thank you received: 13069
  • MODERATOR
6 years 11 months ago #269909

Hi,

What you're describing indicates that you didn't enter an id of a menu item of the com_users component in that setting of the HikaShop joomla user account link plugin. I don't see any other reason.

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

  • Posts: 5
  • Thank you received: 0
6 years 10 months ago #270227

nicolas wrote: Hi,

What you're describing indicates that you didn't enter an id of a menu item of the com_users component in that setting of the HikaShop joomla user account link plugin. I don't see any other reason.


Hi Nicolas. I found out that the problem was because I have two menu links to manage account (cpanel menu). When I set the itemid for one of the menus in the link plugin, it works fine when you go from that menu link but not from the other menu. So when you switch the itemid, it only works from the other menu. So I am guessing it only works from one menu and not multiple menus.

I guess you cannot have more than one cpanel menu if you don't want it to have it on home page.

Another thing I still need your help is that when I click on "cancel" button from the profile editing page, it goes to home page as well, but not when you save the change. Isn't there any way I can keep it on the cpanel page when you click on "cancel"? I noticed in the link plugin, there is a selection of redirect back. Can you include when you "cancel" the editing in that choice, if that is the way it works...

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

  • Posts: 81515
  • Thank you received: 13069
  • MODERATOR
6 years 10 months ago #270233

Hi,

Unfortunately, that setting uses a feature of the profile edition of Joomla to give the redirect URL when the profile is saved.
Ideally, there should be a modification in Joomla so that it also uses that redirect URL when the cancel button is clicked. But that won't help you in the short term. So in your case, you'll have to edit the profile view of Joomla to change the cancel button so that it behaves like you want.
The cancel button is located in the view file /components/com_users/views/profile/tmpl/edit.php

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

  • Posts: 5
  • Thank you received: 0
6 years 10 months ago #270302

Here is the code for the cancel button:

<div class="controls">
<button type="submit" class="btn btn-primary validate"><span><?php echo JText::_('JSUBMIT'); ?></span></button>
<a class="btn" href="<?php echo JRoute::_('index.php?option=com_users&view=profile'); ?>" title="<?php echo JText::_('JCANCEL'); ?>"><?php echo JText::_('JCANCEL'); ?></a>
<input type="hidden" name="option" value="com_users" />
<input type="hidden" name="task" value="profile.save" />
</div>

So it looks like that the cancel button should redirect to edit profile page, but the login information shows up on home page. I am not a programmer, so I am not sure what to do with this.

Edited: I added "$Itemid=131" after the href, and it worked, but the url shows "....=profile$Itemid=131$Itemid=101", but did not show in home page. Isn't there any better elegant way to fix this problem?

Last edit: 6 years 10 months ago by sakuramann.

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

  • Posts: 81515
  • Thank you received: 13069
  • MODERATOR
6 years 10 months ago #270308

Hi,

Note that it should be &Itemid=131 and not $Itemid=131
You shouldn't get the Itemid twice in the URL.
What code do you have now ?

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

  • Posts: 5
  • Thank you received: 0
6 years 10 months ago #270350

Hi Nicolas.

That did it. Now the url is with only one itemid. Thank you so much for your help. I really appreciate it.

Sawako

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

Time to create page: 0.068 seconds
Powered by Kunena Forum