Thread: random images

Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2007
    Posts
    1,704
    Plugin Contributions
    0

    Default random images

    in my head on my zencart i have 3 images that are random image that are from a seporate image file in my template folder.

    what i was thinking, is there a way in which these images ould berandom images of product we sell and if people click it will take them to the product??

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: random images

    Yes. If you put the images into banners and locate them in the header, then Zen Cart can take care of the randomising and you can point the banners to the specific product info via the banner manager in Admin.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  3. #3
    Join Date
    Feb 2007
    Posts
    1,704
    Plugin Contributions
    0

    Default Re: random images

    that mean i would have to make a banner for every product???

    i was looking for something totally automated ie like the featured product sidbar etc!

  4. #4
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: random images

    In that case you have some programming ahead of you. All the code you need is already there but needs cloning and tweaking.

    I'd suggest that you clone includes/modules/featured_products.php to extract your three random featured products. You'd need to adjust the number of items extracted from MAX_RANDOM_SELECT_FEATURED_PRODUCTSat present to three. You'll also want to suppress the title and some of the other data added to the text array for display.

    Then clone includes/templates/template_default/templates/tpl_modules_featured_products.php and change the ID and class so that you can style them differently with CSS.

    Finally, inlcude the template module in your common/tpl_header.php file.

    There'll probably be some tidying up needed, but that's basically it.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

 

 

Similar Threads

  1. Random images
    By gabenn2 in forum General Questions
    Replies: 2
    Last Post: 26 Aug 2007, 05:21 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg