Helpcenter +918010117117 https://cdn1.storehippo.com/s/573db3149f0d58741f0cc63b/ms.settings/5256837ccc4abf1d39000001/57614ef64256dc6851749879-480x480.png" support@storehippo.com https://www.facebook.com/StoreHippohttps://twitter.com/StoreHippohttps://www.linkedin.com/company/hippoinnovations/https://plus.google.com/+Storehippo/posts
B4,309-10 Spaze iTech Park, Sector 49, Sohna Road, 122001 Gurgaon India
call to replace anchor tags contains '/admin' in href

Restrict cart for one seller

Add below code in startup widgets

ms.app.addPrehook({entity: 'ms.carts', command: 'addItem'}, function(req, res, next) {
    if(!(ms.cart  && ms.cart.items && ms.cart.items.length)) return next()
    var checkseller = 'true'
    ms.cart.items.forEach(function(item){
        if(checkseller && item.seller != req.data.seller_id){
            checkseller = false;
            alert("Only one seller items can be purchased at a time")
            return res.error(406 ,"Only one seller items can be purchased at a time");
        }
    })
    if(checkseller) next()
})

Share:

2021-04-15T08:20:14.391Z