Skip to main content

User account panel

More
15 years 1 month ago #22695 by skatercorpse
Hi! :)

My specs: joomla 1.7, hikashop 1.5.3

How to?
When I log in in my account, I see the panel with:
    User account - edit your account
    Address - Edit your address
    Orders - see your orders

If I click on Address, in the Address page I can clik New or Cancel
If I click on Cancel I get redirected to my user panel.
And I find it is the right behaviour.

If I click on User account instead, and then Cancel I get redirected to my homepage...
Why? I think it should redirect you to the User panel. It makes more sense.
How can I do that?

In addition, in the User account page, Cancel is a simple link. In the Address page and in the Orders page Cancel is a simple Link with an image.
Why not making them all the same?

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

More
15 years 1 month ago #22696 by nicolas
Replied by nicolas on topic Re: User account panel
Hi,

The reason is simple. The User acount page is NOT a HikaShop page but a Joomla page.
So we can't change the cancel link to add an image and we can't change it to direct to the user control panel. However, if you want, you can do it yourself by editing that joomla view in the file components/com_user/views/user/tmpl/form.php

Alternatively, you can unpbulish the Hikashop User account Plugin so that the User account link is not displayed on the user control panel.

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

More
15 years 1 month ago #22697 by skatercorpse
Replied by skatercorpse on topic Re: User account panel
:)
Now everything is clear!
Thank you!
;)

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

More
15 years 1 month ago #23847 by emergentec
Replied by emergentec on topic Re: User account panel
There is no "components/com_user/views/user/tmpl/form.php" in 1.6.6

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

More
15 years 1 month ago - 15 years 1 month ago #23862 by nicolas
Replied by nicolas on topic Re: User account panel
It's the file components/com_users/views/profile/tmpl/edit.php on joomla 1.6
Last edit: 15 years 1 month ago by nicolas.

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

More
15 years 1 month ago #24072 by emergentec
Replied by emergentec on topic Re: User account panel
Actually it's templates/{yourtemplate}/com_users/views/profile/tmpl/edit.php

But I can't edit how the form is displayed. I don't want to display certain fields.

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

More
15 years 1 month ago #24090 by nicolas
Replied by nicolas on topic Re: User account panel
That's because your template is overriding that view file so indeed the file is templates/{yourtemplate}/com_users/views/profile/tmpl/edit.php in that case.

Why can't you edit that file ?

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

More
15 years 1 month ago #24245 by emergentec
Replied by emergentec on topic Re: User account panel
After yesterdays update to Joomla 1.7 and the latest version of the YOOtheme phoenix style the edit.php looks like this:
Code:
// include config and layout $base = dirname(dirname(dirname(__FILE__))); include($base.'/config.php'); include($warp->path->path('layouts:'.preg_replace('/'.preg_quote($base, '/').'/', '', __FILE__, 1)));

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

More
15 years 1 month ago - 15 years 1 month ago #24246 by emergentec
Replied by emergentec on topic Re: User account panel
Now I found the correct file in /templates/yoo_phoenix/warp/systems/joomla.1.7/layouts/com_users/profile

The problem is, the fields are loaded like this:
Code:
PHP foreach ($this->form->getFieldsets() as $fieldset): /PHP

So I can't remove e.g. the fields for username and name. Also hiding it with CSS is not possible.
Last edit: 15 years 1 month ago by emergentec. Reason: php code

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

More
15 years 1 month ago #24256 by nicolas
Replied by nicolas on topic Re: User account panel
Why wouldn't you be able to remove it ?

You could do something like that probably:
if($fieldset->field_name =='my_field') continue;

Note that I don't know what is in $fieldset, I'm just giving an example. If $fieldset is HTML code, you could do a strpos or a regex on it or even remove the element from the $this->form object before the foreach...

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

More
15 years 1 month ago #24446 by emergentec
Replied by emergentec on topic Re: User account panel
That's my solution:
Code:
if(strpos($field->label,"jform_username")!==false) continue

But then the user is not able to submit the form, because the form expects a name and username!

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

More
15 years 1 month ago #24447 by nicolas
Replied by nicolas on topic Re: User account panel
Then, you should add it with a hidden input.

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

Time to create page: 0.208 seconds
Powered by Kunena Forum