Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2005
    Posts
    15
    Plugin Contributions
    0

    Default how can I set an image id?

    On the product info page, I want to give the main image an id so I can do a javascript image swap from the additional images.
    I'm looking in includes/templates/mytemplate/templates/tpl_modules_main_product_image.php
    which is where the code for the main image is put together and it currently reads

    zen_image($products_image_medium, addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT)

    I have tried a variety of adding id="mainimage but to no avail.

    Please help...

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

    Default Re: how can I set an image id?

    Quote Originally Posted by davidinho
    On the product info page, I want to give the main image an id so I can do a javascript image swap from the additional images.
    I'm looking in includes/templates/mytemplate/templates/tpl_modules_main_product_image.php
    which is where the code for the main image is put together and it currently reads

    zen_image($products_image_medium, addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT)

    I have tried a variety of adding id="mainimage but to no avail.

    Please help...
    zen_image($products_image_medium, addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT, 'id="mainimage"')
    should do it, i.e. adding the id assignment as 5th parameter enclosed by single quotes.
    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
    Oct 2005
    Posts
    15
    Plugin Contributions
    0

    Default Re: how can I set an image id?

    Thank you Kuroi
    I was having the problem because I'd taken out the height and width so it was going in as the third param.

 

 

Similar Threads

  1. How to set up Digital Image Download?
    By Ben-B in forum Basic Configuration
    Replies: 1
    Last Post: 30 Oct 2009, 06:01 PM
  2. Can we search categories? How can I set it up?
    By ECAutoSound in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 6 Jul 2009, 05:38 AM
  3. How can i set it up so customers can pay via PROTX?
    By Ciaran121music in forum Built-in Shipping and Payment Modules
    Replies: 7
    Last Post: 28 May 2008, 06:52 PM
  4. How to set option value with a set image as default of an attribute?
    By PaulRiedel in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 16 Aug 2007, 04: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