frontend.basket.behaviour error if 'y' or 'n'

Posted By Tiggywiggler Wed 20 Jul 2016
Add to Favorites0
Author Message
Tiggywiggler
 Posted Wed 20 Jul 2016
Supreme Being

Supreme Being - (124,378 reputation)Supreme Being - (124,378 reputation)Supreme Being - (124,378 reputation)Supreme Being - (124,378 reputation)Supreme Being - (124,378 reputation)Supreme Being - (124,378 reputation)Supreme Being - (124,378 reputation)Supreme Being - (124,378 reputation)Supreme Being - (124,378 reputation)

Group: Forum Members
Last Active: Mon 6 Dec 2021
Posts: 235, Visits: 750
The description for frontend.basket.behaviour says:

"Determines whether basket addition displays message for number of seconds (if numeric), displays no basket (n) or shows the basket (y)"

which means that this value can be a number, it can be 'y', or it can be 'n'.

Unfortunately in line 341 of ProductVersions.ascx.vb there is a check that does not allow for non numeric values in this config setting.

btnAddVersions3.OnClientClick = "ShowAddToBasketPopup(" & KartSettingsManager.GetKartConfig("frontend.basket.behaviour") * 1000 & ")"

I am struggling to understand the intended use of this line of code so not sure personally how to handle 'y' and 'n' values. I am going to put a work around in my code which will just ignore both cases, but could someone who understands the background to this line of code please add the necessary for those two cases please?

For now I will just wrap it for my application:

If IsNumeric(KartSettingsManager.GetKartConfig("frontend.basket.behaviour")) Then
btnAddVersions3.OnClientClick = "ShowAddToBasketPopup(" & KartSettingsManager.GetKartConfig("frontend.basket.behaviour") * 1000 & ")"
End If


We are always willing to help out the community or pitch in to help you fix a problem. However, if you want a complete solution made such as a code module or new feature added you have two options. Either
1) Reach out to the Kartris internal development team at http://www.kartris.com/Contact.aspx.
2) Contact one of the Kartris approved partners at http://www.kartris.com/t-Worldwide-Developers.aspx.

Have fun and good luck coding.
Paul
 Posted Thu 21 Jul 2016
große Käse

große Käse - (523,700 reputation)große Käse - (523,700 reputation)große Käse - (523,700 reputation)große Käse - (523,700 reputation)große Käse - (523,700 reputation)große Käse - (523,700 reputation)große Käse - (523,700 reputation)große Käse - (523,700 reputation)große Käse - (523,700 reputation)

Group: Administrators
Last Active: Tue 10 Sep 2024
Posts: 807, Visits: 2,748
The options work as follows... a number means that on clicking an 'add to basket' button, you see a popup for that number of seconds showing 'Item added to basket'.

If 'n', no popup is displayed. The only visible cue that something happened is that the basket total changes.

If 'y', the user is taken to the basket on adding an item to it.

I've tested locally and these seem to work, I don't get errors logged. Will have to look for the line you mention when I get time to see if that actually runs - are you hitting a problem with this?


--
If my post solves your issue, can you 'Mark as Answer' so it's easier for other users to find in future.

If you would like to be informed of new features, new releases, developments and occasional special bonuses, please sign up to our mailing list: http://bit.ly/19sKMZb
Tiggywiggler
 Posted Sun 24 Jul 2016
Supreme Being

Supreme Being - (124,378 reputation)Supreme Being - (124,378 reputation)Supreme Being - (124,378 reputation)Supreme Being - (124,378 reputation)Supreme Being - (124,378 reputation)Supreme Being - (124,378 reputation)Supreme Being - (124,378 reputation)Supreme Being - (124,378 reputation)Supreme Being - (124,378 reputation)

Group: Forum Members
Last Active: Mon 6 Dec 2021
Posts: 235, Visits: 750
Yes, it is specifically only hitting on this line, elsewhere checks against the config setting do not create an issue.

We are always willing to help out the community or pitch in to help you fix a problem. However, if you want a complete solution made such as a code module or new feature added you have two options. Either
1) Reach out to the Kartris internal development team at http://www.kartris.com/Contact.aspx.
2) Contact one of the Kartris approved partners at http://www.kartris.com/t-Worldwide-Developers.aspx.

Have fun and good luck coding.

Similar Topics

Expand / Collapse

Reading This Topic

Expand / Collapse

Back To Top