/**
* {@inheritdoc}
*/
public function buildBasketElement(BasketElementInterface $basketElement, ProductInterface $product = null, array $options = array())
{
if ($product) {
$basketElement->setProduct($this->code, $product);
if (!$basketElement->getQuantity() && 0 !== $basketElement->getQuantity()) {
$basketElement->setQuantity(1);
}
}
$basketElement->setOptions($options);
}