X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Conveyor belt slideshow javascript for Featured Items (https://forum.x-cart.com/showthread.php?t=20040)

gfiebich 02-20-2006 12:01 PM

Conveyor belt slideshow javascript for Featured Items
 
I wanted a way to jazz up the Featured Items display on my store's homepage without using Flash or orther plugins. The Conveyor Belt Slideshow javascript found on DynamicDrive.com fit the bill. The trick was to build the image array from the Featured Items in X-cart. Here are the steps to get this working:
  1. Open skin1/customer/products.tpl and find
    Code:

    {if $usertype eq "C" and $config.Appearance.products_per_row ne "" and $config.Appearance.products_per_row gt 0 and $config.Appearance.products_per_row lt 4 and ($featured eq "Y" or $config.Appearance.featured_only_multicolumn eq "N")}
    and replace that with
    Code:

    {elseif $usertype eq "C" and $config.Appearance.products_per_row ne "" and $config.Appearance.products_per_row gt 0 and $config.Appearance.products_per_row lt 4 and ($featured ne "Y" and $config.Appearance.featured_only_multicolumn eq "N")}
  2. Now, just above that, paste
    Code:

    {if $featured eq "Y"}
    {literal}


    {/literal}

  3. Copy the code from DynamicDrive: http://www.dynamicdrive.com/dynamicindex14/leftrightslide.htm
    and paste it just between the {literal}s.
  4. In the code you just got from DynamicDrive, find
    Code:

    leftrightslide[0]='[img]dynamicbook1.gif[/img]'
    leftrightslide[1]='[img]dynamicbook2.gif[/img]'
    leftrightslide[2]='[img]dynamicbook3.gif[/img]'
    leftrightslide[3]='[img]dynamicbook4.gif[/img]'
    leftrightslide[4]='[img]dynamicbook5.gif[/img]'

    and replace it with
  5. That's it - modify the variables in the DynamicDrive script as needed and feature some items in the store admin.

A couple of notes: I wasn't able to get this code to function both at the home-level and in subcategories (has to do with the $productid variable format changing), the thumbnail images are aligned=bottom, the images scroll right to left (negative numbers in the settings don't have the expected results). If you have questions about the code, please don't paste any of the DynamicDrive script in your message as that would violate their TOS. This was done in X-Cart Gold 4.0.17.

happy modding,
-Glen

shirtshop 02-22-2006 01:42 PM

i try it for 3.5.10 but he shows only the feature product and just 1? how can i change it that this script shows all the products on the left or right side of our site?

gfiebich 02-22-2006 03:23 PM

Sorry, but I haven't tried this in X-cart 3.5 so I don't have any suggestions for you.

sbkp 02-24-2006 03:36 PM

Very nice!

I'd love to have a div below the conveyor belt that shows the short description of the most recently rolled-over thumbnail. I started looking into that, but other things are higher priority. If you happen to do that, please post!

- Stefan

rossco 03-10-2006 07:25 AM

I've tried this in 4.0.12 and although I dont get any errors I also dont get any slideshow. Any help would be gratefully received

www.acousticdevices.com

Allan

gfiebich 03-10-2006 08:20 AM

Allan-
I looked at your site and it looks like you have a simple typo in your code. There appears to be an "l" directly after:
Code:

var leftrightslide=new Array()
var finalslide=''

I think removing that should fix your problem.
-Glen

rossco 03-10-2006 09:59 AM

Thanks Eagle Eyed Glen

Works a treat.

Any idea how I can have more products showing though without it trying to spread them over two pages?

Allan

gfiebich 03-10-2006 10:10 AM

Allan-
Glad that fixed the problem. I'm not sure I follow you regarding the "more products" question. You could widen the conveyor belt to the same dimensions as that banner ad at the bottom of your page (728px). You can do this by changing
Code:

//Specify the slider's width (in pixels)
var sliderwidth="420px"


-Glen

PhilJ 03-10-2006 10:45 AM

Nice one Glen, great mod.

Maree 03-10-2006 11:58 AM

I use an ISDN script in my Ebay store - the ISDN script is derived from the Dynamic Drive script mentioned in the first post but has been tweaked. http://stores.ebay.com.au/Oz-Quilts_W0QQssPageNameZl2QQtZkm
I have several customised Sliders running across different categories on Ebay.

If you want to play with this code you could create an ISDN script and pick out any enhancements you want to create a customised look to your script. http://www.isdntek.com/tagbot/xsell.htm

Hope this helps someone


All times are GMT -8. The time now is 06:53 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.