how to display user profile

  • Posts: 490
  • Thank you received: 2
8 years 3 months ago #247032

-- HikaShop version -- : 2.6.3
-- Joomla version -- : 3.4.3
-- PHP version -- : 5.5
-- Error-message(debug-mod must be tuned on) -- : none

hi

i customized a few fields in the user profile, which i think is the joomla user profile.

how can i display this in the front end?
how can i display it on the custom html module?

thanks

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

  • Posts: 12953
  • Thank you received: 1778
8 years 3 months ago #247037

Hello,

In your case, you'll probably just have to use a "User Profile" menu.

The following user(s) said Thank You: ronron

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

  • Posts: 490
  • Thank you received: 2
8 years 3 months ago #247082

thank you.

how do i do this? When i use joomla user profile menu the custom fields i created using hikashop does not appear. such as avatar and others

the joomla menu link only displays the default joomla fields such as name, username, password etc

how please?

thanks

BTW

this is what is visible on the profile. i dont see my custom fields


Attachments:
Last edit: 8 years 3 months ago by ronron.

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

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
8 years 3 months ago #247084

Hi,

You should see the custom fields of the table "user" and "address" when you go on the page to edit your Joomla user profile. If not, then either you have the custom field display settings not configured properly, or you've turned off the display of the custom fields in the settings of the user sycnhronization plugin: take.ms/uUFcq , or your template has a custom view file for the user profile edition page which prevents HikaShop from adding the fields (try with the default template of Joomla).

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

  • Posts: 490
  • Thank you received: 2
8 years 3 months ago #247143

thanks Nic,

1. i dont see this from my menus "user profile edition page ".

where can i find this?

2. when i click on hikashop user control panel > profile > i see the custom code as seen below. it is visible on edit only




3. i tried to set to protostar default template, but still nothing




4.also how can i add the photo or image here




thanks

Attachments:
Last edit: 8 years 3 months ago by ronron.

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

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
8 years 3 months ago #247166

Hi,

1. It's in the list of menu item types when you create a new one and selects its type:
take.ms/SscR3
2. and 3. That's normal. The HikaShop user synchronization plugin only adds the custom fields to the user profile edition page, not to the profile of the user. There is no setting to do that.
If you want to have custom field values displayed on the profile, you would have to customize the profile page view of Joomla and there, pull the information from the hikashop_user or hikashop_address table with a MySQL query and display it there.
4. There is no option for that. You would have to add custom code in the file "cpanel" of the view "user" via the menu Display>Views.
For 2, 3 and 4, that's custom development. You'll have to contact a developer to do that for you.

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

  • Posts: 490
  • Thank you received: 2
8 years 3 months ago #247202

hi

just to clarify

1. i can add custom fields to the standard joomla user table using hikashop_user table. User can edit the custom field but it can not be displayed in his profile?

2. the custom field type i used is image. how do i restrict the upload size and force the image to resize to lets say 120pxX150px? It would be nice to crop the image to the desired size.

3. when i upload an image is is saved here /media/com_hikashop/upload/safe/ but the image wont display. i realize it is a secure folder so i guess it is a permission or a security issue. Can i remove the profile pictures out of the secure folder?

please see image. the path is correct






thanks

Attachments:
Last edit: 8 years 3 months ago by ronron.

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

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
8 years 3 months ago #247230

Hi,

1. That's right. There is no option for that for now.

2. The upload size can be restricted with the max_upload_size parameter of your php.ini You might need to ask your hosting company or server administrator for how to change that.
There is no option to restrict or resize the uploaded images.
That could be done as a custom plugin if necessary.

3. It is uploaded in the upload safe folder that you configured in the Files section of the Hikashop configuration.

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

  • Posts: 490
  • Thank you received: 2
8 years 3 months ago #247248

yup your right



but something is preventing the image from displaying.

i already tried to change the permission to 777 still nothing.

when i right click on the image and click on "open image on new tab"

i get this error

403 - Forbidden Error
You are not allowed to access this address.
If the error persists, please contact the website webmaster.

Attachments:

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
8 years 3 months ago #247249

Hi,

The "safe" folder goal is to be "safe" ; so you can't access directly to the files in that folder.
Otherwise, you would let available secured files for anybody without any kind of restriction...

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: ronron

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

  • Posts: 490
  • Thank you received: 2
8 years 3 months ago #247286

thanks jerome

1. im trying to add a custom field to this view user / cpanel.php. this is my code

<?php echo 'Image:'. $this->row->image; ?>

its not working.

2. i added two custom fields for the user. When i save the form it still continues with "Message

Profile successfully saved."

even do the fields i created are empty. they are set to required. so this is what i see after submission of from

Error

Please complete the Profile Picture field

×
Message

Profile successfully saved.


is it possible not to submit when the forms is incomplete?

Last edit: 8 years 3 months ago by ronron.

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

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
8 years 3 months ago #247290

1. That's normal. There is no variable $this->row in this view file.
You can use such code to load the user data:

<?php
$user = hikashop_loadUser(true);
echo $user->image;
?>

2. It's not possible. Joomla has already updated the profile when the HikaShop user plugin is called to process the custom fields.

Last edit: 8 years 3 months ago by nicolas.
The following user(s) said Thank You: ronron

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

  • Posts: 490
  • Thank you received: 2
8 years 3 months ago #247368

1. is it possible to add a cropping tool. the image upload could be nice if large image files could be kept light weight. Force the size on upload not using css.

2. Any suggestions? it doesn't look right. the form will still save even do required fields are still empty. Users might think there are bugs my friend.

thanks again

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

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
8 years 3 months ago #247371

Hi,

1. Anything is possible with enough time and skills. But we're not working on that for now and no one else asked for that so far, so I don't see it coming in the short term as a default option. You could always develop a custom plugin to add your own uploader type of custom fields extending the one already available by default. You would have to use the Fields API of our developer documentation, similarily to what we did with the Advanced date picker type plugin and that you can find in the folder plugins/hikashop/datepickerfield/

2. Ask Joomla to add a trigger before saving the user so that we can stop the saving when necessary ? But I don't see that coming any time soon. You could also hack Joomla's core files to add the trigger, but I don't recommend that either and it would also necessitate to modify the HikaShop user plugin.
I really don't see any easy solution.

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

  • Posts: 490
  • Thank you received: 2
8 years 3 months ago #247533

hi

1. thanks

2. a. can i disable the required on user edit but not on registration?
b. or show the field on registration but not on user

thanks

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

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
8 years 3 months ago #247546

Hi,

2.a No, both come from the same setting and use the same code to do the check.
You could do it with a big hack in the HikaShop core files, but again I don't recommend that.
b. That you can do yes. Edit the settings of the HikaShop user synchronization plugin and turn off the display of the custom fields on the profile page.

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

  • Posts: 490
  • Thank you received: 2
8 years 2 months ago #248682

hi

i have 2 issues.

1. when i access User control panel > edit profile > and make changes it redirects to the joomla user edit link. how do i redirect it to something else?

i actually went ahead on this and created an override. edited the file
/templates/mytemplate/html/com_users/controllers/profile.php and change the code below. unfortunately its not redirecting

// Redirect to the list screen.
				$this->setMessage(JText::_('COM_USERS_PROFILE_SAVE_SUCCESS'));
				
				$this->setRedirect(JRoute::_('http://xxx.com/profile', false));
			
				break;


2. i made 2 links one is for the User control panel and the other is the joomla Edit User Profile. If id disable Edit User Profile i can no longer save changes to the user control panel > edit profile. is this a correct behavior?

thanks

Last edit: 8 years 2 months ago by ronron.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
8 years 2 months ago #248685

Hi,

1 - Your question is related to Joomla itself and not HikaShop.
The HikaShop support won't be able to answer you for that part.

2 - I'm sorry but I am not able to understand your question.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 490
  • Thank you received: 2
8 years 2 months ago #248777

ok let me clarify please

i created a menu named buyer profile > user control panel.



i cant save any changes to the user profile using this link.

i created another menu Users Manager » Edit User Profile

this link saves the changes to the user.

what could be the problem please?

BTW user control panel has custom fields from hikashop

thanks

Attachments:
Last edit: 8 years 2 months ago by ronron.

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

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
8 years 2 months ago #248779

Hi,

In a user control panel menu item, there is no save button to save the user profile. There is a link to the Joomla user profile edition page. And there is a save button there. But it's already a Joomla page, not a HikaShop page. So I don't see why it would be any different.
What is the link ? How about entering the id of your Edit user profile menu item in the settings of the HikaShop user account plugin ? That way, it should give you the same link.

The following user(s) said Thank You: ronron

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

Time to create page: 0.131 seconds
Powered by Kunena Forum