0

Does anyone using this platform osCommerce,i can't figure out some stuff.

in OsCommerce old version i guess 2.3

There is lof_slider_mod.php and lof_slider.php in admin section,i wan't to make sorting of slides.

lof_slider_mod.php: Image of Sorting field

i added sort_order table because there was just sort.

$result = tep_db_query("select id from slider order by sort_order DESC limit 1");
    $last = tep_db_fetch_array($result);

    foreach($_POST['main_title'] as $key => $value){
        tep_db_query("  insert into
                        slider
                        set
                        id = '".($last['id']+1)."',
                        main_title = '".$_POST['main_title'][$key]."',
                        main_text = '".$_POST['main_text'][$key]."',
                        main_image = '".$_POST['main_image']."',
                        hyperlink = '".$_POST['hyperlink']."',
                        language_id = '".tep_db_prepare_input($key)."'");
    }


    tep_redirect(tep_href_link('lof_slider.php', ''));
}

lof_slider.php

I'm figuring this about 24hours. Thank you.

Linus
  • 1

0 Answers0