Shifted SaleLine cart data into `serialize()` method. #6409

1. A method call now returns SaleLine data for each line in cart.
2. Added test.
in product