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
Add default Single Product HTML template #8515
Merged
gigitux
merged 18 commits into
trunk
from
feat/add-default-single-product-html-template
Mar 22, 2023
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
d4f417c
Add default Single Product HTML template
thealexandrelara a5d8124
Fix style issues when adding blocks inside group/stack/columns blocks
thealexandrelara 6720f96
Merge branch 'trunk' into feat/add-default-single-product-html-template
thealexandrelara 4690ee5
Merge branch 'trunk' into feat/add-default-single-product-html-template
thealexandrelara 9f167f5
Add Related Products to the default single product template HTML file
thealexandrelara cfd96f4
Merge branch 'trunk' into feat/add-default-single-product-html-template
thealexandrelara 35ff36f
Remove !important statement from Product Image Gallery block css
thealexandrelara 76b112c
Change width of Product Image Gallery block to initial instead of unset
thealexandrelara b8e7bd0
Merge branch 'trunk' of https://github.com/woocommerce/woocommerce-bl…
gigitux 66afe60
Merge branch 'trunk' of https://github.com/woocommerce/woocommerce-bl…
gigitux ae3d39f
Wrap up default single product html template (#8632)
gigitux 4029fcf
Fix images width in the Single Product page
thealexandrelara ebda787
Remove the !important attribute from the Product Image Gallery block
thealexandrelara dc8e855
fix sku block
gigitux 960194a
Merge branch 'feat/add-default-single-product-html-template' of https…
gigitux 394ef49
improve layout
gigitux 1822c58
fix header and footer template parts declaration
gigitux caf3ada
Merge branch 'trunk' into feat/add-default-single-product-html-template
gigitux File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
8 changes: 4 additions & 4 deletions
8
assets/js/atomic/blocks/product-elements/product-image-gallery/style.scss
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,13 +1,13 @@ | ||
.woocommerce .wp-block-woocommerce-product-image-gallery { | ||
position: relative; | ||
|
||
div.images { | ||
width: unset !important; | ||
} | ||
|
||
span.onsale { | ||
right: unset; | ||
z-index: 1; | ||
left: -1rem; | ||
} | ||
} | ||
|
||
.woocommerce .wp-block-woocommerce-product-image-gallery .woocommerce-product-gallery.images { | ||
width: initial; | ||
} |
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,64 @@ | ||
<!-- wp:template-part {"slug":"header"} /--> | ||
<!-- wp:group {"layout":{"inherit":true}} --> | ||
<div class="wp-block-group"> | ||
<!-- wp:paragraph --> | ||
<p>Single product blockified</p> | ||
<!-- /wp:paragraph --></div> | ||
|
||
<!-- wp:group {"layout":{"inherit":true,"type":"constrained"}} --> | ||
<div class="wp-block-group"><!-- wp:woocommerce/breadcrumbs /--> | ||
|
||
<!-- wp:columns {"align":"wide"} --> | ||
<div class="wp-block-columns alignwide"><!-- wp:column --> | ||
<div class="wp-block-column"><!-- wp:woocommerce/product-image-gallery /--></div> | ||
<!-- /wp:column --> | ||
|
||
<!-- wp:column --> | ||
<div class="wp-block-column"> | ||
<!-- wp:post-title {"__woocommerceNamespace":"woocommerce/product-query/product-title"} /--> | ||
|
||
<!-- wp:woocommerce/product-price {"isDescendentOfSingleProductTemplate":true, "fontSize":"large"} /--> | ||
|
||
<!-- wp:post-excerpt {"__woocommerceNamespace":"woocommerce/product-query/product-summary"} /--> | ||
|
||
<!-- wp:woocommerce/add-to-cart-form /--> | ||
|
||
<!-- wp:woocommerce/product-meta --> | ||
<div class="wp-block-woocommerce-product-meta"> | ||
<!-- wp:group {"layout":{"type":"flex","flexWrap":"nowrap"}} --> | ||
<div class="wp-block-group"> | ||
<!-- wp:woocommerce/product-sku {"isDescendentOfSingleProductTemplate":true} /--> | ||
|
||
<!-- wp:post-terms {"term":"product_cat","prefix":"Category: "} /--> | ||
|
||
<!-- wp:post-terms {"term":"product_tag","prefix":"Tags: "} /--> | ||
</div> | ||
<!-- /wp:group --> | ||
</div> | ||
<!-- /wp:woocommerce/product-meta --> | ||
</div> | ||
<!-- /wp:column --> | ||
</div> | ||
<!-- /wp:columns --> | ||
|
||
<!-- wp:woocommerce/product-details {"align":"wide"} /--> | ||
|
||
<!-- wp:woocommerce/related-products {"align":"wide"} --> | ||
<div class="wp-block-woocommerce-related-products alignwide"> | ||
<!-- wp:query {"queryId":0,"query":{"perPage":5,"pages":0,"offset":0,"postType":"product","order":"asc","orderBy":"title","author":"","search":"","exclude":[],"sticky":"","inherit":false},"displayLayout":{"type":"flex","columns":5},"namespace":"woocommerce/related-products","lock":{"remove":true,"move":true}} --> | ||
<div class="wp-block-query"><!-- wp:heading --> | ||
<h2 class="wp-block-heading">Related products</h2> | ||
<!-- /wp:heading --> | ||
|
||
<!-- 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 --> | ||
</div> | ||
<!-- /wp:query --> | ||
</div> | ||
<!-- /wp:woocommerce/related-products --> | ||
</div> | ||
<!-- /wp:group --> | ||
<!-- wp:template-part {"slug":"footer"} /--> | ||
|
||
<!-- wp:template-part {"slug":"footer"} /--> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
How come we're removing the
attributes
property here and adding it inproduct-image-gallery/block.json
below?I couldn't find the specific commit that made this change. Everything still tests as described, I'm really just curious! 🙂
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.
I updated this PR multiple times these weeks, so I'm unsure who and when the attributes key was removed.
I agree with you, we should remove the empty attributes on the product image gallery block.json. I created a PR #8825
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.
Perfect, thank you. I'll put that on my list to review today!