yii2-cart
yii2-cart copied to clipboard
Yii2 shopping cart
At file DatabaseStorage.php, if not active session, maybe can't use Yii::$app->session->getId() but you can active session at init(), just like: Yii::$app->session->open(); Good luck!
Error: Declaration of app\models\Product::getPrice() must be compatible with yii2mod\cart\models\CartItemInterface::getPrice(): int return type should be defined to fix the incompatibility. Also, PHP version should be greater than 7 in the composer.json.
I already have this error: ` Declaration of backend\models\Product::getPrice() must be compatible with yii2mod\cart\models\CartItemInterface::getPrice(): int ` I already implement the CartInterface and functions and got this error
The `CartItemInterface.php` uses int data type for price value: `public function getPrice(): int;` I believe that more correct would be to have this value float/double to support decimal values in...
Hello, I have this error: `Argument 1 passed to yii2mod\cart\Cart::add() must be an instance of yii2mod\cart\models\CartItemInterface` is in this method: ` public function add(CartItemInterface $element, $save = true): self` I...
> Returns a string containing a byte-stream representation of value that can be stored anywhere. > Note that this is a binary string which may include null bytes, and needs...
When I use this command, I got error: $cart->add($item); The problem is from DatabaseStorage::save() in this line REPLACE {{{$this->table}}} SET {{{$this->dataField}}} = :val, {{{$this->idField}}} = :id The property $table you...
First I want to mention that I'm on PHP 7.2.13, now the problem: - I have webstore that logged users and guest users are allowed to add items to cart....
```php Mac-mini-Dev:*** dev$ php yii migrate/redo 3 Yii Migration Tool (based on Yii v2.0.15.1) Total 3 migrations to be redone: m161119_153348_alter_cart_data m161109_124936_rename_cart_table m160516_095943_init Redo the above migrations? (yes|no) [no]:yes ***...