Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

page-cart and page-checkout suddenly missing woocommerce/legacy-template #11258

Closed
strarsis opened this issue Oct 16, 2023 · 3 comments
Closed
Labels
type: bug The issue/PR concerns a confirmed bug. type: community contribution

Comments

@strarsis
Copy link
Contributor

strarsis commented Oct 16, 2023

@wavvves; @gigitux; @mikejolley:

Describe the bug

After updating the WooCommerce Blocks plugin, the page-cart and page-checkout templates are suddenly missing from the woocommerce/legacy-template block!

To reproduce

  1. Add a block for the legacy cart page:
<!-- wp:woocommerce/legacy-template {"template":"page-cart"} /-->

Note that the editor can not find the block.

  1. Load the cart page FSE template,
    note that only the message You're using the ClassicTemplate block appears in frontend,

Expected behavior

The classic cart block still works after updating, especially as not features are yet supported by the new cart block.

Environment

WordPress (please complete the following information):

  • WordPress version: 6.3.2
  • Gutenberg version (if installed): Not installed.
  • WooCommerce version: 8.2.0
  • WooCommerce Blocks version: 11.3.0
  • Site language: German (formal) with German (non-formal) fallback
  • Any other plugins installed: WooCommerce, Preferred Languages

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Chrome
  • Version: 117.0.5938.152

Additional context

I still need the legacy cart and checkout pages as block inside the FSE theme.

@strarsis strarsis added the type: bug The issue/PR concerns a confirmed bug. label Oct 16, 2023
@mikejolley
Copy link
Member

I'm not sure if this worked by accident, but cart and checkout have never been "templates" as such. It seems like you should be using either the core shortcode block, or the new legacy shortcode block to insert cart/checkout inside a custom template?

I think off of the top of my head this would be <!-- wp:core/shortcode {"shortcode":"[woocommerce_cart]"} /-->

@strarsis
Copy link
Contributor Author

strarsis commented Oct 16, 2023

@mikejolley: Thanks! Using a shortcode (<!-- wp:shortcode -->[woocommerce_cart]<!-- /wp:shortcode -->) re-added the cart page into the FSE template (same for the checkout page).

Yes, page-cart and page-checkout worked in the past, but the shortcode appears to render the same markup. I have to use the legacy pages for cart and checkout until all plugins have support for the block-based equivalents.

The rationale behind is that those legacy pages should be added to an existing FSE page (header and footer), hence only the relevant legacy page content must be added, not the whole page with its own html, head and body elements.

@tarunvijwani
Copy link
Contributor

tarunvijwani commented Oct 19, 2023

@strarsis Thank you for the details. I hope we have addressed all your questions. I’m going to close this issue, but please do leave a comment if you still need help with it.
Internal discussion: p1697705445658829-slack-C8X6Q7XQU

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug The issue/PR concerns a confirmed bug. type: community contribution
Projects
None yet
Development

No branches or pull requests

3 participants