Added and edited functions for mini cart functionality