I have a module where is defined function getShippingCost() that calculated the shipping cost for a specific country.
When I am on product details page, shipping costs are displayed under the price properly. So, I added the piece of code to the minibasket, because I wanted to display shipping costs also there, but they’re displayed properly only when I am on product details page.
If I try to open home page or next step for payment, website is going down with error message: function getShippingCost() is not accessible.
Any help how to access the function correctly?
Thank you.