Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Scrolling Images Carousel With Hotlinks In Header


Foffo

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!

Link to comment
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:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...