GX-Bug #52429 » TopProductsFix.patch
| src/GXMainComponents/Controllers/HttpView/Admin/TemplateConfigurationController.inc.php (revision ) | ||
|---|---|---|
| 101 | 101 |
'GM_SHOW_WISHLIST' => gm_get_conf('GM_SHOW_WISHLIST') === 'true',
|
| 102 | 102 |
'GM_SPECIALS_STARTPAGE' => gm_get_conf('GM_SPECIALS_STARTPAGE'),
|
| 103 | 103 |
'GM_NEW_PRODUCTS_STARTPAGE' => gm_get_conf('GM_NEW_PRODUCTS_STARTPAGE'),
|
| 104 |
'GM_TOP_PRODUCTS_STARTPAGE' => is_numeric(gm_get_conf('GM_TOP_PRODUCTS_STARTPAGE')) ? gm_get_conf('GM_TOP_PRODUCTS_STARTPAGE') : 10,
|
|
| 104 | 105 |
'ENABLE_RATING' => gm_get_conf('ENABLE_RATING') === 'true',
|
| 105 | 106 |
'SHOW_RATING_IN_GRID_AND_LISTING' => gm_get_conf('SHOW_RATING_IN_GRID_AND_LISTING') === 'true',
|
| 106 | 107 |
'ALWAYS_SHOW_CONTINUE_SHOPPING_BUTTON' => gm_get_conf('ALWAYS_SHOW_CONTINUE_SHOPPING_BUTTON') === 'true',
|
| ... | ... | |
| 159 | 160 |
$this->_store('GM_SHOW_WISHLIST', $this->_getPostData('GM_SHOW_WISHLIST'));
|
| 160 | 161 |
$this->_store('GM_SPECIALS_STARTPAGE', (int)$this->_getPostData('GM_SPECIALS_STARTPAGE'));
|
| 161 | 162 |
$this->_store('GM_NEW_PRODUCTS_STARTPAGE', (int)$this->_getPostData('GM_NEW_PRODUCTS_STARTPAGE'));
|
| 163 |
$this->_store('GM_TOP_PRODUCTS_STARTPAGE', (int)$this->_getPostData('GM_TOP_PRODUCTS_STARTPAGE'));
|
|
| 162 | 164 |
$this->_store('ENABLE_RATING', $this->_getPostData('ENABLE_RATING'));
|
| 163 | 165 |
$this->_store('SHOW_RATING_IN_GRID_AND_LISTING', $this->_getPostData('SHOW_RATING_IN_GRID_AND_LISTING'));
|
| 164 | 166 |
$this->_store('ALWAYS_SHOW_CONTINUE_SHOPPING_BUTTON', $this->_getPostData('ALWAYS_SHOW_CONTINUE_SHOPPING_BUTTON'));
|
| src/lang/english/original_sections/admin/template_configuration.lang.inc.php (revision ) | ||
|---|---|---|
| 50 | 50 |
'MAIN_SHOW_QTY_TEXT' => 'Show quantity field (e. g. search results, manufacturer products)', |
| 51 | 51 |
'MAIN_VIEW_MODE_TILED_TEXT' => 'Tiled article listing (e. g. search results, manufacturer products)', |
| 52 | 52 |
'NEW_PRODUCTS_STARTPAGE_TEXT' => 'Maximum count of new products on startpage', |
| 53 |
'TOP_PRODUCTS_STARTPAGE_TEXT' => 'Maximum count of top products on startpage', |
|
| 53 | 54 |
'NO_STYLE_EDIT' => 'StyleEdit is not installed.<br /><br />', |
| 54 | 55 |
'NO_TEMPLATE_CONFIGURATION' => 'This template has no configuration settings.', |
| 55 | 56 |
'RELOAD_PAGE_TEXT' => 'The settings were successfully saved. Would you like to reload the page?', |
| src/admin/html/content/template_configuration.html (revision ) | ||
|---|---|---|
| 321 | 321 |
</div> |
| 322 | 322 |
</td> |
| 323 | 323 |
</tr> |
| 324 |
<tr> |
|
| 325 |
<td class="dataTableContent_gm configuration-label"> |
|
| 326 |
{$txt.TOP_PRODUCTS_STARTPAGE_TEXT}
|
|
| 327 |
</td> |
|
| 328 |
<td class="dataTableContent_gm"> |
|
| 329 |
<div class="gx-container" data-gx-widget="checkbox"> |
|
| 330 |
<input type="text" name="GM_TOP_PRODUCTS_STARTPAGE" value="{$GM_TOP_PRODUCTS_STARTPAGE}">
|
|
| 331 |
</div> |
|
| 332 |
</td> |
|
| 333 |
</tr> |
|
| 324 | 334 |
</table> |
| 325 | 335 | |
| 326 | 336 |
{*
|
| src/system/classes/listing/TopProductsMainContentView.inc.php (revision ) | ||
|---|---|---|
| 101 | 101 |
$t_group_check = ' AND p.group_permission_' . $this->customers_status_id . ' = 1 '; |
| 102 | 102 |
} |
| 103 | 103 | |
| 104 |
$MAX_TOP_PRODUCTS = gm_get_conf('GM_TOP_PRODUCTS_STARTPAGE');
|
|
| 105 | ||
| 106 |
if(!is_numeric($MAX_TOP_PRODUCTS)) |
|
| 107 |
{
|
|
| 108 |
$MAX_TOP_PRODUCTS = 10; |
|
| 109 |
} |
|
| 110 | ||
| 104 | 111 |
$t_new_products_query = "SELECT |
| 105 | 112 |
products_id |
| 106 | 113 |
FROM |
| ... | ... | |
| 111 | 118 |
" . $t_group_check . " |
| 112 | 119 |
" . $t_fsk_lock . " |
| 113 | 120 |
ORDER BY |
| 114 |
p.products_startpage_sort ASC"; |
|
| 121 |
p.products_startpage_sort ASC, |
|
| 122 |
RAND() |
|
| 123 |
LIMIT ". $MAX_TOP_PRODUCTS; |
|
| 115 | 124 | |
| 116 | 125 |
return $t_new_products_query; |
| 117 | 126 |
} |
| src/lang/german/original_sections/admin/template_configuration.lang.inc.php (revision ) | ||
|---|---|---|
| 51 | 51 |
'MAIN_SHOW_QTY_TEXT' => 'Mengeneingabefeld anzeigen (z. B. Suchergebnisse, Hersteller-Artikel)', |
| 52 | 52 |
'MAIN_VIEW_MODE_TILED_TEXT' => 'Gekachelte Artikelauflistung (z. B. Suchergebnisse, Hersteller-Artikel)', |
| 53 | 53 |
'NEW_PRODUCTS_STARTPAGE_TEXT' => 'Anzahl der neuen Artikel auf der Startseite', |
| 54 |
'TOP_PRODUCTS_STARTPAGE_TEXT' => 'Anzahl der Empfehlungen auf der Startseite', |
|
| 54 | 55 |
'NO_STYLE_EDIT' => 'Das Modul zum Bearbeiten des Shoplayouts (StyleEdit) ist nicht installiert.<br /><br />', |
| 55 | 56 |
'NO_TEMPLATE_CONFIGURATION' => 'Dieses Template hat keine Konfigurationseinstellungen.', |
| 56 | 57 |
'RELOAD_PAGE_TEXT' => 'Die Einstellungen wurden erfolgreich gespeichert. Möchten Sie die Seite neu laden, um die Änderungen zu sehen?', |