`, bound by FluentCart's * own AJAX add-to-cart JS -- no cart mutation happens in this plugin). The * `fcbd-product-action` compatibility class plus `data-fcbd-follow-variation` * keep the button's disabled/cart-id state synced across variation changes * via the already-shipped, unowned assets/variation-sync.js, with zero * changes to that file. */ final class FCAddToCart extends \Breakdance\Elements\Element { public static function uiIcon() { return '' . '' . ''; } public static function tag() { return 'div'; } public static function tagOptions() { return []; } public static function tagControlPath() { return false; } public static function name() { return 'FC Add to Cart'; } public static function className() { return 'fcbd-add-to-cart-element'; } public static function category() { return 'fluentcart'; } public static function badge() { return ['label' => 'FC', 'backgroundColor' => '#3157d5', 'textColor' => '#fff']; } public static function slug() { return __CLASS__; } public static function template() { return file_get_contents(__DIR__ . '/html.twig'); } public static function defaultCss() { return file_get_contents(__DIR__ . '/default.css'); } public static function cssTemplate() { return file_get_contents(__DIR__ . '/css.twig'); } public static function defaultChildren() { return false; } public static function dependencies() { return \FluentCartBreakdance\Compatibility\AssetManager::singleProductAtomDependencies(); } public static function settingsControls() { return []; } public static function settings() { return ['proOnly' => false]; } public static function availableIn() { return ['breakdance']; } public static function propertyPathsToSsrElementWhenValueChanges() { return ['content.product', 'content.add_to_cart']; } public static function defaultProperties() { return ['content' => [ 'product' => ['source' => 'current', 'product_id' => ''], 'add_to_cart' => ['button_text' => ''], ]]; } public static function contentControls() { return [ AtomControls::productControl(), AtomControls::section('add_to_cart', __('Button', 'sparkcore-commerce'), [ AtomControls::textControl('button_text', __('Button text', 'sparkcore-commerce')), ]), ]; } /** * FIXTAAK (2026-07-25, TAAK 1): typographySection() $parts narrowed to * ['text'] only. ssr.php renders `ProductRenderer::renderAddToCartButton()`, * contract-verified and live-rendered (product 95, hasOnetime forced true * in-process to reach the branch this specific catalog's subscription-only * products never hit on their own): a plain * ``. No `.fcbd-heading` * node anywhere in that template, in any of its three render branches * (hasOnetime / out-of-stock / advanced-variation) -- all three share this * exact same button markup. Heading Color/Heading Font Family were dead * controls; removed from the UI along with the CSS that targeted them. */ public static function designControls() { return [ controlSection('layout', __('Layout', 'sparkcore-commerce'), [ control('max_width', __('Maximum width', 'sparkcore-commerce'), ['type' => 'unit', 'layout' => 'inline'], true), ]), ControlPresets::spacingSection(), ControlPresets::typographySection('typography', __('Typography', 'sparkcore-commerce'), ['text']), ControlPresets::buttonSection(), ]; } }