Customer Picture (Image) - Custom Field

  • Posts: 10
  • Thank you received: 0
11 years 2 months ago #124019

-- url of the page with the problem -- : http://localhost
-- HikaShop version -- : Business - 2.2.1
-- Joomla version -- : 3.1.5
-- PHP version -- : 5.4.19
-- Browser(s) name and version -- : Mozilla FireFox - V24
-- Error-message(debug-mod must be tuned on) -- : Error_message

Hi,

What i wanted to do was to have the customers picture/avatar on the registration page, and then show it on the profile page. So i created a custom field for the customer of the type 'image' and on the registration (or the backoffice costumer edit page) i upload an image, so far so good.

But when i re-edit the customer profile on the backend or on the frontend, the only thing that appears is the name of the image i uploaded, and not the <img> itself..

On the customer database table the content of the field is indeed (only) the name of the image i uploaded.

I wonder if Hikashop really uploaded the image, and where does it go.. I searched on the 'media/hikashop' folder, but without success.

Can you help me please.

Thanks
Pedro

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

  • Posts: 13201
  • Thank you received: 2322
11 years 2 months ago #124065

Hi,

Yes the image is uploaded, it should be in the folder "media/com_hikashop/upload"
Only the image name (and extension) are stored because we use then relative links.

To display the image where you want you will probably have to edit a view via the menu Display > Views to add the <img ... tag
Here is some documentation about view customizatoin:
www.hikashop.com/support/documentation/1...ize-the-display.html

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

  • Posts: 10
  • Thank you received: 0
11 years 2 months ago #124115

Hi Xavier,

Thanks for the reply, but i still can't resolve my "problem".

I tried to upload onother image 'jpg' and 'png', to diferent users on the user backoffice edit page.

After that i looked to the 'media/com_hikashop/upload' folder, and nothing appears there :(

The part of editing the view, and show the picture else where is not my issue, the problem here is that i don't see the picture i uploaded anywhere on HikaShop. The first thing i thought would happen was the picture to be visible in the user edit page of the backoffice as well in the frontoffice profile page.

And with the help of firebug, i see that there is an <img> tag, but it doesn't show the picture. Probably because it is not uploading correctly..

Here is what appears to me in the HTML:

BackOffice:
<img
class="hikashop_custom_file_upload_link"
alt="IMG_NAME.jpg"
src="/PROJ_FOLDER/administrator/index.php?option=com_hikashop&ctrl=order&task=download&field_table=user&field_namekey=dXNlcl9mb3Rv&name=MTc1LWZyZWUtY2FydG9vbi1vd2wtY29sb3JpbmctcGFnZS1jbGlwYXJ0XzIwMjQwLmpwZw%3D%3D"
>

FrontOffice:
<img
class="hikashop_custom_file_upload_link"
alt="IMG_NAME.jpg"
src="/PROJ_FOLDER/component/hikashop/order/download/field_table-user/field_namekey-dXNlcl9mb3Rv/name-MTc1LWZyZWUtY2FydG9vbi1vd2wtY29sb3JpbmctcGFnZS1jbGlwYXJ0XzIwMjQwLmpwZw=="
>

And then, i tried to enter the url of the picture source on the Browser, the picture really appears for download (don't know where from..), but when it opens on windows preview the message is that the picture is too large or may be corrupted..

So, don't know what more to try here..

Found it. While writting this post i tried to look once more, and the picture is on the 'media/com_hikashop/upload/safe' folder.

But still can't see the picture because the download of it seems to be damaged...

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

  • Posts: 13201
  • Thank you received: 2322
11 years 2 months ago #124231

Are you sure that the folder "upload" have the correct access rights ? Thanks to try the chmod 775
Have you uploaded some other pictures inside via the hikashop interface ?

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

Time to create page: 0.074 seconds
Powered by Kunena Forum