[Support request] GP Hooks and Woocommerce Products

Home Forums Support [Support request] GP Hooks and Woocommerce Products

Home Forums Support GP Hooks and Woocommerce Products

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #783509
    Neil

    I’m not even sure where to start with this one.

    I have created a custom taxonomy using the Pods plugin and have added an icon field. I have this custom taxonomy applied to my Woocommerce products.

    I would like to show this icon on the product page somewhere near the product name and price.

    I don’t even know if this is the best way to do this but I was looking at the GP Hooks and the different locations where I can insert code. You have a very helpful document that shows all the locations for standard posts etc but not for Woocommerc products.

    Am I going about this in the correct way? How can I add this icon to the products page?

    #783750
    David
    Staff
    Customer Support

    Hi there,

    this guide provides all the Hooks for the Single Product page:

    https://businessbloomer.com/woocommerce-visual-hook-guide-single-product-page/

    You can use the Hooks Element and select the Custom Field Hook to add ones that are not in the list.

    #783919
    Neil

    Perfect, thanks. I obviously didn’t look hard enough!

    I’ll have a play around and come back to you if I have any queries.

    #784093
    David
    Staff
    Customer Support

    Glad to be of help.

    #810476
    Neil

    Hi, a further question on the WC product page hooks. When using product variations, some of the text (variation description for example) changes when different variations are selected from the drop-down. Even if I add a filter to the variation description, I can’t seem to get any additional text to display dependent on the selected variation. There is some JS affecting the text in the DOM so I must be able to piggy-back on this somehow, is this right?

    #810495
    David
    Staff
    Customer Support

    The variation description is automatically displayed below the variation select. Can you share a link to the site so i can see whats not working? You can edit your original topic and use the Site URL field for privacy.

    #810508
    Neil

    Hi, I’ve edited the original post to include the page that I am having issues with. I’m working locally so this is not 100% how it is on my dev machine nut you will hopefully see what I am trying to do.

    I’ve been looking at adding a filter so that when the description changes I can append the updated pricing table to that text.

    #810515
    David
    Staff
    Customer Support

    How is the pricing table added? The Description field accepts HTML.

    #810519
    Neil

    I’ve created a function to pull it from the meta-data on the product. This function builds the HTML table.

    #810525
    David
    Staff
    Customer Support

    Sorry can’t see the function you refer to? If its code, then highlight it and use the Code tag buttons.

    #810530
    Neil

    The code to generate the table works fine. It’s showing on the page I have linked to. The issue is I want to update it based upon the selected product variant as the prices will be different. Of all the hooks I have tried, even add_filter to text which does update on the selection change, the prices don’t seem to update.

    #810533
    Neil

    Scratch this. I’m an idiot! I wasn’t pulling the variation price through <facepalm>

    Sorry for wasting your time!

    #810550
    David
    Staff
    Customer Support

    Not a problem. Always cool to see what people are doing with GP especially Woo customizations 🙂

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.