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

Add WooCommerce demo blueprint with custom flat rate shipping and pro… #62

Open
wants to merge 4 commits into
base: trunk
Choose a base branch
from

Conversation

calvinrodrigues500
Copy link

WooCommerce Custom Flat Rate Shipping Demo Blueprint

  • Configured WordPress Playground instance to install WooCommerce.
  • Added custom flat rate shipping method via plugin.
  • Imported a product for demonstrating shipping on cart/checkout pages.

Copy link

github-actions bot commented Aug 6, 2024

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • The Plugin and Theme Directories cannot be accessed within Playground.
  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

@bgrgicak
Copy link
Contributor

bgrgicak commented Aug 7, 2024

@calvinrodrigues500 thank you for working on this PR!

I like that it shows how to set up a WooCommerce shop with a custom product and shipping.

Would it be also possible to set up some form of payment method like Direct Bank Transfers? This would allow users to fully experience the checkout flow.

@calvinrodrigues500
Copy link
Author

@bgrgicak Thank you for your feedback!

I'll work on adding a payment method to provide a complete checkout experience.
I'll update the PR as soon as it's ready.

blueprints/woo-shipping/blueprint.json Outdated Show resolved Hide resolved
@@ -0,0 +1,165 @@
<?xml version="1.0" encoding="UTF-8" ?>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would the default WooCommerce product import be a better fit for this?

It has more products with all standard types (simple, variable) and would make testing of WooCommerce easier.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@calvinrodrigues500 what do you think about using the default WooCommerce product import here?

@bgrgicak
Copy link
Contributor

bgrgicak commented Aug 8, 2024

Thanks for the changes @calvinrodrigues500!

I wasn't initially sure if this should be a separate demo or could be added to existing demos, but the more I think about it, this is a really good minimal WooCommerce setup for testing.

@calvinrodrigues500
Copy link
Author

@bgrgicak Thanks for the feedback! I'm glad the setup works well for testing. If there's anything else you'd like me to adjust or improve, feel free to let me know.

@calvinrodrigues500
Copy link
Author

@bgrgicak I have updated the code to use default WC products XML.

@calvinrodrigues500
Copy link
Author

@bgrgicak @adamziel
Please take a moment to review the latest changes.

"step": "importWxr",
"file": {
"resource": "url",
"url": "https://github.com/woocommerce/woocommerce/blob/trunk/plugins/woocommerce/sample-data/sample_products.xml"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's include this file in this PR, the idea is to avoid referencing external resources. See https://github.com/WordPress/blueprints/blob/trunk/CONTRIBUTING.md

"path": "/wordpress/wp-content/plugins/woo-shipping-method/woo-shipping-method.php",
"data": {
"resource": "url",
"url": "https://raw.githubusercontent.com/calvinrodrigues500/blueprints/woo-shipping/blueprints/woo-shipping/woo-shipping-method/woo-shipping-method.php"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's include this file in this PR, the idea is to avoid referencing external resources. See https://github.com/WordPress/blueprints/blob/trunk/CONTRIBUTING.md

@adamziel
Copy link
Contributor

adamziel commented Sep 6, 2024

Thank you @calvinrodrigues500! I left a few notes about the resource origin. Also, running the Blueprint via the preview link yields this error:

CleanShot 2024-09-06 at 21 17 00@2x

You may want to use the raw.githubusercontent.com domain instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Needs Author's Reply
Development

Successfully merging this pull request may close these issues.

3 participants