- This topic has 5 replies, 2 voices, and was last updated 3 years, 8 months ago by
Leo.
-
AuthorPosts
-
January 31, 2022 at 9:16 am #2100322
Brent
So, I finally found a review system I like called Fera.ai. But, it doesn’t offer a native plugin, although it does give you the code for your site. Unfortunately, their site is more focused with shopify and Wix at the moment. They have an outdated Woocommerce plugin from 2019 on their Github.
Anyhow, they give you the footer code which works just fine creating a hook element for all pages.
Second, they give you the code in which I created a hook element to display on all product pages.
The codes we have tried are, “div data-fera-container=”460708″ data-product_id=”<? echo $product->get_id(); ?>”>”
and, “div data-fera-container=”460708″ data-product_id=”<? echo wc_get_product( $product_id ); ?>”>”
The issue is the Product ID needs to change dynamically for each unique Product ID or a PHP variable.
I have 35 products, as of right now and the only way I am able to get this to work is if I get the Product ID for each of my 35 products and create a hook element for each individually.
Is there a way to create one hook element that will dynamically pull each product ID? Creating 35 hooks seems rather tedious.
This is a copy and paste from Fera.ai and customer support email below.
right now if you see html code it shows code not product id, it should dynamically use product number.
For example for product
https://genx.bio/product/sr9009
it should be, “div data-fera-container=”460708″ data-product_id=”3322″></div”
January 31, 2022 at 10:56 am #2100428Leo
StaffCustomer SupportHi there,
This would be a question for the WooCommerce’ support team.
I googled “Retrieve Product ID woocommerce” and saw some discussions that might be worth a read as well:
Here are a few of them:
https://stackoverflow.com/questions/27385920/woocommerce-get-current-product-id
https://stackoverflow.com/questions/57040637/get-current-woocommerce-product-id-in-functions-php-file
https://stackoverflow.com/questions/35165402/woocommerce-get-product-values-by-idHope this helps you to get started!
January 31, 2022 at 11:10 am #2100451Brent
Hi Leo,
I did reach out to the Woocommerce support team over the weekend and they gave me a link and that was it.
https://www.businessbloomer.com/woocommerce-easily-get-product-info-title-sku-desc-product-object/
It has tons of codes and I’m not sure if there is one to retrieve product ID dynamically.
I’m not a programmer, so even of there was one that would work with link I provided, I’m not sure what the correct syntax would be. With FERA.AI we’ve tried:
“div data-fera-container=”460708″ data-product_id=”<? echo wc_get_product( $product_id ); ?>”></div”
and
“div data-fera-container=”460708″ data-product_id=”<? echo $product->get_id(); ?>”></div”But, neither pull up the product ID dynamically.
If there is a code for it’s here https://www.businessbloomer.com/woocommerce-easily-get-product-info-title-sku-desc-product-object/
I have no idea which one though.
Thank you.
January 31, 2022 at 11:13 am #2100459Leo
StaffCustomer SupportUnfortunately we are not able to provide this kind of custom solution for WooCommerce plugin in the forum here:
https://generatepress.com/what-support-includes/I would recommend following up with WooCommerce support team if you aren’t sure what the next step is.
Or it might be better to find a review system that’s compatible with WooCommerce by default.
Thanks for your understanding 🙂
January 31, 2022 at 11:21 am #2100469Brent
Okay, I understand.
I’ve tried every Review plugin out there, and Fera.ai is superior in every way (They use ruby). It’s too bad they abandoned woocomerce in 2019. Their github page has a woo plugin from 2019.
January 31, 2022 at 2:19 pm #2100613Leo
StaffCustomer SupportThanks for your understadning!
-
AuthorPosts
- You must be logged in to reply to this topic.