fix scope problems when add item to the basket