Make Products by category/tag/attribute
fallback to the Product catalog
template
#7712
Conversation
The release ZIP for this PR is accessible via:
|
TypeScript Errors ReportFiles with errors: 428 🎉 🎉 This PR does not introduce new TS errors. |
Size Change: +15 B (0%) Total Size: 971 kB
ℹ️ View Unchanged
|
875ff18
to
ab938be
Compare
ab938be
to
04be103
Compare
Script Dependencies ReportThere is no changed script dependency between this branch and trunk. This comment was automatically generated by the |
Products by category/tag/attribute
fallback to the Product catalog
template
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is testing great, thanks so much for writing those testing steps with so much detail!
I left a couple of questions inline in the code, but besides that, LGTM!
It was checking a single product for the customization, but it should check the /shop page
@Aljullu I've made some more changes, in case you want to review:
There are a few tests failing right now because of an issue that is being fixed here: WordPress/gutenberg#45992, once that is merged and we update the version of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for investigating the failing tests, @albarin! I did a quick round of testing and everything seems to be working well, and code changes look good.
There are a few tests failing right now because of an issue that is being fixed here: WordPress/gutenberg#45992, once that is merged and we update the version of the
e2e-test-utils
they should pass.
Do you think we should disable those test until we can update e2e-test-utils
and get them pass?
This PR aims to make the
Products by Category
,Products by Tag
, andProducts by Attribute
templates fall back to theProduct Catalog
one.That means that if neither the theme nor the user has customized one of those three templates, it will look like the Product Catalog one.
Fixes #7648
User Facing Testing
Pre-requisites for testing
Enabled Archives
and some products associated with it.Product by category/tag/attribute
fall back toProduct Catalog
if not customizedhttps://store.local/wp-admin/site-editor.php?postType=wp_template
.Product Catalog
template, add some customization and save./shop
and make sure you see the customization you just did.product-category/clothing/
,/product-tag/music
,color/red
, depending on your store configuration)./Product Catalog
template, meaning you see exactly the same customization you did on theProduct Catalog
.Product by category/tag/attribute
customizations take priority overProduct Catalog
oneshttps://store.local/wp-admin/site-editor.php?postType=wp_template
.Product by Attribute
template, add some customization and save.Product Catalog
template, add some customization and save.Product by Attribute
./shop
, to a category, and a tag page and check that you see the customization fromProduct Catalog
.Product by Tag
andProduct by Category
templates.Product by category/tag/attribute
fall back toProduct Catalog
from the themehttps://store.local/wp-admin/site-editor.php?postType=wp_template
.archive-product.html
to yourtemplates
folder of your theme with some identifiable changes./shop
and make sure you see the template you just added.product-category/clothing/
,/product-tag/music
,color/red
, depending on your store configuration).Product Catalog
template from the theme.Product by category/tag/attribute
from theme take priority overProduct Catalog
https://store.local/wp-admin/site-editor.php?postType=wp_template
.archive-product.html
to yourtemplates
folder of your theme with some identifiable changes.taxonomy-product_attribute.html
to yourtemplates
folder of your theme with some identifiable changes.taxonomy-product_attribute.html
template./shop
, to a category, and a tag page and check that they are using thearchive-product.html
.Product by Tag
(filetaxonomy-product_tag.html
) andProduct by Category
(filetaxonomy-product_cat.html
).Test any other combination of file templates and customized templates in the db you can think of.
In general, the priority should be:
Taxonomy
templateTaxonomy
template from the themeProduct Catalog
templateProduct Catalog
template from the themeProduct Catalog
template from blocksI made this table 👇 with all the possible combinations of theme and customized templates and the result template I think they should render (could be useful to make some more testing cases):
WooCommerce Visibility
Changelog