WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Override template files not working? (12 posts)

  1. kimmi_baby
    Member
    Posted 1 year ago #

    I'm having issues overriding the template files. I have saved the file to themename/woocommerce/woocommerce-template.php and I also tried themename/woocommerce/template/woocommerce-template.php

    Both don't seem to work. I also just tried dumping woocommerce-template.php directly in my template folder and that also doesn't work. I really need the overrides to work or else it will be a big problem.

    Has anyone managed to fix this?

    http://wordpress.org/extend/plugins/woocommerce/

  2. bheadrick
    Member
    Posted 1 year ago #

    the files under the template folder go in your woocommerce folder

  3. kimmi_baby
    Member
    Posted 1 year ago #

    What do you mean? Doesn't that mean all of my template files will be overridden with the next woocommerce update?

  4. kimmi_baby
    Member
    Posted 1 year ago #

    Does that mean I'm supposed to put all my template files in the official woocommerce folder?

  5. rhonz10
    Member
    Posted 1 year ago #

    this is what Bryan is talking about.

    Copy the folder plugins/woocommerce/templates to themes/your_theme_folder/ and rename it as woocommerce.

    The folder structure should be like this:

    your_theme_folder
    ├─ woocommerce
    │ ├─ woocommerce_template_files.php
    ├─ your_theme_files.php

    this way, any modifications you made to the woocommerce templates will not be overriden by woocommerce plugin updates.

  6. kimmi_baby
    Member
    Posted 1 year ago #

    Thanks for your help, I've tried this but it still doesn't seem to work. I need to edit the woocommerce-template.php file which is outside of the woocommerce/templates folder.

    I've also tried copying the whole woocommerce folder and putting that in my theme folder but it still doesn't work.

  7. rhonz10
    Member
    Posted 1 year ago #

    have you tried overriding it via your theme's functions.php?

    I did most of my modifications there and not having to hack core woocommerce files..

  8. kimmi_baby
    Member
    Posted 1 year ago #

    That worked!!! Thank you so much!

  9. rhonz10
    Member
    Posted 1 year ago #

    you're welcome!

    BTW, you can set this topic as [RESOLVED]. Thanks!

  10. tarundeology
    Member
    Posted 1 year ago #

    Hello,

    Wait! I still having problem with this overiding.

    Thank you for sharing. I tried to use woocommerce with Ari Theme http://ari.elmastudio.de/. So far I managed to override the single product page, but the shop/catalog is still messy. You can see it here: http://www.wakafproject.com/shop/. If possible, I would like to put the query/all shop item (or whatever it is, :( ) in the default theme container, like the single product here: http://www.wakafproject.com/shop/wakaf-bangunan/ so it will remain responsive. I tried copy and edit loop-shop.php into theme/woocommerce/loop-shop.php but nothing happen.

  11. jdyach
    Member
    Posted 9 months ago #

    How did you override via the theme's functions?

  12. bheadrick
    Member
    Posted 9 months ago #

    there are various action and filter hooks that woo uses - you can sometimes alter the display of things by using those hooks without dealing with the template files. It just depends on what you're trying to change. Not everything has a filter tied to it.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.