Cart rewrite