This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update the archive templates to use Products block (#8308)Co-authored…
…-by: Alba Rincón <[email protected]> * wip: update blockified archive templates * Update product archive title to Shop * Update product search template to blockified version * new default templates, all blocks are Products block inner blocks * revert change to fallack eligible archive templates * remove unneccessary translated strings * only filter the archive title on the shop page * add missing categories header for patterns * remove the term description block on the fly * explain the reason for removing the term description block --------- Co-authored-by: Alba Rincón <[email protected]>
- Loading branch information
1 parent
ad6fc21
commit 05b7838
Showing
9 changed files
with
180 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
/** | ||
* Title: No Products Found | ||
* Slug: woocommerce/no-products-found | ||
* Inserter: no | ||
* Categories: WooCommerce | ||
*/ | ||
?> | ||
<!-- wp:paragraph --> | ||
<p> | ||
<?php echo esc_html_x( 'No products were found matching your selection.', 'Message explaining that there are no products returned from a search', 'woo-gutenberg-products-block' ); ?> | ||
</p> | ||
<!-- /wp:paragraph --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
/** | ||
* Title: Product Search | ||
* Slug: woocommerce/product-search-form | ||
* Inserter: no | ||
* Categories: WooCommerce | ||
*/ | ||
?> | ||
<!-- wp:search {"showLabel":false,"placeholder":"<?php echo esc_attr_x( 'Search products…', 'placeholder for search field', 'woo-gutenberg-products-block' ); ?>","query":{"post_type":"product"}} /--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,41 @@ | ||
<!-- wp:template-part {"slug":"header"} /--> | ||
<!-- wp:group {"layout":{"inherit":true}} --> | ||
|
||
<!-- wp:group {"layout":{"inherit":true,"type":"constrained"}} --> | ||
<div class="wp-block-group"> | ||
<!-- wp:paragraph --> | ||
<p>Archive product blockified</p> | ||
<!-- /wp:paragraph --></div> | ||
<!-- wp:query {"query":{"perPage":9,"pages":0,"offset":0,"postType":"product","order":"asc","orderBy":"title","author":"","search":"","exclude":[],"sticky":"","inherit":true,"__woocommerceAttributes":[],"__woocommerceStockStatus":["instock","outofstock","onbackorder"]},"displayLayout":{"type":"flex","columns":3},"namespace":"woocommerce/product-query","align":"wide"} --> | ||
<div class="wp-block-query alignwide"> | ||
<!-- wp:query-title {"type":"archive","showPrefix":false} /--> | ||
|
||
<!-- wp:term-description /--> | ||
|
||
<!-- wp:woocommerce/store-notices /--> | ||
|
||
<!-- wp:group {"layout":{"type":"flex","flexWrap":"nowrap","justifyContent":"space-between"}} --> | ||
<div class="wp-block-group alignwide"> | ||
<!-- wp:woocommerce/product-results-count /--> | ||
<!-- wp:woocommerce/catalog-sorting /--> | ||
</div> | ||
<!-- /wp:group --> | ||
|
||
<!-- wp:post-template {"__woocommerceNamespace":"woocommerce/product-query/product-template"} --> | ||
<!-- wp:woocommerce/product-image {"isDescendentOfQueryLoop":true} /--> | ||
<!-- wp:post-title {"textAlign":"center","level":3,"fontSize":"medium","__woocommerceNamespace":"woocommerce/product-query/product-title"} /--> | ||
<!-- wp:woocommerce/product-price {"isDescendentOfQueryLoop":true,"textAlign":"center","fontSize":"small","style":{"spacing":{"margin":{"bottom":"1rem"}}}} /--> | ||
<!-- wp:woocommerce/product-button {"isDescendentOfQueryLoop":true,"textAlign":"center","fontSize":"small","style":{"spacing":{"margin":{"bottom":"1rem"}}}} /--> | ||
<!-- /wp:post-template --> | ||
|
||
<!-- wp:query-pagination {"layout":{"type":"flex","justifyContent":"center"}} --> | ||
<!-- wp:query-pagination-previous /--> | ||
<!-- wp:query-pagination-numbers /--> | ||
<!-- wp:query-pagination-next /--> | ||
<!-- /wp:query-pagination --> | ||
|
||
<!-- wp:query-no-results --> | ||
<!-- wp:pattern {"slug":"woocommerce/no-products-found"} /--> | ||
<!-- /wp:query-no-results --> | ||
</div> | ||
<!-- /wp:query --> | ||
</div> | ||
<!-- /wp:group --> | ||
|
||
<!-- wp:template-part {"slug":"footer"} /--> |
40 changes: 36 additions & 4 deletions
40
templates/templates/blockified/product-search-results.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,40 @@ | ||
<!-- wp:template-part {"slug":"header"} /--> | ||
<!-- wp:group {"layout":{"inherit":true}} --> | ||
|
||
<!-- wp:group {"layout":{"inherit":true,"type":"constrained"}} --> | ||
<div class="wp-block-group"> | ||
<!-- wp:paragraph --> | ||
<p>Product search results blockified</p> | ||
<!-- /wp:paragraph --></div> | ||
<!-- wp:query {"query":{"perPage":9,"pages":0,"offset":0,"postType":"product","order":"asc","orderBy":"title","author":"","search":"","exclude":[],"sticky":"","inherit":true,"__woocommerceAttributes":[],"__woocommerceStockStatus":["instock","outofstock","onbackorder"]},"displayLayout":{"type":"flex","columns":3},"namespace":"woocommerce/product-query","align":"wide"} --> | ||
<div class="wp-block-query alignwide"> | ||
<!-- wp:query-title {"type":"search","showPrefix":false} /--> | ||
|
||
<!-- wp:woocommerce/store-notices /--> | ||
|
||
<!-- wp:group {"layout":{"type":"flex","flexWrap":"nowrap","justifyContent":"space-between"}} --> | ||
<div class="wp-block-group alignwide"> | ||
<!-- wp:woocommerce/product-results-count /--> | ||
<!-- wp:woocommerce/catalog-sorting /--> | ||
</div> | ||
<!-- /wp:group --> | ||
|
||
<!-- wp:post-template {"__woocommerceNamespace":"woocommerce/product-query/product-template"} --> | ||
<!-- wp:woocommerce/product-image {"isDescendentOfQueryLoop":true} /--> | ||
<!-- wp:post-title {"textAlign":"center","level":3,"fontSize":"medium","__woocommerceNamespace":"woocommerce/product-query/product-title"} /--> | ||
<!-- wp:woocommerce/product-price {"isDescendentOfQueryLoop":true,"textAlign":"center","fontSize":"small","style":{"spacing":{"margin":{"bottom":"1rem"}}}} /--> | ||
<!-- wp:woocommerce/product-button {"isDescendentOfQueryLoop":true,"textAlign":"center","fontSize":"small","style":{"spacing":{"margin":{"bottom":"1rem"}}}} /--> | ||
<!-- /wp:post-template --> | ||
|
||
<!-- wp:query-pagination {"layout":{"type":"flex","justifyContent":"center"}} --> | ||
<!-- wp:query-pagination-previous /--> | ||
<!-- wp:query-pagination-numbers /--> | ||
<!-- wp:query-pagination-next /--> | ||
<!-- /wp:query-pagination --> | ||
|
||
<!-- wp:query-no-results --> | ||
<!-- wp:pattern {"slug":"woocommerce/no-products-found"} /--> | ||
<!-- wp:pattern {"slug":"woocommerce/product-search-form"} /--> | ||
<!-- /wp:query-no-results --> | ||
</div> | ||
<!-- /wp:query --> | ||
</div> | ||
<!-- /wp:group --> | ||
|
||
<!-- wp:template-part {"slug":"footer"} /--> |