Skip to main content

Custom Theme Integration

Drop the Simpler checkout button into a custom theme template when the admin placement options can't reach the right spot.


Usage

Include the Simpler button partial anywhere in your theme's templates:

{% include 'extension/module/simpler/button.twig' with {
page: 'product',
form: '#my-product-form',
position: 'bottom'
} %}
ParamValuesDefaultNotes
pageproduct, cart, checkoutRequired.
formCSS selector#productProduct page only. Where Simpler reads qty + options live from the DOM. Ignored for cart / checkout.
positiontop, bottom, marqueebottomWhere the button renders relative to the mount element.

For cart and checkout pages, Simpler builds the button payload from OpenCart's session cart server-side — no DOM reads required, so no form parameter is needed.

When the partial is included on a page, the plugin's default server-side placement for that page type is suppressed automatically — no double render. You don't need to disable the corresponding admin setting.

Examples

catalog/view/theme/<your-theme>/template/product/product.twig
{% include 'extension/module/simpler/button.twig' with {
page: 'product',
form: '#my-product-form',
position: 'bottom'
} %}
catalog/view/theme/<your-theme>/template/checkout/cart.twig
{% include 'extension/module/simpler/button.twig' with {
page: 'cart',
position: 'top'
} %}
catalog/view/theme/<your-theme>/template/checkout/checkout.twig
{% include 'extension/module/simpler/button.twig' with {
page: 'checkout',
position: 'top'
} %}
info

AJAX-Updated Cart or Checkout

If your theme swaps cart or checkout contents in place via AJAX, the mount node the Simpler button attached to will be replaced and the button will disappear. You'll need to re-run your include on the updated markup, trigger a full page reload, or contact support for a custom hook. The plugin already special-cases Journal3's AJAX cart update — similar themes can be added on request.

Looking for the no-code path? See Button Style for the admin-only placement and selector options.