Shop popularity & id autoincrement func