OC version: 3.0.2.0
Is there a way or work around to display the filename or thumbnail of an image that is uploaded in a product option? Or even just change the upload button to read "uploaded" once a file is uploaded. There is a success dialog box by default, but once closed its not clear the file is there and it could be a little confusing to customers.
Any help is greatly appreciated.
Kind regards,
Chris.
In catalog/controller/tool/upload.php file,
find:
replace with:
In catalog/language/en-gb/tool/upload.php file,
replace:
with:
This should resolved the issue.
find:
Code: Select all
$json['success'] = $this->language->get('text_upload');
Code: Select all
$json['success'] = sprintf(htmlspecialchars_decode($filename), $this->language->get('text_upload'));
replace:
Code: Select all
$_['text_upload'] = 'Your file was successfully uploaded!';
Code: Select all
$_['text_upload'] = 'The file: %s was successfully uploaded!';
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Hi,
You can keep success message bellow upload button.
File:
Find:
Replace with:
Find:
Replace with:
You can keep success message bellow upload button.
File:
Code: Select all
catalog\view\theme\default\template\product\product.twig
Code: Select all
$('.text-danger').remove();
Code: Select all
$('.text-danger, .text-success').remove();
Code: Select all
alert(json['success']);
Code: Select all
$(node).parent().find('input').after('<div class="text-success">' + json['success'] + '</div>');
Thank you so much both of you. I wen't with DigitCart's method as it seemed like the simplest fix, works perfectly.
Who is online
Users browsing this forum: JNeuhoff and 326 guests