Skip Navigation

[Resolved] The WooCommerce Views plugin is not working as expected with Content Templates

This support ticket is created 6 years, 4 months 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 10 replies, has 2 voices.

Last updated by Monique Bolland 6 years, 4 months ago.

Assisted by: Nigel.

Author
Posts
#948292

I am trying to create a custom WooCommerce single product page using the WooCommerce Views plugin and a Content Template.

I have copied the views single-product template to a /woocommerce sub directory in my theme. I can tell by the html rendered that this template is being used, however the content of this page seems to be the WooCommerce standard output, rather than my allocated Content Template, and I can't figure out why.
All I have put in my Content Template is the title and sku, in a big white box.
What's outputting is the product image and the standard product entry-summary (though hidden on screen).

Link to a page where the issue can be seen:
hidden link

Product Template File selected in Toolset > WooCommerce Views:
NuzestHQ Theme Custom Product Template

Content Template assigned to WC Products (for testing purposes only!):
hidden link

I keep getting the following message when editing the Content Template:
"WooCommerce is currently overriding the template for products and your design will not be used". Clicking on 'switch to the WooCommerce Views template' doesn't appear to do anything.

I tried every option in Toolset > WooCommerce Views.

Can you please have a look and see if you can tell me where I'm going wrong?

#948412

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Monique

That's not the intended way of using WooCommerce Views for product templates, even though that is what you would typically do to customise the WooCommerce product template (see https://toolset.com/documentation/user-guides/getting-started-woocommerce-views/).

Go to Toolset > WooCommerce Views and you have the option to choose which template is used to render products (there are separate settings for the single product and product archive templates).

If you want to use Toolset to design custom templates then you must choose the WooCommerce Views templates.

You could, if it made sense for your project, choose to use the standard WooCommerce template for the shop page, and the custom Views template for your single product pages.

There is no need to copy any files to your theme or WooCommerce.

#951127

Hi,
Sorry I should have emphasised this part of my question:
"I tried every option in Toolset > WooCommerce Views."
I tried the WooCommerce views template first but my Content Template still did not display.
I followed the instructions in this article: https://toolset.com/home/WooCommerce-views/ and the link you sent above.
The issue is that no matter what template I use, it is not displaying the contents of my assigned Content Template.
Are you able to investigate any further?
Thank you for your help so far.

#951215

Sorry we had to swap staging servers for this site. The new URL is :woocommerce-160855-556673.cloudwaysapps.com.
How do I update FTP and admin credentials for you on this thread? Or do I need to open a new one?

#951225

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Monique

I probably don't need the FTP credentials.

Did the username and password change? If not, I have them.

If so I'll set a private reply for you, let me know if I need to.

#951265

Hi Nigel,
Please send me a private message as the password will need to be regenerated.

Thank you,
Monique

#951266

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Here you go.

#951271
#951340

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Monique

I checked Toolset > WooCommerce Views and can see that you have set the WooCommerce Views template as the template for single products (which is what is required if you want your custom Content Template made with Views to be used).

I edited a product ("Clean Lean Bars") and see that it is assigned to use the Content Template "Single Product".

Looking in Toolset > Content Templates I found that template.

When I view the product on the front end it looks how I would expect when using that Content Template.

Now, I see that you also have a template "Woo Single Product" which is assigned to single products.

That is a global assignment which can be overwritten at the level of individual posts.

Although you have "Woo Single Product" assigned to product posts, the first product I looked at (above) is not using that template, it is using the "Single Product" template.

If your intention is that all single products should use the "Woo Single Product" template then you may need to edit that template, use the Change Usage button, de-select it, save, then re-select it, at which point you should be offered the option to apply this template to existing product posts.

I suspect you were using the Single Product template for some time, changed to use the Woo Single Product template, but didn't check the option to assign to existing posts.

#952169

Hi Nigel,

I’m sorry for the confusion here. Before installing WooCommerce I had a CPT called ‘Products’ (slug ‘products’). I will obviously need to change the name of this to avoid confusion with WC ‘Products’ with slug ‘product’.

The Product post you were looking at was not WC Product and yes, those are using their assigned Content Templates exactly as I would expect them to.
There are two products in WooCommerce - ’Test GGS’ and ‘Test CLP’.

The correct setup should be:
WooCommerce product post should use the assigned content template ‘Woo Single Product’.
This Content Template should be displayed on the site using the Toolset WooCommerce Views template.

The issue is that the Woo Single Product Content Template is assigned correctly but is not displaying on the site.

I hope this clarifies the issue and sorry again for the confusion!

#952283

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Screen Shot 2018-07-20 at 13.36.12.png

Hi Monique

When I edited the product "Test CLP" there was no template assigned (see screenshot), and looking in the list of templates at Toolset > Content Templates I couldn't find "Woo Single Product", I guess you deleted it.

So I made a new test template "Toolset WC Product" and I assigned it to the Test CLP product post. I then viewed the product on the front end and confirmed that the template was being used.

I think it would help if you renamed the product post type you registered with Toolset so that it is clear at all times when assigning templates whether you are assigning them to WC products or to your Types product post type.

#953099

Thank you!