Hi
I would like to moddify product page in my template... I would like to display additional images with Sort Order more than 100 in other place. Can I somehow get Sort Order value inside the additional images loop? Maybe it is $image['something']?
I've got no idea... I think it'll be very usable not only for me. Maybe should I try $this->something?
And how to get value of total additional images?
And how to get value of total additional images?
I finally manage to get the solution for this.
1. First rename all your image file to ascending order. eg:01.jpg, 02.jpg, 03.jpg....
2. Then log on to your admin page and upload all your additional images for the particular product.
3. Open /catalog/model/catalog/product.php and admin/model/catalog/produts.php
find and change
to
4. make sure you change the code for both file.
5. save and refresh your product page.
Actually what i do is just sort the image file order by image. So, images that have been renamed, will be sort in ascending order. This works in opencart 1.5 version.
1. First rename all your image file to ascending order. eg:01.jpg, 02.jpg, 03.jpg....
2. Then log on to your admin page and upload all your additional images for the particular product.
3. Open /catalog/model/catalog/product.php and admin/model/catalog/produts.php
find and change
Code: Select all
public function getProductImages($product_id) {
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_image WHERE product_id = '" . (int)$product_id . "'");
return $query->rows;
}
Code: Select all
public function getProductImages($product_id) {
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_image WHERE product_id = '" . (int)$product_id . "'ORDER BY image");
return $query->rows;
}
5. save and refresh your product page.
Actually what i do is just sort the image file order by image. So, images that have been renamed, will be sort in ascending order. This works in opencart 1.5 version.
Who is online
Users browsing this forum: Amazon [Bot] and 66 guests