refactor-extract function at cart.js
refactor-extract function at cart.js