Struggling to survive, e-commerce reinvents itself