• Resolved stffn313

    (@stffn313)


    Hello!

    I really like the functionality of the plugin and I styled it how I wanted it to look. BUt I want something special. In the catalogue mode I want to display the usual thumbnail image and alongside to it in a small gallery all other images that are assigned to this product. I was able to do this wis jQuery Ajax but since the jquery file only functions when the document is already loaded, it takes a while for the other images to load. I found the place in the php files of the plugin where the layouts for the catalogue styles get created (shortcodes.php, line 830++). I was also able to create the necessary div containers for my self-created mini-thumbnail-gallery, but I don’t know how to get the images to load in it. So my question is, whith what code can I get the additional images of a product? Hopefully this makes any sense and someone could help me out.

    Thanks a lot in advance!
    – Steffen

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi Steffen,

    Are you talking about the additional images that you uploaded in our plugin? Or were these images uploaded a different way?

    That functionality, unfortunately, just doesn’t currently exist in our plugin. I can see that you’re on the right track for trying to implement it, but, as it isn’t something that we’ve ever tried to implement on our end, we wouldn’t really be able to offer any pointers, especially as the risk that it might mess up other functionality is high.

    Thread Starter stffn313

    (@stffn313)

    Hello and sorry for the late response.

    First of all, thanks for your answer. In case that anyone might be interested here is the solution I came up with:

    In the Shortcode.php file where the layout gets created I created another div container. Inside this container I used the wordpress shortcode to create a gallery from a post-id with all images that are attached to this post:

    $ProductString .= “<div class=’thumb-gallery-scroll-container’>” . do_shortcode(‘[gallery id="' . url_to_postid($ItemLink) . '" link="none" columns="0"]‘) . “</div>”;

    This gallery can be modified with a filter in the function.php file. That way I could create everything as I needed it to be. With all needed classes and IDs.

    Cheers!

    Hello,

    Thank you for sharing what you did to get this functionality on your site. It might be helpful for our users who are trying to achieve the same functionality. WE just want to advise that changes like this to the plugin code are overwritten if you update the plugin.

    Thread Starter stffn313

    (@stffn313)

    Hello,

    yes thanks for bringing it up. Is there a way to insert a hook, so I can add my script in outside of the plugin? I don’t know a whole lot about hooks but I think it would be great for people like me that want to extend the functionality of your plugin so we don’t have to copy and paste our additional code everytime we update the plugin. I don’t know if this is easy to do or not so I’m just making a suggestion here.

    But besides that. I’m really happy with your latest update. I’ve created all my products in woocommerce and I synced them with UPCP. The only probleme was that I couldn’t sync the attached images. Since they can now be synced as well I tryed to generate all images within the Shortcode.php file. Which turned out to be pretty easy.

    We have all image URLs in the $Item_Images variable. With a foreach loop we can access all available URLs and assign them to the src attribute of an img tag:

    foreach($Item_Images as $Image) {
    $ProductString .= “Item_Image_URL . “‘>”;
    }

    Again, thanks for your plugin and your support. And if there is any way to insert a hook then that would be awesome. Keep up the good work!

    Hi Steffen,

    Thanks for the great review!

    Unfortunately, in regards to adding a hook, there’s currently no way to do this in our plugin.

    Thread Starter stffn313

    (@stffn313)

    Hey,

    you’re very welcome! And yeah I understand that. Just one other thing I noticed. When I create a product in woocommerce and I save it, the gallery pictures get synced with UPCP but they also get duplicated in the woocommerce product and therefore also in the gallery on the product page.

    duplication

    duplication2

    • This reply was modified 7 years, 8 months ago by stffn313.

    Hi Steffen,

    The two screenshots you sent in your last message didn’t load unfortunately.

    If it’s easier, you can try uploading them to postimg.org, then use the direct links they give with the ‘insert img’ button.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Get all thumbnail images to display in catalogue view’ is closed to new replies.