Hi, I'm wondering if theres a way to get any coupon codes in the basket to remove if the basket is empty or the customer logs out. I cant find any info on how they are set to expire, I assume its a cookie.
Announcement
Collapse
No announcement yet.
Remove coupon code if customer logs out or if basket is empty
Collapse
X
-
Baskets expire after a certain amount of time with no activity by the shopper. The expiration time is controlled by an admin setting. The default setting is 60 minutes, but some store owners make it longer -- hours, or even days -- so that shopper's basket contents will remain for a longer time.
Kent Multer
Magic Metal Productions
http://TheMagicM.com
* Web developer/designer
* E-commerce and Miva
* Author, The Official Miva Web Scripting Book -- available on-line:
http://www.amazon.com/exec/obidos/IS...icmetalproducA
-
Certianly doable. There are a bunch of Basket/Coupon functions in the API docs https://docs.miva.com/api-functions.Bruce Golub
Phosphor Media - "Your Success is our Business"
Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
phosphormedia.com
Comment
-
I suspect that function (since its using an 'id' parameter) needs to be inside a loop that is generating a list of coupons. Try using:
<mvt:do file="g.Module_Feature_PGR_DB" name="l.success" value="BasketCoupon_Delete_All_Basket(g.basket:bas ket_id)" />
(Note, have not specifically used this function before--at least not in templates so...)
Probably put this in the "Empty Basket" section.Bruce Golub
Phosphor Media - "Your Success is our Business"
Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
phosphormedia.com
Comment
Comment