Sidcraft Commerce for Sidcraft Page Builder

Descripziun

Sidcraft Commerce turns Sidcraft Page Builder into a complete store. It needs only Sidcraft Page Builder — no WooCommerce or other e-commerce plugin.

  • Design products in Sidcraft Page Builder: Add New Product opens the builder, and its Product data panel sets the price, sale price, SKU, stock, badge, categories, image and short description. Existing products get „Edit with Sidcraft Page Builder“.
  • Products with prices, sale prices (shown above the struck-through regular price), SKU, stock tracking, featured flag and categories.
  • Verified-customer ratings and reviews: shoppers click a star, enter their order number and order email, and write a review. Reviews show with a „Verified purchase“ badge, a rating breakdown and the average on the product page.
  • Image badges per product (HOT, POPULAR, Sale, Clearance) and an automatic „Sold Out“ label on out-of-stock products.
  • Item options: sizes, extras, spice levels or special instructions on any product, each choice optionally adding to the price (for example „Large +4“, „Extra cheese +1.50“). Choices show in the cart, checkout, emails and the order screen.
  • Coupons: a percentage off or a fixed amount off, with optional minimum spend, expiry date and usage limit.
  • Cart stored server-side per visitor; prices are always recalculated from the product.
  • Payments: PayPal with Pay in 4 (Pay Later) and Venmo; Stripe for cards, Apple Pay, Google Pay, Klarna, Afterpay / Clearpay and Affirm; Razorpay and PayU for India (UPI, cards, netbanking, wallets); Mercado Pago for Latin America (cards, Pix, boleto, OXXO, installments). Customers pay on each provider’s secure page or buttons; card numbers never touch your site.
  • Gift cards: sell them as products (preset amounts and/or a custom amount, recipient, message, optional send date) or issue them by hand. Recipients get an email with the code; customers redeem one or more cards in the cart or at checkout, and unused balance stays on the card.
  • Shipment tracking: add tracking numbers on the order screen. Links are built automatically for Australia Post, Canada Post, City-Link Express, DHL, DPD, Fastway South Africa, FedEx, OnTrac, Parcelforce, Polish carriers (Poczta Polska, InPost, DPD Polska, DHL Parcel Polska, GLS), Royal Mail, SAPO, TNT Express (consignment and reference), UPS and USPS, or use any carrier with a custom link.
  • Developers can add any payment method (a local bank, a regional wallet, a proprietary system) by extending one PHP class; settings, return and webhook URLs are provided. See docs/example-gateway.php.
  • Orders in the admin with statuses, history and stock reserved when the order is placed. Two buyers cannot both take the last unit. Cancelled and Refunded put the remaining units back. A dispute keeps them reserved until it is lost.
  • Partial refunds record the amount and return only the quantities you name. A refund that covers the order total marks the order Refunded. Stripe and PayPal refund and dispute notifications are applied once.
  • Guest checkout can create an account, and a later login with the same email attaches guest orders placed on 1.0.9 or newer.
  • Store Export catalog downloads products, categories, prices, SKU, stock and item options as JSON, without the page-builder layout.
  • Order emails to the customer and the shop owner, including a “Your order has shipped” email with tracking links.

Commerce Units for Sidcraft: Product Grid, Add to Cart, Product Price, Stock Status, Product Rating, Product Reviews, Mini Cart, Cart, Checkout and Order Confirmation, plus a quick-view popup. Every Unit also works as a shortcode, e.g. [sidccofo_product_grid source="on_sale" limit="8"].

Pages stay cacheable: assets load only where a Unit is used, the cart badge fills in after load, and Cart/Checkout pages are marked no-cache automatically.

Themes can override any template by copying it from templates/ into yourtheme/sidcraft-commerce/.

External services

Payment providers are contacted only when a store owner enables them under Store Settings Payments and a customer chooses them at checkout (or when the provider sends a notification about a payment). Each receives what it needs to take the payment: the order ID, total and currency, and the customer’s name, email and, where the provider requires it, phone and address.

  • PayPal – when PayPal is enabled, the plugin sends order line items (product names, SKUs, prices, quantities), the order total, shipping, coupon discount, currency and the order ID to PayPal’s REST API (api-m.paypal.com, or api-m.sandbox.paypal.com in sandbox mode) to create and capture the payment, and to verify PayPal webhooks. This happens only when a customer chooses PayPal at checkout, or when PayPal sends a webhook. With „On-page buttons“ on, the checkout page also loads PayPal’s JavaScript SDK from www.paypal.com to show the PayPal, Pay Later and Venmo buttons and the Pay in 4 message. PayPal terms: https://www.paypal.com/legalhub/useragreement-full — privacy: https://www.paypal.com/myaccount/privacy/privacyhub
  • Stripe (cards, Apple Pay, Google Pay, Klarna, Afterpay / Clearpay, Affirm) — api.stripe.com creates a Checkout Session for the order total and is asked again to confirm the payment; Stripe sends signed webhooks back. The customer pays on checkout.stripe.com. Terms: https://stripe.com/legal/ssa — privacy: https://stripe.com/privacy
  • Razorpay – api.razorpay.com creates a payment link for the order total and is asked again to confirm it; Razorpay sends signed webhooks back. Terms: https://razorpay.com/terms/ — privacy: https://razorpay.com/privacy/
  • PayU India – the checkout form is posted to secure.payu.in (test.payu.in in test mode); payments are confirmed with PayU’s verify_payment API on info.payu.in. Terms: https://payu.in/tnc-new/ — privacy: https://payu.in/payu-payments-privacy-statement
  • Mercado Pago – api.mercadopago.com creates a Checkout Pro preference for the order total; payments are read back from the same API when the customer returns or a notification arrives. Terms: https://www.mercadopago.com.ar/developers/en/docs/resources/legal/terms-and-conditions — privacy: https://www.mercadopago.com/privacy/privacy-notice/1.1

Developers: add-ons

Sidcraft Commerce is built to be extended by other plugins: a restaurant menu, bookings, a print shop. Add-ons can add item options in code, register their own order statuses (for example Preparing, Ready for pickup, Out for delivery, each with its own customer email), add checkout fields (pickup time, delivery notes), block ordering outside opening hours, add Units for Sidcraft Page Builder, settings sections and emails. The guide is in docs/ADDONS.md, with a complete restaurant example in docs/example-addon.php.

Developers: custom payment gateways

Extend \SidcraftCommerce\Payments\Gateway (the equivalent of WooCommerce’s WC_Payment_Gateway) and add it with the sidcraft_commerce_gateways filter. Implement get_id(), get_default_title() and process_payment(); return fields from get_settings_fields() and they appear on Store Settings Payments. return_url() and webhook_url() point at ready-made REST routes that call your handle_return() and handle_webhook(); remote_json() calls JSON APIs; $order->payment_complete() marks an order paid. A complete, commented example is in docs/example-gateway.php.

Maletgs dal visur

Installaziun

  1. Install and activate Sidcraft Page Builder 0.15 or newer.
  2. Install and activate Sidcraft Commerce. Shop, Cart, Checkout and Order-received pages are created for you.
  3. Go to Store Settings to set your currency, shipping and payment methods.
  4. Under Store Settings Payments, enable the payment methods you want and paste their API keys (test keys first). Each section shows its webhook URL.

FAQ

Do I need WooCommerce?

No. Sidcraft Commerce needs only Sidcraft Page Builder. Products, orders, coupons and gift cards are stored in your own WordPress database.

Which payment methods can I accept?

PayPal (with Pay in 4 and Venmo), Stripe (cards, Apple Pay, Google Pay, Klarna, Afterpay / Clearpay, Affirm), Razorpay, PayU India and Mercado Pago. Turn on the ones you want under Store Settings Payments and paste the API keys from your provider account.

Does the plugin charge a fee on sales?

No. Only your payment provider’s normal fees apply.

Do card numbers pass through my site?

No. Customers pay on the provider’s own secure page or buttons, so card details never reach your server.

Can I test payments before going live?

Yes. Use your provider’s test or sandbox keys (PayPal sandbox, Stripe test keys, PayU test mode and so on), place a test order, then switch to live keys.

How do gift cards work?

Tick „This product is a gift card“ on a product and set preset amounts, a custom amount range, or both. Buyers enter a recipient, a message and an optional send date. The recipient gets the code by email once the order is paid, or on the chosen date. Codes can be used in the cart or at checkout, and any unused balance stays on the card. You can also issue cards by hand under Store Gift cards. Cards never expire unless you set an expiry under Store Settings Payments.

How do I add tracking numbers?

Open the order, choose the carrier and enter the tracking number in the Shipment tracking box. Links are built automatically for major carriers, or you can enter any carrier name with a custom link. The customer gets a „Your order has shipped“ email with the tracking link.

Can I add my own payment gateway?

Yes. Extend \SidcraftCommerce\Payments\Gateway and register it with the sidcraft_commerce_gateways filter. See the „Developers: custom payment gateways“ section above and docs/example-gateway.php.

How do I add a product with Sidcraft Page Builder?

Click Store Add New Product. The product opens in Sidcraft Page Builder with the Product data panel open: enter the price (and stock, SKU, image and so on), design the page with any Units, then click Publish. Add the Add to Cart and Product Price Units where you want them; if your layout has no Add to Cart Unit, the standard buy box is added above it. To use the WordPress editor instead, turn off „Design products with Sidcraft Page Builder“ under Store Settings.

How do item options work?

On a product, under Product data Item options (or in the Product data panel in Sidcraft Page Builder), type one group per line, for example Size*: Small | Medium +2 | Large +4 or Extras [checkbox]: Cheese +1 | Bacon +2. * makes a group required; [radio], [checkbox] and [text] change how it is shown; +2 adds 2 to the price. Customers choose on the product page, and product grids show „Choose options“.

Can developers build add-ons, for example for a restaurant?

Yes. See the „Developers: add-ons“ section above, docs/ADDONS.md and the restaurant example in docs/example-addon.php.

Can I change how the store looks?

Yes. Style the Commerce Units in Sidcraft Page Builder, or copy any template from the plugin’s templates/ folder into yourtheme/sidcraft-commerce/ and edit it there.

Does it work with page caching?

Yes. Shop and product pages stay cacheable, the cart badge fills in after the page loads, and Cart and Checkout pages are marked no-cache automatically.

What if two people buy the last item?

The order reserves stock as it is created, and the reservation only succeeds while the stored quantity is still at least the amount being bought. The other buyer is told there is not enough stock. A pending order that is still unpaid after 24 hours is cancelled and the units go back. Cancelled and Refunded do the same for the units that order still holds.

How do refunds and chargebacks work?

Stripe charge.refunded and PayPal PAYMENT.CAPTURE.REFUNDED record the amount once. If that amount covers the order, the order is marked Refunded and the remaining stock, coupon use and gift-card balance are returned. A smaller amount stays a partial refund and returns stock only for quantities named on the order screen (Refund box) or in the provider payload. Stripe charge.dispute.created / charge.dispute.closed and PayPal customer-dispute events set the order to Disputed. Stock stays reserved. A dispute the buyer wins marks the order Refunded. A dispute the store wins returns the order to its previous status.

Can a guest attach the order to an account?

Yes. Checkout has “Create an account with this email”. WordPress emails a link to set the password. If that email already has an account, the buyer is asked to log in. Logging in or registering later with the same email attaches guest orders placed on version 1.0.9 or newer.

How do I export products?

Open Store Export catalog and download the JSON file. It contains the product title, description, categories, regular and sale price, SKU, stock and item options. It does not contain the Sidcraft Page Builder layout. Tools Export also includes the product post type.

Which currencies use three decimal places?

BHD, JOD, KWD, OMR and TND are sent to payment providers in thousandths and displayed with 3 decimals. Zero-decimal currencies (JPY, KRW, VND and the rest of that set) use no decimals. Other currencies use the decimal setting under Store Settings.

What happens to my data if I delete the plugin?

Settings, sessions and temporary data are removed. Products, orders, coupons and gift cards are kept, unless you add define( 'SIDCRAFT_COMMERCE_REMOVE_ALL_DATA', true ); to wp-config.php before deleting the plugin.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“Sidcraft Commerce for Sidcraft Page Builder” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

1.0.9

  • Stock is reserved when the order is placed. The update only succeeds while enough units remain, so two buyers cannot both take the last item. A pending order unpaid after 24 hours is cancelled and its stock is returned.
  • Partial refunds. The order screen records an amount and the quantities to put back. A Stripe or PayPal refund that covers the order total marks it Refunded. A smaller amount does not return stock unless quantities are named. Each provider event is applied once.
  • Disputed status. Stripe charge.dispute.created and charge.dispute.closed, and PayPal customer-dispute events, keep stock reserved while a dispute is open. A lost dispute refunds the order. A won dispute restores the previous status.
  • Guest checkout can create an account. Logging in or registering with the same email attaches guest orders placed on 1.0.9 or newer.
  • Three-decimal currencies (BHD, JOD, KWD, OMR, TND) are charged in thousandths. Zero-decimal currencies stay on a factor of 1.
  • Store Export catalog writes products, categories, price, SKU, stock and item options to JSON, without the page-builder layout.
  • Templates updated (1.0.9): units/checkout.php.

0.9.2

  • Plugin Check: output escaping on the order screen’s item list and in the Add to Cart template.

0.9.1

  • Developers: new sidcraft_commerce_editor_styles filter so add-on Units are styled in the Sidcraft Page Builder canvas, and add-on Units can use any glyph or emoji as their builder icon.

0.9.0

  • Item options. Type option groups on a product (Product data Item options, or the builder’s Product data panel): dropdowns, buttons, multiple choices and text boxes, each choice optionally adding to the price, and any group can be required. Customers choose on the product page with a running price; each combination is its own cart line; stock is checked across all lines of a product; prices are recalculated on every request. Choices show in the cart, checkout, order-received page, emails, the order screen and PayPal.
  • Add-on support: sidcraft_commerce_product_options filter, Cart::add_with_options() and an options parameter on the cart/add REST route.
  • Order statuses can be registered by add-ons with Post_Types::register_order_status(): label, position, colour, whether it counts as paid, and an optional customer email. Stock, sales, gift cards and reviews now follow each status’s „paid“ setting instead of a fixed list. New sidcraft_commerce_order_status_definitions filter; the older sidcraft_commerce_order_statuses filter still works.
  • Checkout fields added by add-ons can be dropdowns (select with choices) or text areas, and their values now show on the order-received page and in emails as well as the admin.
  • New developer guide (docs/ADDONS.md) and a complete restaurant add-on example (docs/example-addon.php).
  • Templates updated (0.9.0): units/add-to-cart.php, units/cart-panel.php, units/checkout.php, units/checkout-summary.php, units/order-confirmation.php, emails/order.php. New: units/item-options.php.

0.8.0

  • Products are designed in Sidcraft Page Builder. Add New Product (menu, Products list and admin bar) opens a new product in the builder, and products get „Edit with Sidcraft Page Builder“ on the product screen, in the Products list and in the admin bar.
  • New Product data panel inside the builder: regular and sale price, SKU, stock tracking and quantity or stock status, image badge, featured, categories, product image, short description and „hide the automatic buy box“. It opens by itself on a new product without a price, and the builder’s Save also saves it.
  • The automatic buy box is skipped when the product layout already has an Add to Cart Unit, and it now sits above a Sidcraft layout instead of being replaced by it.
  • New setting: Store Settings „Design products with Sidcraft Page Builder“ (on by default). Turn it off to add and edit products in the WordPress editor.

0.7.4

  • Plugin Check: order-screen shipment fields are sanitized field by field when read, and the shipment save no longer writes to $_POST.
  • Fix: adding a shipment with „Mark the order Completed“ no longer gets undone by the order status dropdown on the same save.
  • Admin: gift card screen uses a stylesheet class instead of an inline style.

0.7.3

  • Gift cards. Tick „This product is a gift card“ on a product and set preset amounts and/or allow a custom amount (with a minimum and maximum). Buyers choose the amount, recipient, message and an optional send date; each card is emailed to the recipient once the order is paid, or on the chosen date.
  • Store Gift cards: issue cards by hand (store credit, prizes), see balances, recipients and history, change a balance, resend the email, disable a card.
  • Redeeming: a gift card field in the cart and at checkout. Several cards per order; a card pays up to its balance and keeps the rest. When cards cover the whole order, no payment method is needed. Amounts are taken when the order is placed and returned if it is cancelled or refunded; cards bought in a cancelled or refunded order are disabled.
  • Gift cards are not charged tax or shipping and coupons don’t apply to them. Optional expiry for new cards (Store Settings Payments Gift cards; default never).
  • Orders with nothing left to pay (gift cards or a 100% coupon) no longer ask for a payment method.
  • Codes are protected against guessing (10 failed attempts per hour per visitor).
  • Templates updated (0.7.3): units/add-to-cart.php, units/cart-panel.php, units/checkout.php, units/checkout-summary.php. New: units/gift-card-form.php, units/gift-card-redeem.php, emails/gift-card.php.

0.7.2

  • Shipment tracking: a „Shipment tracking“ box on each order adds the carrier, tracking number and date. The customer gets a „Your order has shipped“ email with a Track your package button, and the tracking shows on the order-received page. Several shipments per order are supported.
  • Automatic tracking links for Australia Post, Canada Post, City-Link Express, DHL, DPD (UK and Europe), Fastway South Africa, FedEx, OnTrac, Parcelforce, Poczta Polska, InPost, DPD Polska, DHL Parcel Polska, GLS Poland, Royal Mail, SAPO, TNT Express (consignment and reference), UPS and USPS. Custom carriers with any link; Store Settings Shipping & tax „Your carriers“ saves your own carriers and can replace a built-in link.
  • Adding a shipment can mark the order Completed (one email: the shipped email replaces the „order complete“ email).
  • Templates updated (0.7.2): emails/order.php. New: units/shipments.php.

0.7.1

  • All payment gateways work for everyone; there is no licence check of any kind.
  • Declares its dependency on Sidcraft Page Builder (Requires Plugins header).

0.7.0

  • New payment methods: Stripe (cards, Apple Pay, Google Pay) with Klarna, Afterpay / Clearpay and Affirm; Razorpay; PayU India; Mercado Pago.
  • PayPal: on-page buttons with Pay in 4 (Pay Later), Venmo and cards, plus a Pay in 4 message (the redirect flow remains as an option).
  • Developer framework: the Gateway base class now provides settings fields, return and webhook routes (/gateway/{id}/return and /webhook), HTTP helpers and a POST-form checkout flow. Example in docs/example-gateway.php.
  • Store Settings is split into tabs: General, Shipping & tax, Payments, Emails.

0.6.2

  • Plugin Check: coupon lookup no longer sets suppress_filters; tested up to WordPress 7.1.

0.6.1

  • WordPress.org review: text domain is now sidcraft-commerce-for-sidcraft-page-builder; every stored name, post type, status, shortcode, script handle and JavaScript global uses the sidccofo prefix; admin CSS/JS are enqueued files; editor REST routes check per-product permissions.
  • Shortcodes are now [sidccofo_product_grid], [sidccofo_cart], [sidccofo_checkout], [sidccofo_order_confirmation] and so on.
  • wp-config.php constants renamed: SIDCRAFT_COMMERCE_PAYPAL_CLIENT_ID, SIDCRAFT_COMMERCE_PAYPAL_SECRET, SIDCRAFT_COMMERCE_PAYPAL_WEBHOOK_ID.

0.6.0

  • Verified-customer reviews. Clicking a star on a product (Product Rating Unit, buy box or the reviews section) opens a popup with that rating picked; the customer enters their order number, the email used on the order and their review. The order must be paid and contain the product, and each order can review each product once. Reviews appear in the product details with a „Verified purchase“ badge, the average, a 5-to-1 star breakdown and the review list.
  • New Product Reviews Unit ([sidccofo_product_reviews]); added automatically below the product description (Store Settings „Show reviews on product pages“).
  • Store Settings „Publish verified reviews immediately“ (on by default); turn off to approve each review under Comments first. The Comments screen shows the stars and a link to the verifying order.
  • The open WordPress comment form is closed on products, so only verified customers can review. Existing reviews are kept and still count toward the average.
  • Protection against guessing: the same message for a wrong order number or email, a limit of 10 failed attempts per hour per visitor, and a hidden spam-trap field.
  • Product Rating Unit: stars are clickable (switch „Click a star to rate“), and it now shows „Be the first to review“ instead of hiding when a product has no reviews.
  • Templates updated (0.6.0): units/product-rating.php. New: single/reviews.php, single/no-comments.php.

0.5.0

  • Coupons (Store Coupons): the coupon title is the code; choose a percentage of the (sale-priced) subtotal or a fixed amount off, with optional minimum spend, expiry date and usage limit. Customers apply or remove one coupon in the cart or at checkout. The discount shows as its own line in the cart, checkout, confirmation, emails and admin order, reduces tax and counts toward free shipping, and is sent to PayPal as a discount. Usage is counted when an order is placed on hold / processing and given back on cancel / refund.
  • Image badges: pick HOT, POPULAR, Sale or Clearance per product (Product data Image badge). It shows top-right on the product image in grids, quick view and the product page. Without a chosen badge, products on sale still show „Sale“.
  • Sold Out: out-of-stock products get a highlighted „Sold Out“ label over a dimmed image.
  • Sale prices: the sale price now sits above the struck-through regular price. A sale price that isn’t lower than the regular price is rejected with a notice. The cart shows the struck-through regular price next to sale-priced lines.
  • Fix: the sidcraft_commerce_order_status_{status} action fired with an empty status.
  • Templates updated (0.5.0): loop/product-card.php, quick-view.php, units/cart-panel.php, units/checkout-summary.php. New: units/coupon-form.php.

0.4.1

  • Fix: no translations are loaded before init (WordPress 6.7+ „_load_textdomain_just_in_time was called incorrectly“ notice when Sidcraft Page Builder was missing or inactive).
  • Admin: „Add New Product“ menu label; order screen shows country, state and payment method names; sale prices in the Products list no longer show screen-reader text.

0.4.0

  • Tax by country and state: prices entered including or excluding tax, a rate table (country, optional state, rate, label), optional tax on shipping. Tax shows as its own line (or „Includes … tax“) in the cart, checkout, confirmation, emails and admin, and is sent to the payment provider.
  • Shipping zones: a flat rate per group of countries, a * zone for everywhere else, free shipping over an amount (store-wide or per zone). Countries outside every zone can’t check out and aren’t offered.
  • Checkout: country and state are lists; shipping and tax update as soon as they change. „Add $X more for free shipping“ in the cart.
  • Templates updated (0.4.0): cart-panel.php, checkout.php, checkout-summary.php, order-confirmation.php, emails/order.php.
  • Coding standards: passes WordPress Coding Standards (PHPCS) and Plugin Check.

0.3.3

  • Readme text updates.

0.3.2

  • Internal detection changes.

0.3.1

  • Sidcraft integration wired to Sidcraft Page Builder’s real extension API (tested with 0.15.4): Units register on sidcraft_page_builder_units_register, appear in the editor under Commerce, preview live on the editor canvas, and are excluded from Sidcraft’s fragment cache.
  • Fixed: Sidcraft Page Builder is detected by SIDCRAFT_PAGE_BUILDER_VERSION plus its own requirements check (0.15.0+ required).
  • Fixed: Sidcraft layouts are read from _sidsyn_document_data (assets now load in on Sidcraft-built pages).
  • Fixed: product URLs could 404 after Sidcraft Page Builder was reactivated or updated; permalinks now repair themselves.

0.3.0

  • Payments: PayPal (Orders v2, verified webhooks).

0.2.0

  • Standalone store engine: no WooCommerce dependency. Products, categories, reviews, cart sessions, checkout, orders, emails, settings.
  • Stripe Checkout gateway with signed webhooks and a return-page fallback. Offline payment gateway.
  • New Units: Cart, Checkout, Order Confirmation. Cart/Checkout layouts adapt to the space they’re given.

0.1.0

  • First build (WooCommerce-based, replaced by 0.2.0).