Having some problems with the modules in /includes/modules/frontpage
The only one working was fp_new_products.php
The fp_specials.php did not work, some sql error. Strange.
Comparing these fp_new_products.php and fp_specials.php
I changed this in fp_specials.php
if ($PHP_SELF == 'index.php' && $cPath == '') {
$specials_products_query_raw = "
select
p.products_id,
pd.products_name,
p.products_price,
p.products_tax_class_id,
p.products_image,
s.specials_new_products_price
from
" . TABLE_PRODUCTS . " p
join " . TABLE_PRODUCTS_DESCRIPTION . " pd
on pd.products_id = p.products_id
join " . TABLE_SPECIALS . " s
on s.products_id = p.products_id
where
p.products_status = '1'
and pd.language_id = '" . ( int ) $languages_id . "'
and s.status = '1'
order by
RAND()
limit
" . MODULE_FRONT_PAGE_SPECIALS_MAX_DISPLAY . "
";
// print 'Specials Query: ' . $specials_products_query_raw . '<br />';
$specials_products_query = tep_db_query( $specials_products_query_raw );
into this: (which is similar to the fp_new_products.php)
if ($PHP_SELF == 'index.php' && $cPath == '') {
// print 'Specials Query: ' . $specials_products_query_raw . '<br />';
$specials_products_query = tep_db_query( "select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p join " . TABLE_PRODUCTS_DESCRIPTION . " pd on pd.products_id = p.products_id join " . TABLE_SPECIALS . " s on s.products_id = p.products_id where p.products_status = '1' and pd.language_id = '" . ( int ) $languages_id . "' and s.status = '1' order by RAND() limit " . MODULE_FRONT_PAGE_SPECIALS_MAX_DISPLAY );
This worked for me. Now, on the other hand, is this a good solution? Or will it give other (hidden) problems after.
I have osc2.3.3 and frontpage 1.4 (php 5.3.10)