- Priority: 0
- Status: Closed
- Theme: Alysum
-
Assigned To:
Fred
- Private: No
- Open Date: 04.10.21, 14:58
- Opened by: Stefano Paolucci
- Closed by: Anonymous Submitter
- Closed on:
- Reason: Not a bug
Ticket #22375 - Other file uploads extensions on mobile | AMP
I’ve just added pdf, ai and psd as possible uploadable extensions but it only works on desktop. Is it possible to enable them on mobile too?
I’ve followed this tutorial: https://github.com/thuydtshop/prestashop-allow-upload-pdf-ai-psd
Comments
but what exactly did you change in theme’s files?
Code is not mine, so I just added or modified files.
Changes log:
modified controllers/front/ProductController.php
added two images in img/
added ImageManager in /override/classes/
modified ProductController.php in override/controllers/front/
modified ImageRetriever.php in src/Adapter/Image/
modified OrderProductCustomizationForViewing.php src/Core/Domain/Order/QueryResult
modified product.html.twig in src/PrestaShopBundle/Resources/views/Admin/Sell/Order/Order/Blocks/View/
That looks complicated.
AMP have it’s own product controller file here /modules/pkamp/controllers/front/product.php
Try to add your customization there
Hi Fred,
I’ve found ampProductController.php handle file extensions verification and this use ImageManager class to do it.
Now my thought is: which file does it load? Because I’ve two file of ImageManager:
- classes/ImageManager.php
-override/classes/ImageManager.pgp
It loads first the file from “overrides” folder but that file just extends main file classes/ImageManager.php
I’ve override ImageManager so it should works, right?
Yes, I suppose