You get a bonus - 1 coin for daily activity. Now you have 1 coin

Order of image slides in the OpenCart banner slideshow

Practice




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']);
created: 2013-12-20
updated: 2026-03-10
425



Was this answer useful?
Choose a quick rating so we can improve the next answer for you.
How satisfied are you?


Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "Running server side scripts using PHP as an example (LAMP)"

Terms: Running server side scripts using PHP as an example (LAMP)