ADD Creative wrote: ↑Tue Aug 23, 2022 6:08 pm
Check your config.php has all the correct URLs set. Check the multi-store config if using a multi-store.
Check the catalog/controller/feed/google_base.php file for any modifications, OCMOD, vQmod, etc.
Check the catalog/model/tool/image.php file for any modifications, OCMOD, vQmod, etc.
Make sure you request the https version of your feed and check the URLs in the XML data.
All set to correct URLS and it is a single store.
No modifications on google_base file. However, just opened the image.php file and here it is:
Code: Select all
<?php
class ModelToolImage extends Model {
public function resize($filename, $width, $height) {
if (!is_file(DIR_IMAGE . $filename)) {
return;
}
$extension = pathinfo($filename, PATHINFO_EXTENSION);
$old_image = $filename;
$new_image = 'cache/' . utf8_substr($filename, 0, utf8_strrpos($filename, '.')) . '-' . $width . 'x' . $height . '.' . $extension;
if (!is_file(DIR_IMAGE . $new_image) || (filectime(DIR_IMAGE . $old_image) > filectime(DIR_IMAGE . $new_image))) {
$path = '';
$directories = explode('/', dirname(str_replace('../', '', $new_image)));
foreach ($directories as $directory) {
$path = $path . '/' . $directory;
if (!is_dir(DIR_IMAGE . $path)) {
@mkdir(DIR_IMAGE . $path, 0777);
}
}
list($width_orig, $height_orig) = getimagesize(DIR_IMAGE . $old_image);
if ($width_orig != $width || $height_orig != $height) {
$image = new Image(DIR_IMAGE . $old_image);
$image->resize($width, $height);
$image->save(DIR_IMAGE . $new_image);
} else {
copy(DIR_IMAGE . $old_image, DIR_IMAGE . $new_image);
}
}
if ($this->request->server['HTTPS']) {
return $this->config->get('config_ssl') . 'image/' . $new_image;
} else {
return $this->config->get('config_url') . 'image/' . $new_image;
}
}
}
So I think the last few lines of code needs to be updated, to add base url? Because in the source code from the shop, all images start with url: 'image/cache/....' without the base url.