Jump to content
Sign in to follow this  
Foffo

Scrolling Images Carousel With Hotlinks In Header

Recommended Posts

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!

Share this post


Link to post
Share on other sites

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:

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×