Skip to content

ReaganM02/himuon-flex-cart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

109 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Himuon Flex Cart Thumbnail

Himuon Flex Cart

AJAX-powered WooCommerce side cart focused on fast UX and developer-first extensibility.

Why this plugin

Himuon Flex Cart keeps shoppers on the current page while they:

  • update quantities
  • edit variations/subscription options
  • apply/remove coupons
  • review totals and free-shipping progress
  • proceed to checkout

All major output areas are extensible via hooks and filters.

Important

This plugin currently has no admin settings page for UI/behavior configuration. Customization is intentionally done through:

  • WordPress hooks/filters
  • template overrides/patches

Core Features

  • AJAX side cart with WooCommerce fragment refresh
  • In-cart quantity update and item removal
  • Variation edit panel (inside side cart)
  • Subscription edit support (WCS ATT integration)
  • Coupon panel with apply/remove flow
  • Optional server-rendered coupon list
  • Free-shipping progress bar
  • Footer coupon rows, discount, and subtotal/total row
  • Mobile-friendly drawer behavior

Quick Start (Hooks)

Change cart title

add_filter( 'himuon_flex_cart_header_text', function () {
    return __( 'My Cart', 'your-text-domain' );
} );

Disable free-shipping progress

add_filter( 'himuon_flex_cart_free_shipping_threshold', function () {
    return 0;
} );

Set free-shipping threshold

add_filter( 'himuon_flex_cart_free_shipping_threshold', function () {
    return 75;
} );

Disable coupon list (and list AJAX)

add_filter( 'himuon_flex_cart_enable_coupon_list', '__return_false' );

Override theme colors

add_filter( 'himuon_flex_cart_theme_colors', function ( $colors ) {
    return [
        'primary' => '#16a34a',
        'secondary' => '#09090b',
        'text' => '#52525b',
        'title' => '#27272a',
        'border' => '#e4e4e7',
        'border-light' => '#f4f4f5',
        'danger' => '#ef4444',
        'alt-bg' => '#fafafa',
    ];
} );

Change mini cart icon

add_filter( 'himuon_flex_cart_mini_cart_icon', function () {
    return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true"><path fill="currentColor" d="M7 4h10l1 2h3v2h-1l-2 10H6L4 8H3V6h3l1-2zm1.2 4 1.4 8h5l1.4-8H8.2z"/></svg>';
} );

Add custom side cart trigger

Any element with the himuon-side-cart-handler class will toggle the side cart.

<button type="button" class="himuon-side-cart-handler">
    Open Cart
</button>

Hide floating mini cart trigger

add_filter( 'himuon_flex_cart_show_mini_cart', '__return_false' );

High-Value Filters

  • himuon_flex_cart_mini_cart_icon (string SVG) (source)
  • himuon_flex_cart_show_mini_cart (bool) (source)
  • himuon_flex_cart_enable_coupon_list (bool) (source)
  • himuon_flex_cart_theme_colors (array) (source)
  • himuon_flex_cart_free_shipping_threshold (float) (source)
  • himuon_flex_cart_header_text (string) (source)
  • himuon_flex_cart_show_thumbnails (bool) (source)
  • himuon_flex_cart_thumbnail_size (string) (source)
  • himuon_flex_cart_footer_subtotal_label (string) (source)
  • himuon_flex_cart_footer_discount_label (string) (source)
  • himuon_flex_cart_footer_checkout_button_label (string) (source)

Footer Action Hooks

  • himuon_flex_cart_footer_start (source)
  • himuon_flex_cart_footer_before_coupon_trigger (source)
  • himuon_flex_cart_footer_after_coupon_trigger (source)
  • himuon_flex_cart_footer_before_applied_coupons (source)
  • himuon_flex_cart_footer_coupon_row (source)
  • himuon_flex_cart_footer_after_applied_coupons (source)
  • himuon_flex_cart_footer_before_discount (source)
  • himuon_flex_cart_footer_after_discount (source)
  • himuon_flex_cart_footer_before_total (source)
  • himuon_flex_cart_footer_after_total (source)
  • himuon_flex_cart_footer_before_checkout (source)
  • himuon_flex_cart_footer_after_checkout (source)
  • himuon_flex_cart_footer_end (source)

Example: Add content before checkout button

add_action( 'himuon_flex_cart_footer_before_checkout', function ( $cart ) {
    if ( ! $cart ) {
        return;
    }

    echo '<div class="my-side-cart-note">';
    echo esc_html__( 'You can update quantities before checkout.', 'your-text-domain' );
    echo '</div>';
}, 10, 1 );

Coupon Panel Action Hooks

  • himuon_flex_cart_coupon_panel_start (source)
  • himuon_flex_cart_coupon_before_title (source)
  • himuon_flex_cart_coupon_after_title (source)
  • himuon_flex_cart_coupon_before_notices (source)
  • himuon_flex_cart_coupon_after_notices (source)
  • himuon_flex_cart_coupon_before_form (source)
  • himuon_flex_cart_coupon_form_start (source)
  • himuon_flex_cart_coupon_form_end (source)
  • himuon_flex_cart_coupon_after_form (source)
  • himuon_flex_cart_coupon_before_list (source)
  • himuon_flex_cart_coupon_after_list (source)
  • himuon_flex_cart_coupon_before_list_loading (source)
  • himuon_flex_cart_coupon_after_list_loading (source)
  • himuon_flex_cart_coupon_panel_end (source)

Example: Add helper text in coupon panel

add_action( 'himuon_flex_cart_coupon_after_form', function () {
    echo '<p class="my-coupon-help">';
    echo esc_html__( 'Tip: coupon codes are case-insensitive.', 'your-text-domain' );
    echo '</p>';
} );

Development Notes

  • Main plugin bootstrap: himuon-flex-cart.php
  • Runtime classes: src/SideCart.php, src/Coupon.php
  • View builders: src/Frontend/*
  • Templates: templates/*
  • Frontend scripts:
    • assets/js/himuon-flex-cart.js
    • assets/js/himuon-flex-cart-coupon.js
    • assets/js/himuon-flex-cart-add-to-cart.js

WordPress.org Metadata

readme.txt is kept for WordPress plugin metadata and directory compatibility. Use this README.md for GitHub-focused documentation and developer examples.

About

AJAX-powered WooCommerce side cart focused on fast UX and developer-first extensibility.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors