Zen Cart Logo
Forums / All Other Contributions/Addons / Home Page Products Carousel [Support Thread]

Home Page Products Carousel [Support Thread]

Views: 8,419

Results 1 to 20 of 46
10 Jun 2018, 1:25 PM
#1
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,782
Plugin Contributions:
21

Home Page Products Carousel [Support Thread]

This is the official support thread for the ZX Home Page Products Carousel plugin.

For those who want to download it before it is approved and available in the Plugins section, you can find it here.

The official plugin download is here

The plugin allows you to add a rotating slider to your home page and automatically display your latest products, specials, featured, bestsellers or simply a custom list of products.

Attachment 17903

Any questions you may have, please ask here and I'll do my best to reply. No guarantees, but I'll do my best.

19 Jun 2018, 3:18 PM
#2
himmon avatar

himmon

New Zenner

Join Date:
Oct 2010
Location:
London
Posts:
50
Plugin Contributions:
0

Re: Home Page Products Carousel [Support Thread]

This is brilliant, thank you very much!

20 Jun 2018, 1:31 AM
#3
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,782
Plugin Contributions:
21

Re: Home Page Products Carousel [Support Thread]

Thanks for the feedback - glad to hear you like it!

The plugin has been approved and can be found here.

Suggestions and ideas for improvement are always welcome.

21 May 2020, 1:52 AM
#4
shags38 avatar

shags38

Totally Zenned

Join Date:
Jan 2011
Location:
Adelaide, Australia
Posts:
1,684
Plugin Contributions:
0

Re: Home Page Products Carousel [Support Thread]

Hello Leonard,

I hope you and yours are safe and well. Gotta say that it was difficult to find this thread - your plugin doesn't show up in plugins search for carousel or even zx products carousel ?? I had to go to my hard drive downloaded copy to find the ink in the readme :)

Question - can the slider be used for crawler readable text? - the idea was to use news articles (for my products) that I use lat9 's News Box Manager for posting updates. The news box is on the home page and the crawlers are responding to the keywords in the text so rather than have myriads of news items in a long news box I wondered if rotating the articles/posts via your slider would be helpful. I suppose it might act like an rss feed or similar??

just wondering.

cheers, Mike

see news box on my site here www.dazzlerscliponearrings.com.au

21 May 2020, 3:09 PM
#5
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,782
Plugin Contributions:
21

Re: Home Page Products Carousel [Support Thread]

Hey Mike!

Yeah, the plugin doesn't show up in search - I have no idea why... Maybe PM Scott about it?

I'm pretty sure the slider could be used to rotate contents from the News Box Manager, but I'm not familiar with that plugin. It's basically just a matter of adding the correct SQL query to this plugin. I'm currently away, but will see if I can find some time tomorrow and come up with a solution. I'll post the results here.

26 Jan 2021, 6:48 PM
#6
thegrimreaper avatar

thegrimreaper

Zen Follower

Join Date:
Jan 2021
Location:
Arizona
Posts:
134
Plugin Contributions:
0

Re: Home Page Products Carousel [Support Thread]

I'm gonna try it, any words from the wise?
zc157b
posinstorepayment
coinpayments
posinstore
fedexwebservices
ups
No additional modules

26 Jan 2021, 7:22 PM
#7
thegrimreaper avatar

thegrimreaper

Zen Follower

Join Date:
Jan 2021
Location:
Arizona
Posts:
134
Plugin Contributions:
0

Re: Home Page Products Carousel [Support Thread]

Looking specifically at the optional database patch, not sure what it's going to do and what's the line on the deletes might do.

26 Jan 2021, 11:01 PM
#8
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,782
Plugin Contributions:
21

Re: Home Page Products Carousel [Support Thread]

I don't see why it wouldn't work with 1.5.7b, other than maybe requiring a careful merge of tpl_index_categories.php and tpl_index_default.php

As for the optional SQL query - it's optional. Copy/paste from the docs:
In case this automated installation fails for whatever reason, you can run the SQL patch manually.
So, unless for some reason the automated installer fails, there's no need to use the patch. As for the deletes - it would remove any previous database entries from this plugin, and then insert it again. Basically a (dirty) way of reinstalling - it doesn't check for existing entries and updates if necessary, but instead wipes any existing entries and inserts it back. Kinda like a factory reset...

27 Jan 2021, 10:59 PM
#9
thegrimreaper avatar

thegrimreaper

Zen Follower

Join Date:
Jan 2021
Location:
Arizona
Posts:
134
Plugin Contributions:
0

Re: Home Page Products Carousel [Support Thread]

Well, it works pretty good and looks nice on the home page, but it seems to take the center column space on other pages without displaying the carousel. I.E.- when I select a category from the top bar , the center column is filled with white space and the sub-categories (cattopgroup/categorylistboxcontents)are way down at the bottom, I can still select other categories from the top bar. When a category is selected from the sidebox category, I get the white space and the subs on the bottom, but also I am unable to select any different category from the sidebox list. I also have the next/back chevrons of owl_nav_disabled right on top of the sub-category display at the bottom. I've analyzed the tpl_index_default, tpl_index_categories and the tpl_index_slider and the code looks fine as far as I can tell. I know I'm missing something but can't quite pinpoint what. Any ideas?

28 Jan 2021, 12:09 AM
#10
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,782
Plugin Contributions:
21

Re: Home Page Products Carousel [Support Thread]

Well, that's one interesting oversight with the plugin. You should edit the tpl_index_slider.php file and change

if(ZX_CAROUSEL_STATUS == 'true') {
``` to ```
if(ZX_CAROUSEL_STATUS == 'true' && $this_is_home_page) {

That's it. Sorry about that, I'm surprised this hasn't been reported by now, but then again, if the plugin doesn't show up in search...

28 Jan 2021, 12:20 AM
#11
thegrimreaper avatar

thegrimreaper

Zen Follower

Join Date:
Jan 2021
Location:
Arizona
Posts:
134
Plugin Contributions:
0

Re: Home Page Products Carousel [Support Thread]

Perfect, very nice plugin.
Thank you again!

31 Jan 2021, 2:46 AM
#12
thegrimreaper avatar

thegrimreaper

Zen Follower

Join Date:
Jan 2021
Location:
Arizona
Posts:
134
Plugin Contributions:
0

Re: Home Page Products Carousel [Support Thread]

https://www.thercrv.com NOW LIVE

I now have it setup for as custom with images, but wonder how the order for those scrolling images is determined? I've tried to reorganize the display by spacing the product ID apart from each other to prevent aesthetically similar images from showing up next to each other, but that doesn't seem to work. Is it keyed off of categories? And is there a known way to control the order of display?

31 Jan 2021, 6:08 PM
#13
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,782
Plugin Contributions:
21

Re: Home Page Products Carousel [Support Thread]

The plugin is set to order these products by original products' sort order which you set in admin (although kinda useless if you have products from various categories) and then by products' names in alphabetical order.

If you want to change that and have the products show in the exact order as you entered the IDs in your admin, you'll need to make a change to one file - includes/templates/YOUR_TEMPLATE/templates/tpl_index_slider.php.
Find

case 'custom':
            $products_query = "SELECT DISTINCT p.products_id, pd.products_name, p.products_image, p.master_categories_id FROM "  . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd WHERE p.products_id IN (".ZX_CAROUSEL_MOD_CUSTOM.") AND p.products_status = '1' AND p.products_id = pd.products_id AND pd.language_id = " . (int)$_SESSION['languages_id'] ." ORDER BY p.products_sort_order, pd.products_name";
            if ($products_query != '') $products = $db->Execute($products_query, ZX_CAROUSEL_LIMIT);
            break;

and replace with

case 'custom':
            $products_query = "SELECT DISTINCT p.products_id, pd.products_name, p.products_image, p.master_categories_id FROM "  . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd WHERE p.products_id IN (".ZX_CAROUSEL_MOD_CUSTOM.") AND p.products_status = '1' AND p.products_id = pd.products_id AND pd.language_id = " . (int)$_SESSION['languages_id'];
            if ($products_query != '') $products = $db->Execute($products_query, ZX_CAROUSEL_LIMIT);
            break;
31 Jan 2021, 7:06 PM
#14
thegrimreaper avatar

thegrimreaper

Zen Follower

Join Date:
Jan 2021
Location:
Arizona
Posts:
134
Plugin Contributions:
0

Re: Home Page Products Carousel [Support Thread]

balihr:

The plugin is set to order these products by original products' sort order which you set in admin (although kinda useless if you have products from various categories) and then by products' names in alphabetical order.

If you want to change that and have the products show in the exact order as you entered the IDs in your admin, you'll need to make a change to one file - includes/templates/YOUR_TEMPLATE/templates/tpl_index_slider.php.
Find

case 'custom':
$products_query = "SELECT DISTINCT p.products_id, pd.products_name, p.products_image, p.master_categories_id FROM " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd WHERE p.products_id IN (".ZX_CAROUSEL_MOD_CUSTOM.") AND p.products_status = '1' AND p.products_id = pd.products_id AND pd.language_id = " . (int)$_SESSION['languages_id'] ." ORDER BY p.products_sort_order, pd.products_name";
if ($products_query != '') $products = $db->Execute($products_query, ZX_CAROUSEL_LIMIT);
break;

> and replace with
> ```
case 'custom':
            $products_query = "SELECT DISTINCT p.products_id, pd.products_name, p.products_image, p.master_categories_id FROM "  . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd WHERE p.products_id IN (".ZX_CAROUSEL_MOD_CUSTOM.") AND p.products_status = '1' AND p.products_id = pd.products_id AND pd.language_id = " . (int)$_SESSION['languages_id'];
            if ($products_query != '') $products = $db->Execute($products_query, ZX_CAROUSEL_LIMIT);
            break;

Well, that didn't work. The only image it put in the order I entered is the first image, the rest just went back to the same order. Kinda perplexing.

31 Jan 2021, 7:08 PM
#15
thegrimreaper avatar

thegrimreaper

Zen Follower

Join Date:
Jan 2021
Location:
Arizona
Posts:
134
Plugin Contributions:
0

Re: Home Page Products Carousel [Support Thread]

Actually in a second look, it didn't even put the first image in order as entered. It displays all the images I entered, just not in the order I entered.

I have the max increased from 10 to 20, running 15

31 Jan 2021, 7:15 PM
#16
thegrimreaper avatar

thegrimreaper

Zen Follower

Join Date:
Jan 2021
Location:
Arizona
Posts:
134
Plugin Contributions:
0

Re: Home Page Products Carousel [Support Thread]

Looks like what it did is sorted them numerically from low to high, disregarding the custom order.

What I'm trying to do is get them to display by product ID in an order I specify. I.E. 27,3,12,11,45,9........etc
What I get is 3,9,11,12,27,45....etc

31 Jan 2021, 10:02 PM
#17
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,782
Plugin Contributions:
21

Re: Home Page Products Carousel [Support Thread]

Yeah, sorry about that. Please disregards post #13 and use this:
Find

case 'custom':
            $products_query = "SELECT DISTINCT p.products_id, pd.products_name, p.products_image, p.master_categories_id FROM "  . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd WHERE p.products_id IN (".ZX_CAROUSEL_MOD_CUSTOM.") AND p.products_status = '1' AND p.products_id = pd.products_id AND pd.language_id = " . (int)$_SESSION['languages_id'] ." ORDER BY p.products_sort_order, pd.products_name";
            if ($products_query != '') $products = $db->Execute($products_query, ZX_CAROUSEL_LIMIT);
            break;

Replace with

case 'custom':
            $products_query = "SELECT DISTINCT p.products_id, pd.products_name, p.products_image, p.master_categories_id FROM "  . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd WHERE p.products_id IN (".ZX_CAROUSEL_MOD_CUSTOM.") AND p.products_status = '1' AND p.products_id = pd.products_id AND pd.language_id = " . (int)$_SESSION['languages_id'] ." ORDER BY FIELD(p.products_id, ".ZX_CAROUSEL_MOD_CUSTOM.")";
            if ($products_query != '') $products = $db->Execute($products_query, ZX_CAROUSEL_LIMIT);
            break;
31 Jan 2021, 11:05 PM
#18
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Home Page Products Carousel [Support Thread]

For increased security, you may want to replace both instances of

ZX_CAROUSEL_MOD_CUSTOM
with
zen_db_input(ZX_CAROUSEL_MOD_CUSTOM)

31 Jan 2021, 11:05 PM
#19
thegrimreaper avatar

thegrimreaper

Zen Follower

Join Date:
Jan 2021
Location:
Arizona
Posts:
134
Plugin Contributions:
0

Re: Home Page Products Carousel [Support Thread]

That's the one I was trying to do. Made a great mod even better. Thank you.

31 Jan 2021, 11:08 PM
#20
thegrimreaper avatar

thegrimreaper

Zen Follower

Join Date:
Jan 2021
Location:
Arizona
Posts:
134
Plugin Contributions:
0

Re: Home Page Products Carousel [Support Thread]

DrByte:

For increased security, you may want to replace both instances of

ZX_CAROUSEL_MOD_CUSTOM
with
zen_db_input(ZX_CAROUSEL_MOD_CUSTOM)

Excellent thought. Both instances of it?