Weird anomoly with a PHP Script and Foundry: Double indicators on menu items

This is a real “corner-case” issue i appreciate, but it’s only happening with Foundry, so I’m hoping the cause is obvious and the fix easy.

This is the page: Store | Parts 4 Motorhomes

This is a regular Foundry page with the additional on my usual online store script (that’s the bit product for sale etc.)

The category menu for the store is this bit…

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?

I wonder if anyone or @elixirgraphics has any ideas?

What are the steps you’ve used thus far to troubleshoot it?

Not an enormous amount really, as I think I’m rather limited in what I do. I have been able to narrow it down to the Control Centre stack though.

Here are two test pages, with and without the Control Centre stack, both with the Foundry theme.

Without the CC stack: Foundry | Simple Store

And with it: Foundry Copy | Simple Store

Beyond that, I’m at a bit of a loss as to where to go with it. Happy to take instruction etc.

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.

1 Like

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 :wink:

Cheers,

1 Like

I bet you could customize the script yourself. I believe in you!

2 Likes

You massively overestimate me :wink:

But… Can you give me a pointer: What would I need to change? Feel free to be as brief or detailed as you want!

1 Like

I’d have to see their code specifically. You’d have to alter the class names it is applying.

OK, that’s enough to go on. I’ll give it a look sometime. Thanks.

One other thing to also think about – if your script uses bootstrap, you’re likely loading a double dose of Bootstrap CSS and JS.

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. :+1:

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.

Try this:

a.dropdown-toggle span.caret {
    display:none !important;
}
2 Likes

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 :wink:

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.