<%temp_shopping_wishlist_add_handle=site.object_p%>
<!-- object[<%=site.object_p%>]::temp_shopping_wishlist_add_handle -->
<%
if not site.check.isInteger(request("id")) then
site.Error.info="意外错误！"
site.Error.location="back"
site.Error.err()
end if

site.object(site.object_p).rs.open "select * from jins_customer_wishlist_list where customer_name='"&site.temp.customer.info.reg_name&"' and goods_id="&int(request("id"))&" ",conn,1,3

if site.object(site.object_p).rs.eof then
	site.object(site.object_p).rs.addnew
	site.object(site.object_p).rs("customer_name")=site.temp.customer.info.reg_name
	site.object(site.object_p).rs("customer_wishlist_addtime")=now()
	site.object(site.object_p).rs("goods_id")=request("id")
	site.object(site.object_p).rs("goods_num")=1
else
	site.object(site.object_p).rs("goods_num")=site.object(site.object_p).rs("goods_num")+1
end if

site.object(site.object_p).rs.update
site.object(site.object_p).rs.close
set site.object(site.object_p).rs=nothing

site.Error.info="添加商品到收藏夹成功！"
site.Error.location="do.asp?tr=shopping|wishlist"
site.Error.suc()
%>