From shopware-checkout
Rabatte/Zu- und Abschläge im Shopware-6-Warenkorb: Discount-LineItem (type promotion/discount), PercentagePriceCalculator, negative Preise, Verhältnis zu Promotions. Trigger: "Rabatt Warenkorb", "discount line item", "Abschlag cart", "Gutschrift cart", "PercentagePriceCalculator discount", "Zuschlag warenkorb". Shopware 6.7.
How this skill is triggered — by the user, by Claude, or both
Slash command
/shopware-checkout:sw-cart-discountThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Rabatte sind eigene LineItems (negativer Preis) bzw. Promotion-Items, berechnet in einem Processor.
Rabatte sind eigene LineItems (negativer Preis) bzw. Promotion-Items, berechnet in einem Processor.
$discount = new LineItem($id, LineItem::DISCOUNT_LINE_ITEM, null, 1);
$discount->setLabel('FF Rabatt');
$price = $this->percentagePriceCalculator->calculate(-10.0, $cart->getLineItems()->getPrices(), $context);
$discount->setPrice($price);
$toCalculate->add($discount);
Prozentual über PercentagePriceCalculator (auf eine Preis-Collection), absolut über AbsolutePriceCalculator.
Für regelbasierte Aktionen/Gutscheine das Promotion-System nutzen (sw-promotion) statt eigener Logik, wenn möglich.
Im eigenen Processor (sw-cart-processor) anhängen; Steuerverteilung erfolgt automatisch.
npx claudepluginhub zone1987/claude-a-dev-team --plugin shopware-checkoutCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.