• Resolved nwfmate

    (@nwfmate)


    Hi,
    I want to know how to edit the cart page.
    I have read that there should be cart.php when you use storefront theme,
    but I can’t find that file. With which file can I edit cart page?

    And also, I have a question regarding front page.
    In the theme files, I found
    *template-homepage.php
    *content-homepage.php
    But I noticed there is no front-page.php.
    So when creating woocommerce with storefront,
    usually you don’t use front-page.php?

    thanks,
    Ken

    • This topic was modified 1 year, 4 months ago by nwfmate.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @nwfmate

    You’re right that in many themes, there’s a cart.php file that allows you to edit the cart page. However, in the Storefront theme, this file does not exist. Instead, the cart page is handled by WooCommerce templates which are located in the WooCommerce plugin folder under /templates/cart/.

    You can override these templates in your theme by copying them from the plugin folder to yourtheme/woocommerce/cart/.

    Remember that you should never edit these files within the core plugin itself, as they are overwritten during the upgrade process, and any customizations will be lost.

    Further information on WooCommerce template overriding can be found here: https://woocommerce.com/document/template-structure/

    As for your second question about the front page, the Storefront theme uses template-homepage.php and content-homepage.php for the homepage layout. You’re correct that the theme does not include a front-page.php file. In WordPress, front-page.php is often used to designate a static front page, but it’s not mandatory, and many themes, including Storefront, use other methods for the homepage layout.

    To learn further and to use the Storefront theme, please follow our detailed guide here: https://woocommerce.com/document/installation-configuration/

    I hope this information helps! If you have any other questions, feel free to ask.

    Thanks!

    Thread Starter nwfmate

    (@nwfmate)

    Hi,
    Thanks for the update!
    I’ve noted I need to use files at /templates/cart/.
    I won’t edit core files.

    And also I understood the reason why there’s no front-page.php.
    I will edit template-homepage.php and content-homepage.php.

    Thanks very much!

    Ken

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘how to edit cart page’ is closed to new replies.