Skip Navigation

[Resolved] Woocommerce Views – Single Product template override

This support ticket is created 7 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
- 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)

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by Paul 7 years ago.

Assisted by: Nigel.

Author
Posts
#589782

Hello there,

I want to add some custom code to the Woocommerce Views Single Product page. I want to copy this single-product.php file out of the Plugins > Woocommerce Views folder and in to my own child theme so that I can edit it - just like we can do with the standard Woocommerce page.

However, I have tried to do this but its still referencing the template in the Plugins folder and not my new one in my child theme.

Can you help? What's the directory hierarchy needed?

Thanks

#589850

Nigel
Supporter

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

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

Hi Paul

Currently there is no way to customise our single-product.php template from plugins/woocommerce-views/template/ without the changes being lost on plugin updates.

We have an internal development ticket about handling themes which have custom WC product templates, and I have added the details of your request to that ticket so that we can incorporate the same functionality as offered by WC itself, i.e. copying the template to your theme directory.

In the meantime you will need to be careful whenever you update WooCommerce Views that you will need to copy back your customised template.

Otherwise, depending on the customisations you are aiming for, you may be able to use the hooks in the template to include your changes.

#589873

Hello there,

Thanks for your response and the hope that this pretty fundamental ability maybe included in a future update.

I got round it by creating a Woocommerce folder but using the Types template in there.

Thanks

Paul