Order of image slides in the OpenCart banner slideshow
how can this be done?
in the file
admin/view/template/design/banner_form.tpl
add this at the very bottom
then replace
tbody id="image-row
with
tbody class="MoveableRow" id="image-row
after the line
insert
in the file
catalog/model/design/banner.php
instead of
"'");
add
"' ORDER BY bi.banner_image_id");
in the file
admin/model/design/banner.php
instead of
$banner_image_query = $this->db->query("SELECT * FROM " . DB_PREFIX . "banner_image WHERE banner_id = '" . (int)$banner_id . "'");
add
$banner_image_query = $this->db->query("SELECT * FROM " . DB_PREFIX . "banner_image WHERE banner_id = '" . (int)$banner_id . "' ORDER BY banner_image_id");
if everything is saved not in the right order, then
in
action editBanner($banner_id,
add an array reverse
if (isset($data['banner_image'])) {
$data['banner_image']= array_reverse ($data['banner_image']);
Comments