简体   繁体   中英

Submit multiple products in cart (Sylius)

I am trying to submit multiple products to my cart (in Sylius).

However, I couldn't find any examples nor explanation for how to do this.

You can use my Github Gist , where you should enable multiple option in OrderItemType like this:

$builder
     ->add('variant', EntityType::class, [
          'multiple' => true,
          ...

, but I didn't used it in this case yet

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM