Das Anlegen von Cross Selling Artikeln in XT:Commerce / XTC:Modified kann bei größeren Artikelstämmen schon recht beschwerlich werden. Gibt es in den Artikelkategorien des Adminbereichs noch eine Möglichkeit, alle Elemente mit einmal zu markieren, existiert diese Möglichkeit beim Anlegen der Cross Selling Artikel einfach nicht.

Abhilfe schafft folgender Lösungsansatz:

Datei admin/inlcudes/javascript/categories.js

am Ende einfügen

[testimonial]function checkAll(field) { for (i = 0; i < field.length; i++) field[i].checked = true ; }
function uncheckAll(field) { for (i = 0; i < field.length; i++) field[i].checked = false ; }[/testimonial]

Datei admin/includes/modules/cross_selling.php

ca. Zeile 67 suchen nach

[testimonial]echo xtc_draw_form(‚cross_selling‘, FILENAME_CATEGORIES, “, ‚GET‘, “);[/testimonial]
und ersetzen durch

[testimonial]echo xtc_draw_form(‚product_search‘, FILENAME_CATEGORIES, “, ‚GET‘, ‚id=“cross_check_top“‚);[/testimonial]

ca. Zeile 160 suchen nach

[testimonial]echo xtc_draw_form(‚product_search‘, FILENAME_CATEGORIES, “, ‚GET‘);[/testimonial]
und ersetzen durch

[testimonial]echo xtc_draw_form(‚product_search‘, FILENAME_CATEGORIES, “, ‚GET‘, ‚id=“cross_check“‚);[/testimonial]
ca. Zeile 76 suchen nach

[testimonial]<table width=“100%“ border=“0″>
<tr>
<td width=“1%“><?php echo HEADING_DEL; ?></td>
<td width=“4%“><?php echo HEADING_SORTING; ?></td>
<td width=“5%“><?php echo HEADING_GROUP; ?></td>
<td width=“15%“><?php echo HEADING_MODEL; ?></td>
<td width=“34%“><?php echo HEADING_NAME; ?></td>
<td width=“42%“><?php echo HEADING_CATEGORY; ?></td>
</tr>[/testimonial]

davor einfügen

[testimonial]<input type=“button“ name=“selectall“ value=“Alle“ OnClick=“checkAll(document.getElementById(‚cross_check_top‘)[‚ids[]‘]) “ />
<input type=“button“ name=“selectall“ value=“Keine“ OnClick=“uncheckAll(document.getElementById(‚cross_check_top‘)[‚ids[]‘]) “ /> [/testimonial]
ca. Zeile 172 suchen nach

[testimonial]<table width=“100%“ border=“0″>
<tr>
<td width=“9%“><?php echo HEADING_ADD; ?></td>
<td width=“10%“><?php echo HEADING_GROUP; ?></td>
<td width=“10%“><?php echo HEADING_MODEL; ?></td>
<td width=“34%“><?php echo HEADING_NAME; ?></td>
<td width=“42%“><?php echo HEADING_CATEGORY; ?></td>
</tr>[/testimonial]

davor einfügen

[testimonial]<input type=“button“ name=“selectall“ value=“Alle“ OnClick=“checkAll(document.getElementById(‚cross_check‘)[‚ids[]‘]) “ />
<input type=“button“ name=“selectall“ value=“Keine“ OnClick=“uncheckAll(document.getElementById(‚cross_check‘)[‚ids[]‘]) “ />[/testimonial]

Voila. Ab sofort stehen 2 Button zum Markieren / Demarkieren aller Auswahlcheckboxen zur verfügung.

Backup der geänderten Dateien natürlich nicht vergessen.