Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Jul 2009
    Posts
    127
    Plugin Contributions
    0

    Default Target individual items- Product listing page

    ZC version: 1.3.9h

    This question might have been asked before but I think my case might be a little bit different.
    On the product listing page I have a div that I want to appear over the image of a product when the mouse is over that product. I managed to do this however when I hover over ANY of the items on the product listing page the div that I want to appear only appears on the first product. I would like this div to appear over the product that the mouse is currently on.
    This may sound vague but in short I want to know how I can target individual products on the products listing page, since the all have the same id and class name. (any way if there is another way but preferably through 'includes/modules/products_listing.php')

  2. #2
    Join Date
    Jul 2009
    Posts
    127
    Plugin Contributions
    0

    Default Re: Target individual items- Product listing page

    Can anyone offer any solutions to this problem?

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

    Default Re: Target individual items- Product listing page

    Not without more information on what you did to get the div to show in the first place. Seeing it live would also help.

  4. #4
    Join Date
    Jul 2009
    Posts
    127
    Plugin Contributions
    0

    Default Re: Target individual items- Product listing page

    Absolutely, I didn't see this post. This is what I did, on line 275 I have this, <code>$lc_text = '<div id="quickShop" class="quickView"><div id="quickView" class="quickView" style="width:500px;height:500px;"></div><a id="quick_view_link" class="quick_view_links" style="visibility:hidden;" rel="facebox" onclick"showstuff(quickView)" href="#quickView">Quick View</a></div>';</code>

    and on line 304 (right after the line that says, $lc_text = implode('', $product_contents); ) I have this
    <code>
    $list_box_contents[$rows][$column] = array('params' => 'class="centerBoxContentsProducts centeredContent back" onmouseout="document.getElementById(\'' . quick_view_link . '\').style.visibility = \'' . hidden . '\';" onmouseover="document.getElementById(\'' . quick_view_link . '\').style.visibility = \'' . visible . '\';"' . ' ' . 'style="width:' . $col_width . '%;"',
    'text' => $lc_text);
    $column ++;
    </code>

  5. #5
    Join Date
    Jul 2009
    Posts
    127
    Plugin Contributions
    0

    Default Re: Target individual items- Product listing page

    See an example in my signature.

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

    Default Re: Target individual items- Product listing page

    You give all items the same id
    Code:
    <a id="quick_view_link" class="quick_view_links"
    so the js finds the first instance of that id on the page. You need to tweak it something like
    Code:
    <a id="quick_view_link' . $listing->fields['products_id'] . '" class="quick_view_links"
    which will give an id of #quick_view_link23 for product id 23.
    You also need the
    Code:
    onmouseout="document.getElementById(\'' . quick_view_link . '\')
    to handle the id the same way, looking for the specific one being processed.

    Treat all cases of ids in this section the same, so that none of the ids is repeated on other products (which is a CSS/HTML no-no).

  7. #7
    Join Date
    Jul 2009
    Posts
    127
    Plugin Contributions
    0

    Default Re: Target individual items- Product listing page

    Soo sweet, thank you. I had an idea of what to do it just wasn't concrete. I think you see by now what I want to do. Can you tell me how I can make those links pull up a div with information about the product inside. At least the best way you feel to get it done?

  8. #8
    Join Date
    Jul 2009
    Posts
    127
    Plugin Contributions
    0

    Default Re: Target individual items- Product listing page

    Quote Originally Posted by novastar View Post
    Soo sweet, thank you. I had an idea of what to do it just wasn't concrete. I think you see by now what I want to do. Can you tell me how I can make those links pull up a div with information about the product inside. At least the best way you feel to get it done?
    I tried to use facebox but I'm not really familiar with it so I'm not sure if I'm over simplifying it. But I'd like to see if it can work before I move to the next solution.

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

    Default Re: Target individual items- Product listing page

    Several people have recently been developing "quick look" or "quick view" mods. rbarbour's solution is CSS-based, while others require javascript. Look at those before reinventing the wheel.

  10. #10
    Join Date
    Jul 2009
    Posts
    127
    Plugin Contributions
    0

    Default Re: Target individual items- Product listing page

    That is great, didn't know someone else was working on it. I looked for it and didn't find it anywhere. I think would of gotten there eventually but I wouldn't even have started if I had seen that. Do you know if it been packaged yet?

    Thanks for the tip/s.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Adding popup to individual product page
    By 1leo in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 9 Sep 2010, 03:12 PM
  2. Showing more items per page on product listing
    By dsided in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 27 May 2010, 07:16 PM
  3. Edit individual Product Listing Page
    By Yolanda in forum Setting Up Categories, Products, Attributes
    Replies: 7
    Last Post: 16 Feb 2010, 07:02 AM
  4. Load Individual Product Page on Homepage
    By matt123 in forum Basic Configuration
    Replies: 7
    Last Post: 8 Sep 2008, 05:37 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