Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2009
    Location
    Sydney Australia
    Posts
    84
    Plugin Contributions
    0

    Default Struggling with finding an element which needs to be modified

    All this will sound silly, but I've been searching for hours for something and can't find it. According to a number of threads, I need to find the class, "imgLink," and then edit that file.

    The problem is, I can't find it. I'm new to all of this (ZC1.3.8), and have installed Firebug, and can see that when I edit this element, it does what I want it to do, but for the life of me, I can't find the file defined anywhere.

    In one forum I see that I can go to Tools>Developer's Toolkit, which looks to be a cool toy, but I'm not sure how it works. I inserted "imgLink" everywhere, in all six categories, and never files found.

    I found another forum where it said this file was in tpl_product_info_display.php, which I eventually located, but there was no reference to the file there.

    I suppose the question buried in here is "if I know what I need to change, what is the best method for finding which instance of that element I need to change?"

    My site isn't live so can't really show you what I mean, but am hoping some generic advice on using Firebug, or this other Toolkit, will get me on my way.

    Your help is hugely appreciated. Sean

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Struggling with finding an element which needs to be modified

    .imgLink is not a file, it is a selector name for a rule that can go in your stylesheet. It is possible that no rule exists yet; if not, you can add a new rule in
    /includes/templates/your_template/css/stylesheet.css. Do not touch any PHP files for this.

    If you were searching files for .imgLink, you would not find it, because it is written in the PHP files as class="imgLink" without the dot.

  3. #3
    Join Date
    Nov 2009
    Location
    Sydney Australia
    Posts
    84
    Plugin Contributions
    0

    Default Re: Struggling with finding an element which needs to be modified

    Excuse the non-tech jargon, but I think it is somewhere just can't figure out where. Here is why I think it exists. If I right click on the element I want to change (using firebug) I get:

    <span class="imgLink">larger image</span>

    BTW, have also searched stylesheet.css for the string imgLink, and it is not found. I realise that it is not a file, but a string I'm looking for within a file, but it would seem there would have to be away to locate that string . . . I just can't get my head around it.

    Any other ideas?

  4. #4
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,024
    Plugin Contributions
    3

    Default Re: Struggling with finding an element which needs to be modified

    You were on the right track - searching for 'imglink' in the Developers Tool Kit shows two files:

    includes/modules/additional_images.php

    and

    includes/templates/template_default/templates/tpl_modules_main_product_image.php

  5. #5
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Struggling with finding an element which needs to be modified

    *But* you don't want to touch either of those files.

    You need to add a rule to your stylesheet like
    Code:
    .imgLink {your-property: your-value;}
    There is no existing rule for .imgLink in the stylesheet, or the Developers Toolkit search would have found it.

  6. #6
    Join Date
    Nov 2009
    Location
    Sydney Australia
    Posts
    84
    Plugin Contributions
    0

    Default Re: Struggling with finding an element which needs to be modified

    Thanks All -- I guess I messed up using Developer's Toolkit. For those of you wanting to use this tool. I found the easiest method was to go to the last search section, "Look-up in all files," and then make sure that you change "All Files Look-ups:" from "none" to "All Files Catalog/Admin."

    Showed all three instances on my installation, and then I was careful to modify, and place in corresponding template folders:

    i.e.
    includes/templates/template_default/templates/tpl_modules_main_product_image.php

    was modified and then saved to:

    includes/templates/CUSTOM/templates/tpl_modules_main_product_image.php

    I think this stuff is starting to sink in . . . thanks again!

 

 

Similar Threads

  1. v138a Normally which files should be edited to add a element?
    By fanisme in forum General Questions
    Replies: 3
    Last Post: 7 Apr 2013, 07:45 PM
  2. Finding which file something is located...
    By cchan in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 13 Jan 2011, 06:26 PM
  3. Finding which product were purchased in an order
    By Snype in forum General Questions
    Replies: 8
    Last Post: 11 Nov 2008, 08:55 AM
  4. Element above needs to be below option name
    By jdsmith8 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 7 Dec 2006, 06:13 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR