Reputation: 1
I'm following this thread and I'm trying to customize product.tpl
I've added this code to have a pdf icon when the user upload a pdf file:
{if isset($pictures.$key)}
{if strpos($pictures.$key, '.pdf') !== false}<br>
<div class="customizationUploadBrowse">
<img src="https://example.com/img/pdf80.png"/>
<a href="{$link->getProductDeletePictureLink($product, $field.id_customization_field)|escape:'html':'UTF-8'}" title="{l s='Delete'}" >
<img src="{$img_dir}icon/delete.gif" alt="{l s='Delete'}" class="customization_delete_icon" width="13" height="13" /></a>
</div>
{else}
<div class="customizationUploadBrowse">
<img src="{$pic_dir}{$pictures.$key}" alt="" style="max-width:100px; max-height: 100px;"/>
<a href="{$link->getProductDeletePictureLink($product, $field.id_customization_field)|escape:'html':'UTF-8'}" title="{l s='Delete'}" >
<img src="{$img_dir}icon/delete.gif" alt="{l s='Delete'}" class="customization_delete_icon" width="13" height="13" />
</a>
</div>
{/if}
{/if} </div>
{/if}{/if}
If I try to delete the pdf files, I get an error message even if the file is beeing deleted.
No problems with jpg and png instead.
How can I get the pdf (and, most likely .ai will be added too) to be deleted as well? Is there a way to upload the files without clicking on "save" button?
Upvotes: 0
Views: 62