Foffo Posted February 2, 2010 Share Posted February 2, 2010 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! Quote Link to comment Share on other sites More sharing options...
Foffo Posted February 9, 2010 Author Share Posted February 9, 2010 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 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 :thumbsup: Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.