Cart Item Validation Result (DataTypes/CartItemValidationResult.php)

laravel · packages/Webkul/Product/src/DataTypes/CartItemValidationResult.php · php · MIT
pos, payments, lang:php, tag:validation, tag:bagisto

Contains validation status flags for shopping cart items, tracking if the cart is invalid or an item is inactive. Use when handling e-commerce cart validation rules.

// Source: https://github.com/bagisto/laravel | License: MIT | Copyright 2010-2018, Webkul Software
// Provided via justclaw.it.com; keep this notice with the code.
<?php

namespace Webkul\Product\DataTypes;

class CartItemValidationResult
{
    /**
     * @var bool
     */
    private $cartIsInvalid = false;

    /**
     * @var bool
     */
    private $itemIsInactive = false;

    /**
     * Function to check if cart is invalid
     *
     * @return bool
     */
    public function isCartInvalid(): bool
    {
        return $this->cartIsInvalid;
    }

    /**
     * Function to check if item is inactive
     *
     * @return bool
     */
    public function isItemInactive(): bool
    {
        return $this->itemIsInactive;
    }

    /**
     * Function to set if item is inactive
     

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key