Page 67 of 710 FirstFirst ... 1757656667686977117167567 ... LastLast
Results 661 to 670 of 7099
  1. #661

    Default Attribute images with Image Handler 2

    Hi There,

    I have successfully installed IH2 and my sites looks much better for it in IE6 which doesn't handle client-side scaling at all well.

    There are however a couple of things which I need to get working and any help/pointers would be great:

    1) Attribute images are still poor quality, client-side scalings not handled by IH2. Is this a problem with my install? Or has support for this not been developed?

    If the case is the latter, then is there an easy way for me to call images using IH2 so that can have a go at making the changes myself? Or can anyone on the list recommend an alternative solution?

    2) I would also like to add some javascript to change the main product image each time an attribute option is selected or an attribute image is clicked.

    Does anyone on the list have a script which can do this?

    Thanks in advance

    ColinR

  2. #662
    Join Date
    Oct 2004
    Location
    Southport, UK
    Posts
    4,241
    Plugin Contributions
    20

    Default Re: Image Handler 2 Support

    IH2 handles ONLY product images.

    There is a Swap Image on MouseOver mod by DrByte somewhere, but it isn't (as far as I know) compatible with IH2. However, it may give you some pointers ...and if you can come up with a working version with IH2 installed, that would be an extremely useful contribution to add to the community.

    However, image swapping doesn't have to be javascript... take a look at http://www.cssplay.co.uk/menu/gallery.html (oh sorry - there goes the next couple of hours! ) where there's some great ideas. (How it's done is nearly always in his View Source)
    Development Manager @ JSWeb Ltd - suppliers of Applepay/Googlepay for Zencart
    20 years with Zencart !

  3. #663
    Join Date
    Mar 2006
    Location
    Los Angeles
    Posts
    287
    Plugin Contributions
    3

    Default Re: Image Handler 2 Support

    *bookmarks link :)

    lot's of good stuff in there. :)

  4. #664

    Idea or Suggestion Re: Image Handler 2 Support

    Hi Ryk,

    Thanks for the pointers. To keep things simple then, I have implemented a separate image popup for attribute images - which is probably more sensible than swapping the main product image.

    I have used a free, third-party script to generate smoother attribute images on demand rather than trying to hack into IH2. I am however running this alongside IH2 (which naturally brings other benefits) without any problems.

    Perhaps I need to package this up as a new contribution when it's tidied up?

    To make this work you'll need this script in your root directory:

    http://www.zubrag.com/scripts/thumbnail-generator.php

    You then need to modify the bottom of file /includes/functions/html_output.php as follows:

    // alt is added to the img tag even if it is null to prevent browsers from outputting
    // the image filename as default
    $image = '<img src="' . zen_output_string($src) . '" alt="' . zen_output_string($alt) . '"';

    if (zen_not_null($alt)) {
    $image .= ' title=" ' . zen_output_string($alt) . ' "';
    }

    if (zen_not_null($parameters)) $image .= ' ' . $parameters;

    $image .= ' />';

    return $image;
    }

    ?>


    ...becomes...

    // alt is added to the img tag even if it is null to prevent browsers from outputting
    // the image filename as default

    $image = '<img src="thumb.php?src=' . zen_output_string($src) . '&x=100&y=100&f=0" alt="' . zen_output_string($alt) . '"';

    if (zen_not_null($alt)) {
    $image .= ' title=" ' . zen_output_string($alt) . ' "';
    }

    if (zen_not_null($parameters)) $image .= ' ' . $parameters;

    $image .= ' onclick="popupWindow(\'http://YOURDOMAIN/index.php?main_page=popup_image&src='.zen_output_string($src).'\')"';

    $image .= ' />';

    return $image;
    }

    ?>

    Finally you need to modify the template which displays in the popup image window so that you can present any image you choose simply by providing the path in a new 'src' attribute:

    /includes/templates/YOUR_TEMPLATES/popup_image/tpl_main_page.php

    Change...

    <?php
    // $products_values->fields['products_image']
    echo '<a href="javascript:window.close()">' . zen_image($products_image_large, $products_values->fields['products_name'] . ' ' . TEXT_CLOSE_WINDOW) . '</a>';
    ?>
    </div>

    ...to...

    <?php
    if ($_GET['src']) {
    echo '<a href="javascript:window.close()"><img src="' . $_GET['src'] . '"></a>';
    } else {
    // $products_values->fields['products_image']
    echo '<a href="javascript:window.close()">' . zen_image($products_image_large, $products_values->fields['products_name'] . ' ' . TEXT_CLOSE_WINDOW) . '</a>';
    }
    ?>
    </div>

    This should now present any image you upload in the attributes controller as a server-side scaled image in your products pages and allow you to pop up the full size version in the standard popup image window.

    Feel free to test and advise.

    ColinR
    Last edited by colinr; 15 Nov 2006 at 02:09 AM.

  5. #665
    Join Date
    Dec 2004
    Location
    SC
    Posts
    58
    Plugin Contributions
    0

    Default Re: Image Handler 2 Support

    We have IH version 2.0 installed on a zencart version 1.3.6 - is there a sql patch required? The additional images are not showing on the category pages. I checked under admin/product types to edit those configs (to show additional images) and that's not even an option. I checked the sql tables, and the option isn't listed. I've searched other threads and can't seem to find an answer. If there is a sql patch required, where could I find it?

    Thanks,
    Danielle
    Please feel free to PM me if needed.
    Danielle Bailey

  6. #666
    Join Date
    Oct 2004
    Location
    Southport, UK
    Posts
    4,241
    Plugin Contributions
    20

    Default Re: Image Handler 2 Support

    @colinr - thanks; I'll give that a try later (hopefully!)

    @chayton6 - did you install the latest version of IH2 from the download section AFTER 1.3.6? You do need to do it that way...there is a post by DrByte somewhere explaining about ereg replacement.
    Development Manager @ JSWeb Ltd - suppliers of Applepay/Googlepay for Zencart
    20 years with Zencart !

  7. #667
    Join Date
    Oct 2004
    Location
    Southport, UK
    Posts
    4,241
    Plugin Contributions
    20

    Default Re: Image Handler 2 Support

    colinr - what version of ZC are you using? Your html_output doesn't match the 1.3.6 one...and there are two sections at about line 120 and about line 196 with similar code to above...neither of which is anywhere near the end of the file!

    However, the second instance does have some effect, but not what I was hoping for! The main product image has disappeared and the attribute images now appear to be expanded thumbnails!!

    OK, I'm going to start this again.
    Development Manager @ JSWeb Ltd - suppliers of Applepay/Googlepay for Zencart
    20 years with Zencart !

  8. #668
    Join Date
    Oct 2004
    Location
    Southport, UK
    Posts
    4,241
    Plugin Contributions
    20

    Default Re: Image Handler 2 Support

    Nope - can't get this to work; is it working for you colinr? Have carefully re-done the procedure you've outlined and the results are the same as I reported earlier.
    Development Manager @ JSWeb Ltd - suppliers of Applepay/Googlepay for Zencart
    20 years with Zencart !

  9. #669
    Join Date
    Dec 2004
    Location
    SC
    Posts
    58
    Plugin Contributions
    0

    Default Re: Image Handler 2 Support

    @chayton6 - did you install the latest version of IH2 from the download section AFTER 1.3.6? You do need to do it that way...there is a post by DrByte somewhere explaining about ereg replacement.[/QUOTE]

    Yes, I read his posts. No, I did not install IH2 after the cart. Actually, I didn't do the installs at all. The store owner had the cart upgraded from a prev version to 1.3.6. I read the threads and he'd listed three pages that need to be used from the IH2 install (additional_images.php I believe and 2 others) and I uploaded those from the IH2 install. But that's not really addressing the fact that I don't have the option to set 'show additional images' to true - that option doesn't exist on my products types / edit layout page and isn't in my sql tables as an option. That's why I asked about the sql patch.
    Please feel free to PM me if needed.
    Danielle Bailey

  10. #670

    Default Re: Image Handler 2 Support

    Quote Originally Posted by Ryk View Post
    Nope - can't get this to work; is it working for you colinr? Have carefully re-done the procedure you've outlined and the results are the same as I reported earlier.
    Sorry about that. It definately works - but I think the 'original' code I sent through was actually a mod I had done previously and overlooked. Too many late nights.

    I will check through my code when I get a chance and send amendments.

    ColinR

 

 

Similar Threads

  1. v150 Image Handler 4 (for v1.5.x) Support Thread
    By DivaVocals in forum All Other Contributions/Addons
    Replies: 1687
    Last Post: 17 Nov 2024, 07:26 PM
  2. v139h Image Handler 3 Support Thread (for ZC v1.3.9)
    By DivaVocals in forum All Other Contributions/Addons
    Replies: 1095
    Last Post: 2 Oct 2017, 12:42 PM
  3. Image Handler Support Please
    By nadinesky in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 30 Sep 2013, 03:47 PM
  4. Image handler only covers part of screen
    By shaneburton in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 14 May 2009, 07:15 PM
  5. Is Image Handler the only way to go?
    By wwwursa in forum Installing on a Windows Server
    Replies: 2
    Last Post: 23 Dec 2007, 09:22 PM

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