Adding products to cart from url

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
2 года назад
Hi guys,

what i have: added view to nop 4.3 which has product ids and amounts from an external url to add to cart. Adding pairs to cart table via sql insert works fine but mini Cart is not updated,

How is it possible to call AddToCart Function from the view to add customer id, product id, & amount to Cart including Mini Cart Update?

Thanks for any hints on this.
2 года назад
Hello Mini cart in the sense of  "flyout-cart" as we can say
https://prnt.sc/1vqpiyr

Check the view component
FlyoutShoppingCartViewComponent
PrepareMiniShoppingCartModel
so you need to update the above methods and refresh to the page or using ajax to update the things

For more detail check the view component
https://prnt.sc/1vqpsl1

Hope this will help you
2 года назад
Hi,

thanks for quick answer!

https://prnt.sc/1vqpiyr
yes

Like to follow your suggestion to use ajax.
Stuck on this. Could you please refer / to a script sample how to use the ajax addtocart in a view?

  ​:-)
2 года назад
yes sure , where you stuck if possible please share snipped of code so I can give suggestion according to that
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.