Totally Zenned
- Join Date:
- Aug 2014
- Location:
- Lisbon
- Posts:
- 597
- Plugin Contributions:
- 0
Unlink images on preview product cancel action
zc156a
Hi
Right now, if you cancel a new product (on preview), after uploading a image, it doesn't delete the image.
Maybe something more subtle to hide that url get, maybe using a global (?), to catch that on category_listing and delete / unlink request.
<a href="<?php echo zen_href_link(FILENAME_CATEGORY_PRODUCT_LISTING, 'cPath=' . $cPath . (isset($_GET['pID']) ? '&pID=' . $_GET['pID'] : '') . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '') .
(isset($_GET['search']) ? '&search=' . $_GET['search'] : '') .
'&unlink_img='.$products_image_name.''); ?>"
class="btn btn-default" role="button"><?php echo IMAGE_CANCEL; ?></a>
“Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison