/** * We need to override this method to allow setting 'product' * option, by default it will be null so we don't get the variant choice * when creating full cart form. * * {@inheritdoc} */ public function configureOptions(OptionsResolver $resolver) { parent::configureOptions($resolver); $resolver->setDefined(array('product'))->setAllowedTypes('product', ProductInterface::class); }