End of Year Sale: 30% off your first year on annual plans. Use code AP5-30-OFF See plans

Add a shopping cart (WooCommerce Cart block)

Build Your App · AppPresser 文档

Add a shopping cart (WooCommerce Cart block)

本文尚未翻译,因此以英文显示。

Your app journey: step 4 of 9, Add pages and features. New here? Read Start here: build your app with AppPresser first.

What you'll do: Add a cart page where shoppers check their items and go to checkout.

Before you start

  • Install and activate the WooCommerce plugin on your WordPress website, with some published products. WooCommerce is the WordPress plugin for running an online shop.
  • Install and activate the AppCommerce plugin, AppPresser's add-on for WooCommerce, on your WordPress website.
  • Connect your app to your WordPress website. See Connect your WordPress site and turn on Features.

Add the block

This block has no settings.

  1. In the left menu, under Customization, click Custom Pages.
  2. Click the name of the page you want to change. To make a new page instead, click Add New Page, type a title, keep Page Builder selected and click Create Page.
  3. Below the last block on the page, click Add Block.
  4. In Search blocks…, type WooCommerce Cart, then click the block. It is added to the bottom of the page.
  5. Click Save Changes at the top of the editor.
  6. To see a new page in the App Preview, add it to a menu. See Add a page to your app menu.

If you chose WooCommerce when you made your app, AppPresser already made a Cart page with this block on it.

What you see in the app

When the cart is empty, the block says "Cart is empty." and shows a GO TO SHOP button.

The builder Dashboard with the App Preview on the Cart page, showing Cart is empty and a GO TO SHOP button

When a logged-in shopper has added products, the cart shows:

  • Each product with its picture, price and quantity.
  • The Cart total at the top.
  • A CHECKOUT button.
  • A CLEAR CART button, which empties the cart.

A product page in the App Preview after tapping ADD TO CART, with the cart icon at the top showing 1

The Cart page in the App Preview with Cart total: $7.99, the CHECKOUT button, one product with quantity buttons and CLEAR CART

Checkout works only in the app on a real phone or tablet.

Check it as a logged-in shopper

The App Preview starts logged out. To see what a logged-in shopper sees:

  1. Make a test customer on your WordPress website. Do not use your admin account.
  2. In the App Preview, click More, then click your Account page. A Login window opens.
  3. Type the test customer's username and password, then click SUBMIT.
  4. Add a product to the cart.
  5. Open the Cart page.

Tips

Tips

  • To move a block, drag it by its handle (the dots on the left). Click the arrow to fold it closed.
  • To copy a block, click the Duplicate icon.
  • To turn a setting on or off, click the switch itself, not the words next to it.
  • After you save, open the page in the App Preview and check your changes.

Careful: The trash icon removes a block right away. Check before you click.

You're done when the block shows on your page in the App Preview.

Next step

Add a wishlist (WooCommerce Wishlist block)

这篇文章对您有帮助吗?

没有找到?

我们的支持团队可协助解决设置、构建和应用商店相关问题。