Mastering PrestaShop 9 Hummingbird Footer Customization

Mastering PrestaShop 9 Hummingbird Footer Customization

As an e-commerce platform, PrestaShop offers extensive customization options, especially with its latest versions and themes. The default Hummingbird theme in PrestaShop 9.1 brings a modern look, but often, merchants want to tailor it to perfectly match their brand identity. One common customization request is changing the footer background color. While seemingly straightforward, the introduction of Bootstrap CSS variables in newer PrestaShop themes can sometimes pose a challenge for those accustomed to direct CSS edits.

This community insight, drawn from a recent PrestaShop forum discussion, delves into the exact steps and best practices for modifying your PrestaShop 9 Hummingbird theme's footer background color, ensuring your changes are robust and update-proof.

The Challenge: Understanding Bootstrap Variables in PrestaShop 9

A PrestaShop user, Bennie-NL, encountered a common hurdle when trying to change the footer background color in their PrestaShop 9.1 store running the Hummingbird theme. Familiar with traditional CSS, they correctly identified the relevant CSS selector for the footer:

.footer__main{background:var(--bs-dark);color:var(--bs-gray-300)}

The confusion arose from the var(--bs-dark) declaration. This isn't a direct hex color or standard CSS color name, but rather a CSS custom property (often called a CSS variable) inherited from Bootstrap. Direct attempts to override this within theme.css or by guessing Bootstrap color codes proved unsuccessful, highlighting a key difference in modern theme customization.

The Solution: Safe CSS Overrides and Best Practices

The expert advice provided in the forum thread clarifies that while Bennie-NL was indeed looking in the right place, the method of applying the change needed adjustment. The core principle for modern PrestaShop theme customization, especially with the Hummingbird theme, is to avoid direct modification of core theme files like theme.css. This is crucial because any future theme updates could overwrite your custom changes, leading to lost work and potential display issues.

The recommended, safer approach involves using a dedicated custom CSS file. For the Hummingbird theme, PrestaShop provides a specific location for such overrides:

  • /themes/hummingbird/assets/css/custom.css

Even better, if you are using a child theme (which is highly recommended for any significant theme modifications), you would place your custom CSS within your child theme's custom.css file. This ensures maximum compatibility and future-proofing.

Implementing the Footer Color Change

To change the footer background color to a specific hex code, for example, #00597b, you would add the following CSS to your custom.css file:

.footer__main {
    background: #00597b;
}

Furthermore, to ensure readability, it's often necessary to adjust the text and link colors within the footer as well. The following snippet demonstrates how to set a white color for both the general text and any links within the footer:

.footer__main {
    background: #00597b;
    color: #ffffff; /* Sets general text color */
}
.footer__main a {
    color: #ffffff; /* Ensures links are also white */
}

Crucial Post-Modification Steps

After saving your changes to custom.css, it's vital to clear the PrestaShop cache. This can be done by navigating to Advanced Parameters → Performance in your PrestaShop back office and clicking "Clear cache". Additionally, a hard refresh of your browser cache (e.g., Ctrl+F5 or Cmd+Shift+R) is often necessary to ensure the browser loads the latest CSS files and displays your changes correctly.

Migrate My Shop's Takeaway

This thread highlights a common transition point for PrestaShop users moving to newer versions or themes. Understanding how modern themes leverage frameworks like Bootstrap and utilize CSS variables is key to effective customization. Always prioritize using custom CSS files or child themes for modifications to protect your store from theme updates. For complex migrations or deep theme customizations, consulting with e-commerce experts can save significant time and ensure a seamless online store experience.

Whether you're migrating from an older PrestaShop version or simply looking to refine your current store's appearance, adopting these best practices will lead to a more stable and maintainable e-commerce setup.

Start with the tools

Explore migration tools

See options, compare methods, and pick the path that fits your store.

Explore migration tools