The anomaly is two FA icons (carat) in each button, opposed to one. This only happens when I use this store with Foundry.
I think it might be due to class used: The store script uses the class .nav for these items, and although it does “scope” the class to only the script, I’m thinking maybe Foundry uses the same class and is somehow adding another carat?
Foundry uses the nav classname. All of Bootstrap does. My first step in troubleshooting would be to rework your custom code to avoid that naming convention. Likewise I see it is using nav-pills as a class name. This is also a part of Bootstrap.
My best guess is wherever you got the custom code, it used Bootstrap of some sort for some of its styling. Either that or it just happened to use the same naming conventions.
OK, thanks for that. You are right, the store script does use Bootstrap CSS, it never occurred to me, but ya, that’ll be the issue.
It’s not feasible to have the store script rewritten (I’ve just had hundreds if euros of customisation done to it, can’t afford more!), so I’ll live with it. It’s not that big a deal. I’ve had a few Foundry sites using this script for years now and no one (including me I’m ashamed to say!) have ever picked up on the double icon thing. It’s only now as I’m building a new site with Foundry and the script that I’ve finally spotted it.
I’ll just tell anyone that asks it a special feature
I believe it only loads the CSS it uses. I do recall a conversation with the writers (PHPjabber) some time ago about Bootstrap, and I’m sure they said something along those lines. I think the gist of it was they do use some bootstrap code and classes, but they’ve only added those needed to the script, opposed to pulling it all in. The same goes for the additional stuff like JS and JQ etc. That is my understanding, although that conversation was some years back, so I may be remembering it how I want!
But saying that, the potential for double loading is one of the downsides of using scripts like this. The upside of a really solid online store is worth the trade-off though.
Even if they’re only loading what they need, that needed code is still duplicated. And it is likely that their Bootstrap code and Foundry’s are different. My guess is it isn’t a lot of extra code though. Just some things to think about, that’s all.
Ya, it’s a trade off. These scripts are designed to work with pretty much anything, even stand alone. So nature of the beast is there is going to be some duplication.
As you say though, it’s not much, and given its a store script that is going to load at least a dozen or so images on page load, I’d say it’s pretty negligible in the scheme of things.
Top job! I looked at that and thought… “That’s gonna remove both carats”, but nope, you’re a smarter man than me, it worked perfectly; removing just the one.
Many thanks.
might still have a crack at editing the classes though, and if that all goes wrong I’ll blame Adam