I am designing online grocery mobile application, I do not know what is the best location to put the shopping cart icon in the app bar or in the bottom tab bar. Much of applications and website put the shopping cart in the top left of the screen but some have redesigned the app and put it in
Whenever you have to include some widely used functionnalities like the cart system, I think it is in your interest to stick to the mental model of your users.
Where do your users think the cart is whenever they have added an item to their cart?
Cheaper option is to browse a couple of apps similar to yours and notice where did they chose to place it.
Better option is to run a design walkthrough test on 3 to 5 participants and specifically ask this question when they have just added an item. The discussions you will have with these tests will help you understand your users better and make a rationale design choice.
I would also recommend including some micro-interaction to hint where the item is going.
It is difficult to give a straight answer as it depends on various elements (webapp or native, mobile system, type of shopping...). Yet, I hope I have managed to give you a clear idea on how to get these answers.