Roots Discourse

Sage 10 - Override default woocommerce templates

Hi,

I have problems overriding the default woocommerce templates in sage 10.

I’ve tried placing it directly into theme folder and also in resources/views/woocommerce, but none of the are working.

Do you have any experience with this problem?

Thank you

Please use the search… WooCommerce support for Sage 10

Yes I did, but is there a way just to paste woocommerce .php files somewhere in theme directory that overrides the default woocomerce template files?

I don’t want to use .blade.php files

Ah I see. So or so you need to use one of the packages added, so that WooCommerce looks for the template overwrites in the correct directories. So install one of them and you should be able to use regular .php files as well (as far as I remember).

Can you link me the package please?

See my first reply: WooCommerce support for Sage 10

I tried his solution but it’s not working for me. As soon as I add that to my theme I get blank page.

I’ve had some luck using this pull request. .

But I am still using blade in my files though. I created a woocomm folder and am overriding templates.

I actually moved it into my own personal repo but I am not supporting updates as of yet.

1 Like

Thank you so much, works perfect :slight_smile:

1 Like

NO worries! It was ^ ptrckvzn this person who found the solution. I only split it off to a repo making it easier to add to projects.

Hi, I have been using the https://github.com/ptrckvzn/sage-woocommerce repo for Sage 10 and I have been experiencing an issue where overriding the content-product.php file, causes duplicate products to be shown. Basically it loads both the original template and the overridden template. Does your version solve this issue?

Hi,

This is the same solution/repo I am currently using. Like I said, I only broke it out into a repo and made it simple to install. I haven’t had any duplicates but I am not touching content-product.php. Below is an image of the WooComm template files I am currently successfully overriding.

Screen Shot 2020-09-27 at 4.04.27 PM