简体   繁体   中英

Configure SyliusCartBundle for multiple cart items

I'm trying to configure SyliusCartBundle for a sf 2.3 project, but I need to add multiple cartItems for differents product entities. Ex. Books and Travel packages are different entities and docs says I need a "Product entity, which represents your main merchandise in webshop". In this case I have multiple products and each one is an entity. Is posible configure multiple cart items for a cart?

Yes, of course. "Product" in documentation is just an example. You can add as many different relations as you wish. It's totally up to you. In my recent project I was handling Product and Package on each CartItem.

Please keep in mind that SyliusCartBundle for 2.3 is slightly different in terms of configuration as we integrated it with existing Order model to avoid duplication. Documentation should be updated very soon.

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