Component names now reflect filesystem location using / as path separator and : as namespace separator for shared components: ~sx-header → ~layouts/header ~layout-app-body → ~shared:layout/app-body ~blog-admin-dashboard → ~admin/dashboard 209 files, 4,941 replacements across all services. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
18 lines
637 B
Plaintext
18 lines
637 B
Plaintext
;; Cart cart-mini fragment handler
|
|
;; returns: sx
|
|
;;
|
|
;; Renders the cart icon with badge (or logo when empty).
|
|
|
|
(defhandler cart-mini (&key user_id session_id oob)
|
|
(let ((summary (service "cart" "cart-summary"
|
|
:user-id (when user_id (parse-int user_id))
|
|
:session-id session_id))
|
|
(count (+ (or (get summary "count") 0)
|
|
(or (get summary "calendar_count") 0)
|
|
(or (get summary "ticket_count") 0))))
|
|
(~shared:fragments/cart-mini
|
|
:cart-count count
|
|
:blog-url (app-url "blog" "")
|
|
:cart-url (app-url "cart" "")
|
|
:oob (when oob oob))))
|