Hi everyone,
I’m developing a project with Sylius, i want to make a rental system.
At this time I have already added a lot of features to my project, but currently I am facing a problem.
I extended the OrderItem entity to add two fields : startReservationDate and endReservationDate.
Now, I can select a product, choose quantity and chose date range.
However, if a customer wishes to book the same product for two different date ranges, it doesn’t create another OderItem entity, this simply updates the quantity of the product already in the cart.
What I want is that if the two fields startReservationDate and endReservationDate are different for the same product already in cart, a new line in the cart is generated.
I’m new to Symfony and Sylius and I don’t really know what to do. I think it might be related to OrderModifier but it is a final class which implements OrderModifierInterface. Also, I don’t think I’ve read anything on the documentation that could help me with this. If anyone can help me.
Thanks in advance