Skip Navigation

[Resolved] WooCommerce reviews not rendering correctly

This thread is resolved. Here is a description of the problem and solution.

Problem:
I'm using [wpv-woo-reviews] and [wpv-woo-display-tabs] shortcodes to display the product reviews and the products tabs in the single product page.

The problem is that the reviews are not being rendered correctly when I configure WooCommerce views to display the theme product single page.

Solution:
Previously, It was not possible to include [wpv-woo-reviews] and [wpv-woo-display-tabs] shortcode together in the same views or content template.

We introduced new shortcode argument for [wpv-woo-display-tabs]. This is the 'disable_reviews_tab'. When set to 'yes', this will disable reviews inside the tab and that the reviews rating section will be correctly rendered.
Example:

[wpv-woo-display-tabs disable_reviews_tab="yes"]

Please check this answer that contains a complete example: https://toolset.com/forums/topic/woocommerce-reviews-not-rendering-correctly/#post-396320
Relevant Documentation:
https://toolset.com/documentation/views-shortcodes/#wpv-woo-display-tabs

This support ticket is created 8 years ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 10:00 - - - - -
- - - - - - -

Supporter timezone: Africa/Cairo (GMT+02:00)

This topic contains 13 replies, has 3 voices.

Last updated by geophray 7 years, 11 months ago.

Assisted by: Mohammed.

Author
Posts
#391717

I am trying to: Build my own WooCommerce single product template. I want to duplicate what the default WooCommerce theme is, but add a few custom fields to it.

I visited this URL: hidden link

I expected to see: The reviews section as it appears in the default woocommerce product template. (See hidden link )

Instead: My template was broken by the addition of the

[wpv-woo-reviews]

shortcode. It adds a regular wordpress comment box without the rating stars, and adds a white wrapper around the entire product template. (See hidden link )

When I remove the

[wpv-woo-reviews]

shortcode from my template, it restores the rest of the product template to its original state, but without the reviews section. (See hidden link )

For now, I'm just trying to replicate the default product template exactly. Once I have that replicated successfully, I will start adding my other custom product fields to it.

#391972

Dear geophray,

I can not duplicate same problem in my localhost, please check these:
1) You are using the latest version of Toolset plugins, especially the Toolset WooCommerce Views plugin, you can download them here:
https://toolset.com/account/downloads/
2) Deactivate other plugins and switch to wordpress default theme and test again.

#392257

Hi Luo. Thanks for your reply. With Twenty Sixteen theme and only toolset plugins and WooCommerce enabled, it get the same results. The [wpv-woo-reviews] shortcode inserts a comment box instead of the review box with the star rating system. Is that default behavior? If so, the shortcode seems to be inappropriately named.

#392261
2016-04-25_1232.png

I found that modifying my template a little solved the white background issue, but it still inserts the comment section box instead of a woo reviews area.

#392365

Here is a test site for you:
hidden link
user/pass: xgren/111111
As you can see there is a rating field in the "review" section

Using the content template:
hidden link

Could you duplicate same problem in above test site? thanks

#392546

I've replicated it. It is when the [wpv-woo-display-tabs] and [wpv-woo-reviews] shortcodes are in the same template. In some themes, the reviews are inserted as one of the tabs, but in the woo theme I am using they are not. Looks like those two shortcodes conflict with eachother...

#392774

Thanks for the details, I put it into our to-do list, our developers will take care of it.

#392976

Thanks Luo! Should I expect to hear back from you when it is fixed?

#393747

Hello,

I’m Mohammed Toolset support second tier and I have been escalated to this thread. I’ll give my best to help you to achieve your needs through Toolset components.

We are working on the issue.

We may need the theme you are using.So, please compress,upload it to an uploading platform and share the download link with me in the next private reply.

Thanks.

#395002

Hi Geophray,

This is an update that the issue is reported to our development team.

They will work on it and I will get back to you once I get any updates.

Thanks.

#395632

Hi Geophray,

This is an update that the issue is is fixed in the next WooCommerce Views release and the following is the developers response: The current version of WooCommerce Views does not handle this functionality correctly. In coming version 2.6.1, we introduced new shortcode argument for [wpv-woo-display-tabs]. This is the 'disable_reviews_tab'. When set to 'yes', this will disable reviews inside the tab and that the reviews rating section will be correctly rendered. Example:

 [wpv-woo-display-tabs disable_reviews_tab="yes"]

So, please keep following this thread and I will notify you once we launch the new release.

Thanks.

#395890

Awesome. Thanks Mohammed. I'll look forward to the release of the next version.

#396320

Hi Geophray,

Thank you for your patience.

This is an update that WooCommerce Views 2.6.1 is released, So, please update the plugin and test the issue.

This is an example that shows how this should work:

[wpv-add-to-cart-message]
[wpv-woo-product-image size="shop_single" output="" gallery_on_listings="no"]
<div class="summary entry-summary">
    <h1 itemprop="name" class="product_title entry-title">[wpv-post-title]-Toolset Powered</h1>
        <div itemprop="offers" itemscope="" itemtype="<em><u>hidden link</u></em>">
            <p class="price"><span class="amount">[wpv-woo-product-price]</span></p>
            <meta itemprop="price" content='[types field="views_woo_price" output="raw"][/types]'>
            <meta itemprop="priceCurrency" content="USD">
          [wpv-conditional if="( woo_product_in_stock() eq '1' )"]
              <link itemprop="availability" href="<em><u>hidden link</u></em>"> 
          [/wpv-conditional]    
        </div>  
        [wpv-woo-buy-options add_to_cart_text=""]
          [wpv-woo-display-tabs disable_reviews_tab="yes"]
          [wpv-woo-product-meta]            
</div>
    [wpv-woo-reviews]  

Please check our documentation update regarding this as well: https://toolset.com/documentation/views-shortcodes/#wpv-woo-display-tabs

Thanks.

#396536

This works beautifully now. Thanks Mohammed!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.