简体   繁体   中英

how to external image link images download for opencart products

Thanks for advance,

  1. I have installed the theme then I have installed import/export Module for products.
  2. I have Made the CSV file according existing CSV file which I have export through the Module. ( I have made that csv file fields accordingly).

But there are one problem with "image_name" fields i am trying to get images form extranal server like ( https://me-cdn.xyz.com/pub/media/catalog/product/V/1/V1_KHNB01649961_C2N1.jpg ).

When i am importing the file all fields are stored but images not stored it's showing Opencart default image.

Please help me how will work my csv file along with images.

You are only saving image name in table actually you are not uploading image on server. opencart have a function for image resize and rending you can find function in bellow file.

catalog/model/tool/image.php 

Function name is public function resize($filename, $width, $height) {

if you want your show your save image path then you can change this file through vqmod or ocmod.

For testing purpose add this line you above function

public function resize($filename, $width, $height) {
       $pos = strpos($filename, 'https://me-cdn.xyz.com/pub/media/');

       if ($pos !== false) {
           return $filename;
       } 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM