Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Create account with customers photo/picture. oSC 2.3.1


lcb

Recommended Posts

Posted

Dear friends,

 

I got an issue near to drive me crazy. I've been unsuccessfully trying for about two weeks completing a mod to let customers to upload a photo at create account step.

 

I made proper table arrangements inserting customer_image column and copy pasted code from admin side.

 

Got a text field able to correctly upload values but when I replace "tep_draw_input_field" with "tep_draw_file_field" in order to get the browser field, I get "

 

Fatal error
: Call to undefined function tep_draw_file_field() in
/home...

Any suggestion?

Posted

The function is located in the admin/includes/functions/html_output.php

 

// Output a form filefield
 function tep_draw_file_field($name, $required = false) {
   $field = tep_draw_input_field($name, '', '', $required, 'file');
   return $field;
 }

 

Copy it into your catalog side. You may also need to copy admin/includes/classes/upload.php to the catalog side and add the include path into application_top.php

 

Careful what you allow through. Try to check the file types to allow only image files and set a specific directory for them. Anything a customer can enter into a shop unsupervised becomes a securty threat.

Follow the community build:

BS3 to osCommerce Responsive from the Get Go!

Check out the new construction:

Admin Gone to Total BS!

Posted

Wooh! Sounds plenty of sense websource!! Sincerely thank you.

 

I'll check and come back to share tomorrow.

 

I already did the file limitation to image files (jpg, png...) but not so the different image directory.

 

Thanks again!!

 

Posted

Seems I'm missing something.

 

No browse button appears at all... Just getting a text input field instead.

 

even quoting tep_draw_file_field...

 

Mmm...

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...