Shopping cart code & tests
Cherry Pick JN code
Sync to JN's version