Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • 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 9 years, 2 months ago by stffn313.
    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!

    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!

Viewing 3 replies - 1 through 3 (of 3 total)