Digital experiences for all disciplines
New Landing › How can we help? › Atelier › Reviews plugin (Yotpo) format
New Landing › How can we help? › Atelier › Reviews plugin (Yotpo) format
- This topic has 19 replies, 5 voices, and was last updated 9 years by Mohammad – SUPPORT.
-
Posted in: Atelier
-
September 3, 2015 at 7:25 pm #210247
Hi,
I’m looking to use the yotpo plugin for woocommerce product reviews, but it appears that Atelier is showing the review number and rating under the short description and not near the title/price.
I’ve tried another woocommerce theme and Twenty-ten and these both show the review stars in the correct area. Images attached.
Many thanks,
Attachments:
You must be logged in to view attached files.September 4, 2015 at 6:07 am #210323Hi,
Do you want to display review star just below of title? Please provide me specific page url with issue.
Thanks
MohammadSeptember 4, 2015 at 9:44 am #210373Hi Mohammad,
Yes, ideally I’ll like it displayed next to the price as standard.
I’m afraid I don’t have an online page as this is a local development.
September 7, 2015 at 9:10 am #210783Hi,
You would need to modify the WooCommerce template file. This is located
/atelier/woocommerce/content-single-product.php
.You would need to move line 121to line 151 above the the product title which is on line 113.
Thanks,
David.September 7, 2015 at 10:05 pm #211088Hi David,
Many thanks for the reply. Unfortunately moving that snippet of code only had an effect on where the woocommerce ratings show. When removing the code, the woo reviews rightfully disappear, but the yotpo reviews line shows up in the same area.
I’m thinking a required woocommerce hook may be missing from this theme as the yotpo reviews appear in the correct areas (as shown in the screenshots) with other themes?
Many thanks
September 9, 2015 at 11:21 am #211629Hi,
You would need to contact the plugin developer to check how the ratings are hooked into the theme with an action.
I am assuming they are using this
do_action( 'woocommerce_after_shop_loop_item_title' );
but we also have that included and there are no referencing where we remove the action.Thanks,
David.October 1, 2015 at 10:06 pm #217944Thanks for the reply David. I’ve looked further into this and it appears they’re hooking into
woocommerce_single_product_summary
A snippet of code from their plugin shows:
function wc_yotpo_front_end_init() { $settings = get_option('yotpo_settings',wc_yotpo_get_degault_settings()); add_action('woocommerce_thankyou', 'wc_yotpo_conversion_track'); if(is_product()) { $widget_location = $settings['widget_location']; if($settings['disable_native_review_system']) { add_filter( 'comments_open', 'wc_yotpo_remove_native_review_system', null, 2); } if($widget_location == 'footer') { add_action('woocommerce_after_single_product', 'wc_yotpo_show_widget', 10); } elseif($widget_location == 'tab') { add_action('woocommerce_product_tabs', 'wc_yotpo_show_widget_in_tab'); } <strong>if($settings['bottom_line_enabled_product']) { add_action('woocommerce_single_product_summary', 'wc_yotpo_show_buttomline',7); wp_enqueue_style('yotpoSideBootomLineStylesheet', plugins_url('assets/css/bottom-line.css', __FILE__)); } </strong> } elseif ($settings['bottom_line_enabled_category']) { add_action('woocommerce_after_shop_loop_item_title', 'wc_yotpo_show_buttomline',7); wp_enqueue_style('yotpoSideBootomLineStylesheet', plugins_url('assets/css/bottom-line.css', __FILE__)); } }
I’m wondering if the recent issue of product hooks as seen in this thread is causing the priority argument of position 7 to be ignored and thus placed after the description?
Many thanks,
October 2, 2015 at 12:41 pm #218108Yes, it seems to be the same situation.
For me the solution will be to place a new hook under the price directly in content-single-product.phpThen it will be possible to hook the wc_yotpo_show_buttomline function to this new hook.
Try to add this code to the functions.php in your child theme
remove_action('woocommerce_single_product_summary', 'wc_yotpo_show_buttomline',7); add_action('custom_hook_single_product_summary', 'wc_yotpo_show_buttomline',7);
And inside the content-single-product.php add this line below the price
do_action('custom_hook_single_product_summary');
You can try to place it right above the current do_action of the product summary.
Give it a try.
-Rui
October 2, 2015 at 8:59 pm #218217Thanks for the reply Rui.
Unfortunately remove_action won’t be able to remove the existing woocommerce hook but the custom hook shows up fine. I’ll wait for the updated fix as my site is currently only on a local development.
Many thanks for the help
October 5, 2015 at 11:17 am #218383No problem. Glad I could help.
-RuiOctober 30, 2015 at 5:43 pm #224659Hi Rui,
Just to give an update on this issue. It looks like todays update was not v1.80 and doesn’t include the aforementioned fix.
http://www.swiftideas.com/forums/topic/latest-swift-framework-update/#post-222892
http://www.swiftideas.com/forums/topic/latest-swift-framework-update/#post-222912Any timescale on when this will be fixed?
Many thanks.
October 30, 2015 at 5:56 pm #224664Hi,
Just read the entire topic and it seems to be a specific change because of the plugin you are using in your site.
Not sure if the theme can be updated with this change, if not you have to apply the change in the child theme to avoid update issues.
Let’s wait for the reply of the development team.
-Rui
October 30, 2015 at 10:10 pm #224719Thanks Rui. Unfortunately this is a theme issue as the ability to remove/reorder a WordPress hook should be possible.
October 31, 2015 at 2:45 pm #224767Hi @tonn
For v1.8 we will hopefully be reverting to using the standard title/price hooks for compatibility, so long as we can achieve the display that matches how we currently have the design.
– Ed
November 2, 2015 at 10:50 am #224906Thanks for the reply Ed. Do you have a rough ETA for the 1.8 release?
-
Posted in: Atelier
You must be logged in to reply to this topic.