Problem with selecting address when I do checkout

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
5 anni tempo fa
I am having strange problem with my checkout process. When I want to select anaddress(arleady created), there is a javascript error: selectBillingAddress89 is not defined. This is not always happening, if I reload it may work or it will pop the same error.  Site was working perfectly fine for 2 months.

Any ideas what can cause this problem?
5 anni tempo fa
so that function is defined in BillingAddress.cshtml (see below).  

I recommend hitting F12 to open your browser's developer tools, click the Debugger tab, then search the BillingAddress tab for "selectBillingAddress89" to see how it's defined.  You can also set break points in there to compare to how other address functions are defined.


<script asp-location="Footer">
    function selectBillingAddress@(item.Id)() {
        if ($('#@Html.IdFor(model => model.ShipToSameAddress)')
            .is(':checked')) {
            setLocation(
                '@Html.Raw(Url.RouteUrl("CheckoutSelectBillingAddress", new {addressId = item.Id, shipToSameAddress = "true"}))');
        } else {
            setLocation(
                '@Url.RouteUrl("CheckoutSelectBillingAddress", new {addressId = item.Id})');
        }
    }
</script>
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.