I've installed the add-on Scrolling Images Carousel With Hotlinks In Header - it's a great add-on & it works great except that I can't get it to work correctly with products/categories that's been marked offline.
I've tried adding and product_status = '1' to make it choose another product, if the one chosen should be offline... but it won't work & I don't know how to solve it.
As it works now it adds the number of products I've set it to do as it should, but sometimes it chooses products that are offline (since they season-related & not sold all the year around). In those cases the picture shows up in the carousel and everything, but if I click on that product I only get redirected to the page I've made to be shown due to unsuccessful searches.
Anyone that knows how to get this to work, so it only chooses products that are set to be online (in other add-ons I've got this check to work by adding p.products_status = '1')?
Really big thanks, in advance, for the help!
Latest News: (loading..)
Scrolling Images Carousel With Hotlinks In Header
Started by Foffo, Feb 02 2010, 00:25
1 reply to this topic
#1
Posted 02 February 2010, 00:25
#2
Posted 09 February 2010, 00:38
Foffo, on 02 February 2010, 00:25, said:
I've installed the add-on Scrolling Images Carousel With Hotlinks In Header - it's a great add-on & it works great except that I can't get it to work correctly with products/categories that's been marked offline.
I've tried adding and product_status = '1' to make it choose another product, if the one chosen should be offline... but it won't work & I don't know how to solve it.
As it works now it adds the number of products I've set it to do as it should, but sometimes it chooses products that are offline (since they season-related & not sold all the year around). In those cases the picture shows up in the carousel and everything, but if I click on that product I only get redirected to the page I've made to be shown due to unsuccessful searches.
Anyone that knows how to get this to work, so it only chooses products that are set to be online (in other add-ons I've got this check to work by adding p.products_status = '1')?
Really big thanks, in advance, for the help!
I've tried adding and product_status = '1' to make it choose another product, if the one chosen should be offline... but it won't work & I don't know how to solve it.
As it works now it adds the number of products I've set it to do as it should, but sometimes it chooses products that are offline (since they season-related & not sold all the year around). In those cases the picture shows up in the carousel and everything, but if I click on that product I only get redirected to the page I've made to be shown due to unsuccessful searches.
Anyone that knows how to get this to work, so it only chooses products that are set to be online (in other add-ons I've got this check to work by adding p.products_status = '1')?
Really big thanks, in advance, for the help!
I've solved it myself - so if anyone runs into the same problem here's the solution:
In ~/inludes/header.php add:
p.products_status = '1' and
- right after:
tep_db_free_result($products_id_query);
$header_products_query = tep_db_query("select p.products_id, p.products_image, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where - and just before:
p.products_id in ('" . implode("', '", $prod_array) . "') and p.products_id = pd.products_id order by rand() limit " . DISPLAY_SCROLLING_HEADER_PRODUCTS);
- So the original looks like:
tep_db_free_result($products_id_query);
$header_products_query = tep_db_query("select p.products_id, p.products_image, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id in ('" . implode("', '", $prod_array) . "') and p.products_id = pd.products_id order by rand() limit " . DISPLAY_SCROLLING_HEADER_PRODUCTS); - And the edited one should look like:
tep_db_free_result($products_id_query);
$header_products_query = tep_db_query("select p.products_id, p.products_image, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id in ('" . implode("', '", $prod_array) . "') and p.products_id = pd.products_id order by rand() limit " . DISPLAY_SCROLLING_HEADER_PRODUCTS);
I hope this can help at least someone in the future














