image upload on account edit/create

Open to all! Ask other shopowners for help.
LeeFoster
Contributor
Posts: 263
Joined: Sun Feb 28, 2021 9:41 pm
Phoenix Version: v1.0.8.20
Has thanked: 1 time
Been thanked: 5 times

Re: image upload on account edit/create

Post by LeeFoster »

OK I managed to get it to work on a local host using a CD module. Now I've uploaded it to my website it doesn't work.

Any direction as to why this isn't working would be much appreciated.

I've attached my files below, you will need to create a column called profile_pic in your customers table.
You do not have the required permissions to view the files attached to this post.


Join The Code Co-op to get access to your library in the Code Co-op Forum
beerbee
Member
Posts: 48
Joined: Mon Oct 26, 2020 4:56 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 5 times

Re: image upload on account edit/create

Post by beerbee »

Hi @LeeFoster,

could you please reupload the attachment, maybe as zip? I can't open the .rar file it seems to be damaged.
This is exactly what I'd need for business customers to upload their proof of business.
TIA
and kind regards

Christoph
Omar_one
Senior Contributor
Posts: 679
Joined: Fri Oct 25, 2019 5:06 pm
Phoenix Version: v1.0.8.16
Has thanked: 100 times
Been thanked: 56 times

Re: image upload on account edit/create

Post by Omar_one »

beerbee wrote: Tue Sep 20, 2022 9:52 am Hi @LeeFoster,

could you please reupload the attachment, maybe as zip? I can't open the .rar file it seems to be damaged.
This is exactly what I'd need for business customers to upload their proof of business.
TIA
and kind regards

Christoph
you can use 7-Zip or for windows 10 from windows apps market program name (BreeZip : FREE RAR & ZIP Extractor) or (RAR Opener)
I just packed as Zip
CD_ProfileImage.zip
You do not have the required permissions to view the files attached to this post.
beerbee
Member
Posts: 48
Joined: Mon Oct 26, 2020 4:56 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 5 times

Re: image upload on account edit/create

Post by beerbee »

Hi @Omar_one and @LeeFoster ,

I think I've got something..

But first please note that I'm still on 1.8.0 something.

I copied the upload.php class file from admin to includes/system/override/ and then noticed that the function
function tep_is_writable($file) required by the upload class was also missing in the catalog functions.
I put this one into an extra file inside my template folder.
I don't know if this is required for newer versions.

If you want to try this you'd have to adapt some pieces to get it working on newer versions.

But anyway:

Make sure the folder images/profile is writable.

Add a column to customers table named customers_profile_pic

Inside your template/includes/pages edit where needed eg. create_account.php the form so it has
enctype="multipart/form-data" in it

Code: Select all

<?php echo tep_draw_form('create_account', tep_href_link('create_account.php', '', 'SSL'), 'post', 'enctype="multipart/form-data"', true) . tep_draw_hidden_field('action', 'process');
Before uploading please change the folder name your_template accordingly.
Only tested with create account and account edit
Does not work from the admin side.
The contained upload.php inside includes/system/override/is from 1.8.0

Kind regards
Chrstoph
You do not have the required permissions to view the files attached to this post.


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply