View Single Post
  #1  
Old 02-20-2006, 12:01 PM
 
gfiebich gfiebich is offline
 

Senior Member
  
Join Date: Feb 2003
Location: St. Paul, MN
Posts: 108
 

Default 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
__________________
NO LONGER USING X-CART - NOT ACTIVE IN THESE FORUMS
Reply With Quote