Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Товары с модификаторами - повторное добавление #46

Open
zertex opened this issue Feb 20, 2020 · 0 comments

Comments

@zertex
Copy link

zertex commented Feb 20, 2020

При повторном добавлении товара в корзину с тем же модификатором добавляется новая запись, вместо увеличения количества

Почему-то в /shop/cart/CartItem.php ID модификатора приходит строкой...
Вылечил:

public function getId(): string
	{
		return md5(serialize([(int)$this->product->id, (int)$this->modificationId]));
	}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant