AI store generator for ecommerce, Malaysia first. Laravel 13 + React + TypeScript.
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

AppliedDiscount.php 506B

12345678910111213141516171819
  1. <?php
  2. namespace App\Commerce;
  3. use App\Models\DiscountCode;
  4. /**
  5. * The discount code in a cart and what it is worth right now. Amounts are in sen.
  6. */
  7. final readonly class AppliedDiscount
  8. {
  9. public function __construct(
  10. public DiscountCode $code,
  11. /** What comes off the products. Zero while the code cannot be used. */
  12. public int $amount,
  13. /** Why the code cannot be used yet (a StorefrontText key), or null when it works. */
  14. public ?string $problem,
  15. ) {}
  16. }