• Hello,

    I was wondering if it’s possible to use EasyModal with Woocommerce under the attribute’s name section? It seems that every time I insert the appropriate HTML into that section, it get’s stripped.

    Are there filter actions I can add to my child’s functions.php to allow for this?

    My end goal is to allow the customer when adding a product to click the description, next to the drop-down list, then a modal pops up with more information.

    Thanks!

    https://www.ads-software.com/plugins/easy-modal/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Daniel Iser

    (@danieliser)

    Hey Oxiclean, anything is possible with this plugin and its upgrade Popup Maker.

    I need a bit more info about exactly what you want to accomplish and we can find an easy solution.

    Thread Starter SamWebDev

    (@oxiclean)

    danieliser,

    I’m just wanting to take this in Woocommerce – https://i.imgur.com/yG9Dygf.jpg

    And add a modal link where it says “Material” and “Suit Buttons” and so on. Here’s a picture (https://i.imgur.com/YycoTtN.jpg) and the link to an example of several online shops have (https://www.landsend.com/products/mens-traditional-fit-sail-rigger-pattern-contrast-collar-oxford-shirt/id_276285).

    Any time I add the modal code under Woocommerce’s “Name:” section <a href="https://imgur.com/JeiqfCR">https://imgur.com/JeiqfCR</a>, the modal code is not inserted into the product page.

    From what I can tell, it seems that WordPress strips HTML from taxonomies by default – https://docs.woothemes.com/document/allow-html-in-term-category-tag-descriptions/

    This would be VERY useful for Woocommerce stores. If you need more information, please let me know.

    Also, thank you for taking the time to answer my questions!

    Thread Starter SamWebDev

    (@oxiclean)

    *Any time I add the modal code under Woocommerce’s “Name:” section (https://imgur.com/JeiqfCR) the modal code is not inserted into the product page.

    Hi!

    I’m also using your Easy Modal plugin. So I have a question – How can I make the modal window open when clicking “Add to cart” button? There’s already a lond button class in this woocommerce button+some classes of the theme I’m using. So I don’t know how to integrate it.

    Plugin Author Daniel Iser

    (@danieliser)

    @winternight, @oxiclean – You may want to change over to the new Popup Maker ( Easy Modal v3). It offers custom selectors so you can target buttons using pure CSS selectors like #widget-234 .woo-add-to-cart etc.

    Thread Starter SamWebDev

    (@oxiclean)

    dannieliser,

    This is nothing close to the answer I was looking for, nor does it reflect my question.

    For anyone else reading – I just used Woocommerce Product Add-ons, and it allows me to add html next to the variation descriptions.

    For some odd reason, it doesn’t work well with Easy Modal, even with version 3. So, I had to use a different plugin.

    Oh well.

    Plugin Author Daniel Iser

    (@danieliser)

    @oxiclean – Its not that it doesn’t work well its that its not meant for the use you are trying to use it for.

    For example it sounds like where you are trying to add html classes is actually a text string and won’t be rendered as HTML but rather as text.

    Thus you can use custom selectors, this mean you don’t have to add anything, no class or html needed.

    Instead you use jQuery/CSS selectors. This way you can target any element on the page, whether you can modify its HTML & Class or not.

    Example: If your woocommerce outputs html like this for the ? icon.

    <div class="woo-product">
    ...
    <p class="more-info"><i class="p-circle"></i> Make It Personal <i class="question-mark"></i></p>
    ...
    </div>

    Then for your popup you would use something like .woo-product p.more-info i.question-mark. Or in english the i tag with class question mark, which resides inside a p tag with more-info class, which resides in the container with class woo-product.

    The alternative and how we did it for Easy Modal product pages was like this.

    Instead of creating a modal using the editor, you create them in templates using the [modal] or [popup] shortcode.

    This example shows how we used it in the loop for blog post.

    https://wppopupmaker.com/kb/create-preview-read-popups-posts-inside-loop

    This example of course is for a loop, but essentially does the following without further interaction:

    1. Creates the popups dynamically( on the fly ) for each post.
    2. Assigns each popup a unique id that includes the POST ID.
    3. Adds a class to the Post Title Link matching the ID in the shortcode

    With that code example, now every post title will open a popup with the contents inside rather than going to a new page.

    The same can be done in your case I believe.

    Going this route, means you don’t have to maintain multiple modals, they will be created automatically for all new products. The information inside the modal/popup is maintained via the product page instead of elsewhere.

    As I said before, there are really multiple ways to accomplish it. Anything this plugin can’t accomplish with its basic usage, it can do with templates & JS.

    What you are after can be done without extra maintanance. But it requires using more than the basic functions of the plugin.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Using with Woocommerce Attibutes' Name?’ is closed to new replies.