Photo Upload End User How to show a Thumbnail After upload

ThemeBurn SupportForumsOpenCart ThemesShoppica OpenCart ThemePhoto Upload End User How to show a Thumbnail After upload

This topic has been marked as not resolved.

Hello there,

Do you have any idea when we use the option to upload the picture and can immediately show the upload picture???

if our customer cannot see the picture when they upload the file, it seems not user friendly.

 

Do you have any idea?

 

<!–Here is the box for holding the returned image–>
<!–Show Photo Thmub–>
<div style=”width:100px;height:100px;”>
Write Something!
</div>
<!–Show Photo Thmub–>
<!—->

<script type=”text/javascript”><!–
new AjaxUpload(‘#button-option-<?php echo $option['product_option_id']; ?>’, {
action: ‘index.php?route=product/product/upload’,
name: ‘file’,
autoSubmit: true,
responseType: ‘json’,
onSubmit: function(file, extension) {
$(‘#button-option-<?php echo $option['product_option_id']; ?>’).after(‘<img src=”catalog/view/theme/default/image/loading_black.gif” style=”padding-left: 5px;” />’);
/*I place this*/
$(“.content”).html(‘<img src=”‘ + file + ‘”>’ + file + ‘</img>’);

},

onComplete: function(file, json) {
$(‘.error’).remove();

if (json.success) {

$(‘input[name=\'option[<?php echo $option['product_option_id']; ?>]\’]').attr(‘value’, json.file);
}

if (json.error) {
$(‘#option-<?php echo $option['product_option_id']; ?>’).after(‘<span>’ + json.error + ‘</span>’);
}

$(‘.loading’).remove();
}

});
//–></script>

I got maximum 4 images may upload from customer, but I tried to put it into product_option.tpl and it won’t work, I hope you can help.

 

Thank you very much

 

Regards
Ken

May 9, 2012 at 6:51 pm #8741

Hi Ken,

Is this some kind of a third party plugin?

As far as we know, OpenCart and Shoppica by default are not showing the uploaded images.

May 11, 2012 at 8:58 am #8785
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.