Search the Community
Showing results for tags 'src'.
-
Hi all, Is it possible to override classes in src folder? Especially I need to add an additional field to the OrderPresenter's present() method which is located at /src/Adapter/Order/OrderPresenter.php PrestaShop version: 1.7.0.6 Thank you in advance for any help! BR, Paulius
-
Hello ! We need to display a default "No Picture" image when a variant has no image on its own instead of displaying ALL the product images. In order to achieve this we needed to change the behavior of the ImageRetriever class. Replacing return (0 === count($filteredImages)) ? $images : $filteredImages; By return (0 === count($filteredImages)) ? [ $this->getNoPictureImage($language) ] : $filteredImages; As we do not want to modify Core code base, we had to Extends the ImageRetriever class Override the ProductPresenterFactoryCode class in order to instantiate our ImageRetriever class instead of the core one. It is working as intended for us. Pros No modification of the Core classes Cons A lot of overridden code. Even if we extends the core classes (ProductPresenterFactoryCore and ImageRetriever), we had to override every properties and methods as they are not intended to be extended (private property, ...). In my opinion this is really bad. We should be able to alter core behavior without relying on so much code override.
-
Hello, A vender provides good description of their products. They provide html codes we simply paste it to our product description area. but they call images from their servers. Is there any plug-in which can get images (img src="xxx") if the src is not my own website and store them in my server? It should create a folder (product id) and restore in there and create new src codes?
- 4 replies
-
- description
- image
-
(and 1 more)
Tagged with: