Download the PHP package fixstacks/module-zero-checkout without Composer

On this page you can find all versions of the php package fixstacks/module-zero-checkout. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package module-zero-checkout

Zero_Checkout

A one-page checkout for Magento Open Source that replaces the Knockout checkout: server-rendered HTML, one native <form>, HTMX for the parts that refresh (shipping rates, totals, regions, saved addresses, discount code). Offline payment methods work with JavaScript turned off.

Install

Requires Magento Open Source 2.4.7–2.4.9 and PHP 8.2–8.4 with the GD extension built with WebP (php -r 'var_dump(function_exists("imagewebp"));' says true; Magento's own PHP requirements cover the rest). Without WebP in GD, Zero skips its WebP image copies and serves the originals.

Composer installs fixstacks/module-zero-core with it.

Part of fixstacks/zero, which installs the Zero theme and every Zero module at once.

Features

Feature Where
Contact, shipping and billing addresses, saved-address picker checkout/index.phtml, shipping-address-fields.phtml, billing-address-fields.phtml
Default shipping address prefilled for signed-in customers; new addresses saved to the address book Controller/Checkout/Index, Model/Checkout/ShippingAddressUpdater
Browser autofill (autocomplete tokens per section) address templates
Live shipping rates and totals Controller/Checkout/Shippingmethods
Discount code in the order summary Controller/Checkout/Coupon, coupon.phtml
Order comment, saved on the order Model/PlaceOrder/OrderComment, order-comment.phtml
Terms and Conditions, checked on the server Model/PlaceOrder/AgreementsValidator, agreements.phtml
Sign in from the checkout page Controller/Checkout/Login, login.phtml
Order summary with item options ViewModel/Checkout/CheckoutPage
Payment: offline methods, purchase order; Braintree, Stripe, Authorize.Net, PayPal Standard from their own Zero modules zero.checkout.payment.* containers

Settings

Stores > Configuration > Zero > Checkout:

Group Setting Path Default
Zero Checkout Enabled checkout/zero_checkout/enabled Yes
Checkout Page Discount Code Field checkout/zero_checkout/coupon Yes
Checkout Page Order Comment checkout/zero_checkout/order_comment Yes
Checkout Page Sign In at Checkout checkout/zero_checkout/login Yes
Terms and Conditions Enable Terms and Conditions checkout/options/enable_agreements (Magento's) No

The agreements are edited in Stores > Terms and Conditions. Payment methods are configured in Sales > Payment Methods.

Extending the checkout

Four extension points, all wired with layout XML or di.xml; nothing in Zero_Checkout needs to change.

1. Add a field or a block to the page

Layout containers in zero_checkout_index.xml:

Container Position Inside the checkout form?
zero.checkout.login (block) above the form no
zero.checkout.shipping.after right after the shipping methods (a carrier's own fields) yes
zero.checkout.payment.express above the payment methods yes
zero.checkout.payment.forms below the payment methods (card fields) yes
zero.checkout.summary.totals.before order summary, above the totals yes
zero.checkout.place-order.before right above Place Order yes

Fields inside the form are posted with the order.

Style with the classes Zero's templates already use, or the theme's Tailwind build won't include them (see the theme's docs/child-themes.md).

2. Check something before the order is placed

Implement Zero\Checkout\Api\PlaceOrderValidatorInterface. It runs after the form's addresses, shipping method and payment are on the quote; throw LocalizedException to stop the order, and the message is shown on the checkout page.

3. Do something once the order exists

Implement Zero\Checkout\Api\AfterPlaceOrderInterface. A failure here is logged and the shopper still reaches the success page.

Register both:

Items are keyed by name, so a module can also replace or remove a built-in one (agreements, order_comment) by reusing its key.

4. Add a payment method

Zero Checkout lists only the payment methods it knows how to complete. A payment module registers its method code (and an optional one-line description) with Zero\Checkout\Model\SupportedPaymentMethods:

Then, depending on the method:

Zero_Braintree is the smallest complete example: a view model, a template, a script and one layout file.

What not to change

License

OSL-3.0 or AFL-3.0, your choice: see NOTICE.md.


Vilmate

Zero is made by Fixstacks in partnership with Vilmate, a software development company. Documentation: https://fixstacks.com/zero/docs. Demo store: https://zero.fixstacks.com.


All versions of module-zero-checkout with dependencies

PHP Build Version
Package Version
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package fixstacks/module-zero-checkout contains the following files

Loading the files please wait ...