Markus H. Posted September 2, 2016 Share Posted September 2, 2016 Hello, our shop sells among other some magazines and therefore we need to display the actual coverimage of the magazine as product image. The magazin publisher provides us an link to an extern image of his magazin cover. How we can use this link instead of an static image as product image? Some of the cover images will changed every week, so updating the static product image is not an option for us. Thank you very much for tips and hints. Markus Link to comment Share on other sites More sharing options...
Prestachamps Posted September 2, 2016 Share Posted September 2, 2016 Hi, in order to achieve this, you can do the following: import or update the external link of the product image into a custom column for the product in the database(create a new column in the database for product table), or in a feature(and hide that feature from the product page), and then override the getImageLink function in the Link class to return that specific link only for the products that have that external link defined(saved). Regards, Leo Link to comment Share on other sites More sharing options...
Markus H. Posted September 2, 2016 Author Share Posted September 2, 2016 Hi Leo, thank you for your suggestion. Someone in the german forum wrote a very simple, but useful solution for my problem. Using a redirect within the htaccess file of the webserver to redirect the image links to the external URL: redirect /25-cart_default/test.jpg https://www.... the extern link to the coverimage redirect /25-home_default/test.jpg https://www.... the extern link to the coverimage redirect /25-large_default/test.jpg https://www.... the extern link to the coverimage redirect /25-medium_default/test.jpg https://www.... the extern link to the coverimage redirect /25-small_default/test.jpg https://www.... the extern link to the coverimage redirect /25-thickbox_default/test.jpg https://www.... the extern link to the coverimage This works like a charm and PS is scaling the images too, so there is no need to redirect to images in different sizes. I am very happy with this. Have a nice weekend. Kind regards, Markus Link to comment Share on other sites More sharing options...
num47 Posted February 10, 2021 Share Posted February 10, 2021 I think there should be a module for this. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now