Thread: Zen Colorbox

Results 1 to 10 of 350

Hybrid View

  1. #1
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,835
    Plugin Contributions
    31

    Default Re: Zen Colorbox

    Similarly for additional images.
    Steve
    github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

  2. #2
    Join Date
    May 2007
    Posts
    124
    Plugin Contributions
    0

    Default Re: Zen Colorbox

    ZenCart 1.5.6c
    PHP 7.1
    Zen ColorBox 2.1.3 installed

    my main Product Image contains both a Foreground image and a background Image.
    When Zooming in only the foreground image shows in the Color Box.
    Anyway to get both images into the zoomed ColorBox?
    thanx
    Mike

  3. #3
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default Re: Zen Colorbox

    Quote Originally Posted by mikebr View Post
    ZenCart 1.5.6c
    PHP 7.1
    Zen ColorBox 2.1.3 installed

    my main Product Image contains both a Foreground image and a background Image.
    When Zooming in only the foreground image shows in the Color Box.
    Anyway to get both images into the zoomed ColorBox?
    thanx
    Mike
    I was notified of this post when it was made and have been trying to find some clear documentation or examples of how this might be implemented but am having difficulty visualizing how it is currently implemented to then offer a suggestion.

    Is there perhaps a link to this that can be shared either here or via PM?

    My thought is that if the two images are in some way captured within one another, then the "outer" designated image would be the one to have the data link applied, but then also wondering if somehow the two images need to be "merged" to a single image perhaps on the fly..

    Say that because the colorbox typically displays a single object per designation. So another way may to use another linked document that puts the two images on the page/object to be displayed so that both the background and main image are displayed as a single object.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #4
    Join Date
    May 2007
    Posts
    124
    Plugin Contributions
    0

    Default Re: Zen Colorbox

    Quote Originally Posted by mc12345678 View Post
    I was notified of this post when it was made and have been trying to find some clear documentation or examples of how this might be implemented but am having difficulty visualizing how it is currently implemented to then offer a suggestion.

    Is there perhaps a link to this that can be shared either here or via PM?

    My thought is that if the two images are in some way captured within one another, then the "outer" designated image would be the one to have the data link applied, but then also wondering if somehow the two images need to be "merged" to a single image perhaps on the fly..

    Say that because the colorbox typically displays a single object per designation. So another way may to use another linked document that puts the two images on the page/object to be displayed so that both the background and main image are displayed as a single object.
    Here is the link to a test product:
    http://ojemporium.com/teesrus/index....roducts_id=180
    Using AIS to change background and foreground Main Product images.
    Graphic is the foreground image.

    Colorbox only zooms in on foreground image

    thanx
    mike

  5. #5
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default Re: Zen Colorbox

    Quote Originally Posted by mikebr View Post
    Here is the link to a test product:
    http://ojemporium.com/teesrus/index....roducts_id=180
    Using AIS to change background and foreground Main Product images.
    Graphic is the foreground image.

    Colorbox only zooms in on foreground image

    thanx
    mike
    On my "initial" testing, I see what has been done to apply the background image (at least the result of). I was able to at least in part get the desired result when the style tag was applied to the image tag instead of the overall div for the mainProductImage. To do that, I cut the style out of the div tag and pasted it into the image tag and then when I opened the colorbox, at least that information carried over. There may still need to be some massaging of its behaviour when opening with that background, but I was also able to get it to display. Again, I was just breezing through but it seems like a change to how the background image characteristics are applied so that they go to the image of the div will be a step in the right direction. I didn't look at the javascript to apply the background to give much assistance, just know the result...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  6. #6
    Join Date
    May 2007
    Posts
    124
    Plugin Contributions
    0

    Default Re: Zen Colorbox

    Quote Originally Posted by mc12345678 View Post
    On my "initial" testing, I see what has been done to apply the background image (at least the result of). I was able to at least in part get the desired result when the style tag was applied to the image tag instead of the overall div for the mainProductImage. To do that, I cut the style out of the div tag and pasted it into the image tag and then when I opened the colorbox, at least that information carried over. There may still need to be some massaging of its behaviour when opening with that background, but I was also able to get it to display. Again, I was just breezing through but it seems like a change to how the background image characteristics are applied so that they go to the image of the div will be a step in the right direction. I didn't look at the javascript to apply the background to give much assistance, just know the result...
    I was working with the tpl_footer.php and added the following code:
    <script>
    jQuery(function($) {
    $("#productMainImage").click(function(){
    var sty=$( "#productMainImage" ).attr( "style" );
    $("#cboxContent").attr("style", sty);
    })
    })
    </script>

    This seems to do the trick
    Any thoughts
    Thanx
    Mike

  7. #7
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default Re: Zen Colorbox

    Quote Originally Posted by mikebr View Post
    I was working with the tpl_footer.php and added the following code:
    <script>
    jQuery(function($) {
    $("#productMainImage").click(function(){
    var sty=$( "#productMainImage" ).attr( "style" );
    $("#cboxContent").attr("style", sty);
    })
    })
    </script>

    This seems to do the trick
    Any thoughts
    Thanx
    Mike
    So I think the colorbox code adds some amount of style information to the displayed image. I would think that the background image would be added to that information rather than replace it. The other thing was that I was thinking that perhaps the executed code loaded from the footer might be better suited in a colorbox "event" loader. At least then it may stay together with the colorbox files and logic. If not done that way, would still suggest "testing" for the existence of #cboxContent to be sure that at some future point this additional code wouldn't cause a javascript error that could affect site operation.

    Just my two cents worth.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. v155 Attribute image swapped for main image using Colorbox
    By soxophoneplayer in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 2 Jun 2016, 02:34 PM
  2. Trying to fix inline code with colorbox...
    By toomanyknots in forum General Questions
    Replies: 2
    Last Post: 5 Apr 2015, 04:26 PM
  3. IH and Zen Colorbox vs Zen Lightbox?
    By Feznizzle in forum All Other Contributions/Addons
    Replies: 7
    Last Post: 28 Jan 2015, 02:29 AM
  4. Lightbox OR Colorbox
    By Rizla in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 2 May 2014, 11:55 AM
  5. LightBox, SlimBox, ColorBox, which one is better?
    By waterbender in forum General Questions
    Replies: 0
    Last Post: 13 Aug 2013, 07:32 PM

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