If you’re a Digital Business Analyst, this idea will wow your stakeholders.
Why?
Because it will ensure ALL their online customers see how much they have to offer in their store. And increase their average order value by telling their customers how much more they need to spend to qualify for FREE DELIVERY
I created this code myself, but if you’re not into the techie side, you can work closely with your developer and designer to make the banner look and feel the way you wish.
It will look a little bit like this:
The code in the box below needs adding to the wp-content/themes/[your theme]/header.php
file
The code in the box below needs adding to the
$subtotal = WC()->cart->subtotal;
$free_shipping_settings = get_option( 'woocommerce_free_shipping_settings' );
$min_amount = $free_shipping_settings['min_amount'];
$remaining = $min_amount - $subtotal;
if ($subtotal > 0) { ?>
<div class="store-bar"> <?php
echo 'Get FREE delivery if you spend another £';
echo $remaining;
<a href="<?php echo home_url();?>/shop"><b> SEE OFFERS >> </a>
}
?>
</div>
Place the above code after the navigation block of code (shown below):
<?php
wp_nav_menu( array(
'theme_location' => 'primary',
'depth' => 2,
'container' => 'div',
'container_class' => 'collapse navbar-collapse navbar-ex1-collapse',
'menu_class' => 'nav navbar-nav',
'fallback_cb' => 'wp_bootstrap_navwalker::fallback',
'walker' => new wp_bootstrap_navwalker())
);
?>
</div>
</nav><!-- .site-navigation -->
And before the ‘content’ block of code (shown below):
<div id="content" class="site-content container"><?php
global $post;
This takes you to a different screen to configure the free shipping method for that specific shipping zone.
Thanks for your feedback. What are you clicking that takes you to the song options?
Cheers,
Matt