yii2-shopping-cart
yii2-shopping-cart copied to clipboard
Add product to the cart that has multiple prices
Hi. Thanks for the package.
Can you please suggest how I can add the product to the cart that has 3 types of the price? I know that this code is responsible for implementing it.
// app\models\ProductCartPosition.php
class ProductCartPosition extends Object implements CartPositionInterface
{
public $id;
public $price;
public $color;
//...
public function getId()
{
return md5(serialize([$this->id, $this->price, $this->color]));
}
//...
}
But I really can not understand the continuation, because it is not written in the documentation. How can I get this done? I saw that several people asked the same question but did not receive an exact answer.