Neuigkeiten
  • Die modified eCommerce Shopsoftware ist kostenlos, aber nicht umsonst.
    Spenden
  • Damit wir die modified eCommerce Shopsoftware auch zukünftig kostenlos anbieten können:
    Spenden
  • Thema: Kopieren Button im Admin nach oben setzen ?!

    newbee79

    • Fördermitglied
    • Beiträge: 185
    • Geschlecht:
    Kopieren Button im Admin nach oben setzen ?!
    am: 28. Oktober 2012, 11:07:37
    Hallo zusammen,  :-)

    wenn ich einen Artikel kopieren möchte, gehen ja rechts in der Auswahlspalte erst einmal alle Kategorien auf ( für die Mehrfachauswahl ) und ganz unten erst steht ja dann "verlinken" oder "duplizieren"...

    Ich habe viele Kategorien - und da ist es schon sehr nervig jedes mal ganz nach unten zu scrollen, bis ich auf den Duplizieren Button komme.

    Gibt es z.B. die Möglichkeit die Kategorien für die Mehrfach-Auswahl als Klappmenü zu machen oder zumindest die Verlinken bzw. Duplizieren Funktion ganz nach oben zu nehmen, wie z.B. in der Produktbearbeitung - da ist ja Speichern etc. auch einmal oben und dann ganz unten ?!

    Habe schon in der categories.php geschaut, finde aber nicht nicht Stelle, wo die Verlinken bzw. Kopierenfunktion sitzt bzw. wüßte auch nicht wo dann hinkopieren  :glaskugel:

    Wäre für Hilfe sehr dankbar - ist vielleicht ja auch für andere nützlich, die viele Kategorien haben ?!

    Schöne Grüße,
    newbee

    P.S. ... habe auch schon die Suche benutzt, aber leider nichts dergleichen gefunden.

    Linkback: https://www.modified-shop.org/forum/index.php?topic=23020.0

    xxhappyxx

    • Viel Schreiber
    • Beiträge: 829
    • Geschlecht:
    Re: Kopieren Button im Admin nach oben setzen ?!
    Antwort #1 am: 28. Oktober 2012, 11:30:56
    Hallo newbee79,

    schau mal in der admin/includes/modules/categories_view.php nach.

    Dort solltest du fündig werden.

    Gruß Thomas

    newbee79

    • Fördermitglied
    • Beiträge: 185
    • Geschlecht:
    Re: Kopieren Button im Admin nach oben setzen ?!
    Antwort #2 am: 28. Oktober 2012, 11:57:54
    Hi Thomas,

    da war ich schon drin und habe auch die Stelle mit Multi_copy confirm gefunden, wo unten die Funktion aufgelöst wird... aber ich hab' keine Ahnung welchen Baustein ich wie und wo einfügen muss. Bin PHP nicht so firm... sorry.  :-(

    Gruß

    newbee79

    • Fördermitglied
    • Beiträge: 185
    • Geschlecht:
    Re: Kopieren Button im Admin nach oben setzen ?!
    Antwort #3 am: 28. Oktober 2012, 12:34:15
    Ich bekomme zwar die Buttons nach oben kopiert, allerdings ist das Pull-down Menü, wo die aktuelle Kategorie immer darin steht leer ??  :-?

    newbee79

    • Fördermitglied
    • Beiträge: 185
    • Geschlecht:
    Re: Kopieren Button im Admin nach oben setzen ?!
    Antwort #4 am: 28. Oktober 2012, 13:21:17
    So, ich glaube ich habe es hinbekommen!  :hobbyhorse:

    Somit ist die Kopieren-Funktion auch über dem "Categories-tree" und man muß nicht mehr erst ganz herunterscrollen, wenn man nur einfach kopieren bzw. verlinken möchte.

    Der Code ist ohne Gewähr!

    Code: PHP  [Auswählen]
    // multi_copy confirm
            // --------------------
            if (xtc_not_null($_POST['multi_copy'])) {
                $heading[]  = array('text' => '<b>' . TEXT_INFO_HEADING_COPY_TO . '</b>');                 
                $contents[] = array('text' => '<a class="button" href="javascript:SwitchCheckCopyConfirm()" onclick="this.blur()">' . BUTTON_REVERSE_SELECTION . '</a>');
                $contents[] = array('text' => '<table width="100%" border="0">');
                if (is_array($_POST['multi_categories'])) {
                  foreach ($_POST['multi_categories'] AS $multi_category) {
                    $category_query = xtc_db_query("SELECT c.categories_id,
                                                           cd.categories_name,
                                                           c.categories_image,
                                                           c.parent_id,
                                                           c.sort_order,
                                                           c.date_added,
                                                           c.last_modified,
                                                           c.categories_status
                                                      FROM "
    . TABLE_CATEGORIES . " AS c,
                                                           "
    . TABLE_CATEGORIES_DESCRIPTION . " AS cd
                                                     WHERE c.categories_id = '"
    . (int)$multi_category . "'
                                                       AND c.categories_id = cd.categories_id
                                                       AND cd.language_id = '"
    . (int)$_SESSION['languages_id'] . "'");
                    $category = xtc_db_fetch_array($category_query);
                    $category_childs   = array('childs_count'   => $catfunc->count_category_childs($multi_category));
                    $category_products = array('products_count' => $catfunc->count_category_products($multi_category, true));
                    $cInfo_array = xtc_array_merge($category, $category_childs, $category_products);
                    $cInfo = new objectInfo($cInfo_array);
                    $contents[] = array('text' => '<tr><td style="border-bottom: 1px solid Black; margin-bottom: 10px;" class="infoBoxContent"><b>' . $cInfo->categories_name . '</b></td></tr>');
                    if ($cInfo->childs_count > 0) {
                      $contents[] = array('text' => '<tr><td class="infoBoxContent">' . sprintf(TEXT_MOVE_WARNING_CHILDS, $cInfo->childs_count) . '</td></tr>');
                    }
                    if ($cInfo->products_count > 0) {
                      $contents[] = array('text' => '<tr><td class="infoBoxContent">' . sprintf(TEXT_MOVE_WARNING_PRODUCTS, $cInfo->products_count) . '</td></tr>');
                    }
                  }
                }

                if (is_array($_POST['multi_products'])) {
                    foreach ($_POST['multi_products'] AS $multi_product) {
                        $contents[] = array('text' => '<tr><td style="border-bottom: 1px solid Black; margin-bottom: 10px;" class="infoBoxContent"><b>' . xtc_get_products_name($multi_product) . '</b></td></tr>');
                        $product_categories_string = '';
                        $product_categories = xtc_output_generated_category_path($multi_product, 'product');
                        $product_categories_string = '<tr><td class="infoBoxContent">' . $product_categories . '</td></tr>';
                        $contents[] = array('text' => $product_categories_string);
                    }
                }

                            // Doppelte Copy Buttons START
                            if (is_array($_POST['multi_products'])) {
                  $category_tree=xtc_get_category_tree('0','','0');
                } else {
                  $category_tree=xtc_get_category_tree();
                }
                $contents[] = array('text' => '<br />' . TEXT_SINGLECOPY_CATEGORY . '<br />' . xtc_draw_pull_down_menu('dest_category_id', $category_tree, $current_category_id) . '<br /><hr noshade>');
                $contents[] = array('text' => '<strong>' . TEXT_HOW_TO_COPY . '</strong><br />' . xtc_draw_radio_field('copy_as', 'link', true) . ' ' . TEXT_COPY_AS_LINK . '<br />' . xtc_draw_radio_field('copy_as', 'duplicate') . ' ' . TEXT_COPY_AS_DUPLICATE . '<br /><hr noshade>');
                $contents[] = array('align' => 'center', 'text' => '<input class="button" type="submit" name="multi_copy_confirm" value="' . BUTTON_COPY . '"> <a class="button" href="' . xtc_href_link(FILENAME_CATEGORIES, xtc_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) . 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . '&cID=' . $cInfo->categories_id) . '">' . BUTTON_CANCEL . '</a>');
                // Doppelte Copy Buttons END
                           
                //close list table
                $contents[] = array('text' => '</table>');
                           
                if (QUICKLINK_ACTIVATED=='true') {
                  $contents[] = array('text' => '<hr noshade>');
                  $contents[] = array('text' => '<b>'.TEXT_MULTICOPY.'</b><br />'.TEXT_MULTICOPY_DESC);
                  if (is_array($_POST['multi_products'])) {
                      $cat_tree=xtc_get_category_tree('0','','0');
                  } else {
                    $cat_tree=xtc_get_category_tree();
                  }
                  $tree='';
                  for ($i=0;$n=sizeof($cat_tree),$i<$n;$i++) {
                      $tree .= '<input type="checkbox" name="dest_cat_ids[]" value="'.$cat_tree[$i]['id'].'"><font size="1">'.$cat_tree[$i]['text'].'</font><br />';
                  }
                  $contents[] = array('text' => $tree.'<br /><hr noshade>');
                  $contents[] = array('text' => '<b>'.TEXT_SINGLECOPY.'</b><br />'.TEXT_SINGLECOPY_DESC);
                }
                if (is_array($_POST['multi_products'])) {
                  $category_tree=xtc_get_category_tree('0','','0');
                } else {
                  $category_tree=xtc_get_category_tree();
                }
                $contents[] = array('text' => '<br />' . TEXT_SINGLECOPY_CATEGORY . '<br />' . xtc_draw_pull_down_menu('dest_category_id', $category_tree, $current_category_id) . '<br /><hr noshade>');
                $contents[] = array('text' => '<strong>' . TEXT_HOW_TO_COPY . '</strong><br />' . xtc_draw_radio_field('copy_as', 'link', true) . ' ' . TEXT_COPY_AS_LINK . '<br />' . xtc_draw_radio_field('copy_as', 'duplicate') . ' ' . TEXT_COPY_AS_DUPLICATE . '<br /><hr noshade>');
                $contents[] = array('align' => 'center', 'text' => '<input class="button" type="submit" name="multi_copy_confirm" value="' . BUTTON_COPY . '"> <a class="button" href="' . xtc_href_link(FILENAME_CATEGORIES, xtc_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) . 'cPath=' . $cPath . '&pID=' . $pInfo->products_id . '&cID=' . $cInfo->categories_id) . '">' . BUTTON_CANCEL . '</a>');
                //close multi-action form
                $contents[] = array('text' => '</form>');
            }
            // multi_copy confirm ENDS

    Die Änderung ist gekennzeichnet mit:

    // Doppelte Copy Buttons START ( Zeile 47. ) &

    // Doppelte Copy Buttons END. ( Zeile 56. )

    Schönen Sonntag noch.

    Newbee

               
    anything