Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reorganize starting Woocommerce templates #42532

Closed
albarin opened this issue Nov 9, 2022 · 1 comment · May be fixed by #44778
Closed

Reorganize starting Woocommerce templates #42532

albarin opened this issue Nov 9, 2022 · 1 comment · May be fixed by #44778
Labels
focus: template Issue related to WooCommerce templates. team: Kirigami & Origami type: epic Container issue with high-level description of work that will be done in sprint.

Comments

@albarin
Copy link
Contributor

albarin commented Nov 9, 2022

Discussed in https://github.com/woocommerce/woocommerce-blocks/discussions/6919

Originally posted by Aljullu August 18, 2022
Currently, WooCommerce allows users to modify these templates:

  • Single Product
  • Product Catalog
  • Products by Category
  • Products by Tag
  • Product Search Results

imatge

That allows a good level of customizability for store owners and block theme authors. However, it has some drawbacks:

  • There is no way to modify the Product Catalog, Products by Category and Products by Tag templates at once.
  • There is no way to customize the Products by Attribute template.
  • Having five (or more) templates in the templates list by default can be overwhelming. Specially as more might be added in the future.
  • WooCommerce is not making use of the Add New button in the templates list page, which might be a better location for some templates that hadn't been customized by the user/theme and inherit from another template.
Screenshot of the Add New button in Gutenberg

Based on that, we are planning to make several changes to the way WooCommerce templates work in block themes:

  • We will create a Products by Attribute template so it can be customized (currently, it always defaults to the Product Catalog template).
  • We will make the Products by Category, Products by Tag and Products by Attribute templates to “fallback” to the Product Catalog one. That means that if the theme neither the user have customized one of those three templates, it will look like the Product Catalog one. For reference, that’s issue #5520.
  • We will hide those three templates from the list of templates by default. Instead, they will appear under the Add New button menu. However, if the theme or the user has customized one of those three templates, it will appear in the templates list. The tl;dr is that they will behave as the Category and Tag templates from WP core.
  • Product Search Results will remain as-is, meaning it will always be shown in the list of templates (no matter whether it has been customized or not) and will never fallback to another template. Same for Single Product template.
  • Internally, we discussed whether a Product Taxonomy template would be necessary. For now, we aren't planning to create it, but if you know of a good use case for why it should be added, please let us know!

We don't have an ETA for this, but we are sharing this plan with the community to gather early feedback in case you see issues in this approach or have any suggestions. You can also leave a 👍 to mark that you read this and you agree with the proposed changes.

PD: While not mentioned, there are some other changes to templates coming in future versions of WC and WP. An example is setting custom templates for specific products or categories, which is already possible in recent versions of Gutenberg.

@albarin albarin added the focus: template Issue related to WooCommerce templates. label Nov 9, 2022
@albarin albarin changed the title Reorganize Starting Woocommerce templates Reorganize starting Woocommerce templates Nov 9, 2022
@albarin albarin added the type: epic Container issue with high-level description of work that will be done in sprint. label Nov 9, 2022
@ObliviousHarmony ObliviousHarmony transferred this issue from woocommerce/woocommerce-blocks Dec 11, 2023
@Aljullu Aljullu assigned Aljullu and unassigned albarin and thealexandrelara Feb 15, 2024
@WunderBart WunderBart linked a pull request Feb 27, 2024 that will close this issue
15 tasks
@Aljullu
Copy link
Contributor

Aljullu commented Apr 29, 2024

I'm going to mark this as duplicate, as everything that is defined in this issue has either been fixed already or it's detailed in #42531. This way we have a single source of truth there.

@Aljullu Aljullu closed this as not planned Won't fix, can't repro, duplicate, stale Apr 29, 2024
@Aljullu Aljullu removed their assignment Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus: template Issue related to WooCommerce templates. team: Kirigami & Origami type: epic Container issue with high-level description of work that will be done in sprint.
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

4 participants