- This topic is empty.
-
AuthorPosts
-
April 4, 2013 at 4:28 am #43878
Raza
MemberI’ve been using an existing script to integrate with a jquery slider, I’ve tried lots of jquery sliders but Im always stuck at the same point & which is :
that somehow I can’t tell the slider or script(which gets products from mysql) to continue displaying next products on the next slide.
I’ve posted this issue on stackoverflow & other sites as well but useless.Now I want a suggestion or any easy way out of this issue. I just want to display 4 products at a time on one slide, then the next 4 products on the 2nd slide & so on…!
these are the products I want to display using a jquery slider:
http://www.tradeglobus.com
(the products inside the “**Top Wholesale Suppliers**”)
And if I increase the number of products from backend, it’ll display the slide numbers/bullets.
its using jquery but its not animated.Please guys any help would be greatly appreciated, as Im so tired of working on same thing from about 2 weeks now :(
Thanks in advance……!
April 4, 2013 at 5:02 am #130607CrocoDillon
ParticipantHow many products in total? If it’s not too much I’d just load them all into the slider, and use jQuery to show only 4 of them at a time.
Else it gets more complicated, you’d need a php script that queries your database for 4 next (or previous) products and that script also needs to tell if there is a next (or previous) so you can show or hide those buttons. A query like tanners is possible if you know the SKUs (except it should be `where SKU in (12345, 54321, 23425, 14522)`), but if you don’t know the SKUs you can use `limit 4 offset ?` instead of `where`, where offset is a multiple of 4.
Then you need to call that script using AJAX (I like jQuery’s `.post()` function, it’s easy), and display the results.
April 4, 2013 at 5:20 am #130618Raza
Memberwhat the hell ? I can’t submit code in my post :S
its just keep executing it !well I was about to tell you that I have a PHP code which gets the products from MySQL into an existing slider, I tried to use it with many other jquery sliders, but its not displaying next 4 products on 2nd/3rd/4th slides, its just repeating the queries & displaying first 4 products on every slide.
is there any way to show you this php code ?
April 4, 2013 at 5:22 am #130619CrocoDillon
ParticipantApril 4, 2013 at 5:36 am #130620Raza
MemberThanks Croco,
here’s the php code at github:
https://gist.github.com/anonymous/5309080check it & plz guide me how can I integrate this with any jquery slider.
& this line controls the number of products to be displayed:$Query = clsMembers::getSupplierByLimit(16, 0);
April 4, 2013 at 9:56 pm #130614Podders
ParticipantAdd a loop counter and use the magical Modulo function to display the results in blocks of four,
-
AuthorPosts
- The forum ‘Other’ is closed to new topics and replies.