cart buttons related refactoring