- This topic has 12 replies, 2 voices, and was last updated 4 years, 3 months ago by
David.
-
AuthorPosts
-
January 16, 2019 at 6:26 am #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?
January 16, 2019 at 8:12 am #783750David
StaffCustomer SupportHi 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.
January 16, 2019 at 11:02 am #783919Neil
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.
January 16, 2019 at 2:29 pm #784093David
StaffCustomer SupportGlad to be of help.
February 14, 2019 at 8:03 am #810476Neil
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?
February 14, 2019 at 8:21 am #810495David
StaffCustomer SupportThe 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.
February 14, 2019 at 8:29 am #810508Neil
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.
February 14, 2019 at 8:39 am #810515David
StaffCustomer SupportHow is the pricing table added? The Description field accepts HTML.
February 14, 2019 at 8:41 am #810519Neil
I’ve created a function to pull it from the meta-data on the product. This function builds the HTML table.
February 14, 2019 at 8:43 am #810525David
StaffCustomer SupportSorry can’t see the function you refer to? If its code, then highlight it and use the Code tag buttons.
February 14, 2019 at 8:46 am #810530Neil
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.
February 14, 2019 at 8:48 am #810533Neil
Scratch this. I’m an idiot! I wasn’t pulling the variation price through <facepalm>
Sorry for wasting your time!
February 14, 2019 at 9:04 am #810550David
StaffCustomer SupportNot a problem. Always cool to see what people are doing with GP especially Woo customizations 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.