Log in to support

How to override the Cart/Checkout help bar

How to override the Cart/Checkout help bar
December 4, 2013 Swift Ideas - Ed

If you’d like to override the cart/checkout help bar that can be seen in cart/checkout pages at the top, you can add the following to your child theme functions.php file:

function sf_woo_help_bar() {
$options = get_option('sf_dante_options');
?>
<div class="help-bar clearfix">
<span><?php echo do_shortcode($options['help_bar_text']); ?></span>
<ul>
<li><a href="#email-form" class="inline" data-toggle="modal"><?php _e("Email customer care", "swiftframework"); ?></a></li>
<li><a href="#shipping-information" class="inline" data-toggle="modal"><?php _e("Shipping information", "swiftframework"); ?></a></li>
<li><a href="#returns-exchange" class="inline" data-toggle="modal"><?php _e("Returns & exchange", "swiftframework"); ?></a></li>
<li><a href="#faqs" class="inline" data-toggle="modal"><?php _e("F.A.Q.'s", "swiftframework"); ?></a></li>
</ul>
</div>

<div id="email-form" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="email-form-modal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="ss-delete"></i></button>
<h3 id="email-form-modal"><?php _e("Email customer care", "swiftframework"); ?></h3>
</div>
<div class="modal-body">
<?php echo do_shortcode($options['email_modal']); ?>
</div>
</div>
</div>
</div>

<div id="shipping-information" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="shipping-modal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="ss-delete"></i></button>
<h3 id="shipping-modal"><?php _e("Shipping information", "swiftframework"); ?></h3>
</div>
<div class="modal-body">
<?php echo do_shortcode($options['shipping_modal']); ?>
</div>
</div>
</div>
</div>

<div id="returns-exchange" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="returns-modal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="ss-delete"></i></button>
<h3 id="returns-modal"><?php _e("Returns & exchange", "swiftframework"); ?></h3>
</div>
<div class="modal-body">
<?php echo do_shortcode($options['returns_modal']); ?>
</div>
</div>
</div>
</div>

<div id="faqs" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="faqs-modal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="ss-delete"></i></button>
<h3 id="faqs-modal"><?php _e("F.A.Q.'s", "swiftframework"); ?></h3>
</div>
<div class="modal-body">
<?php echo do_shortcode($options['faqs_modal']); ?>
</div>
</div>
</div>
</div>

<?php }

You can edit the button titles, or whatever you like.

– Ed

Comments (2)

  1. Kandydat 3 years ago

    Hi there would you mind letting me know
    which web host you’re using? I’ve loaded your blog in 3 different internet browsers and I must say
    this blog loads a lot quicker then most. Can you recommend a good internet hosting provider at a honest price?

    Cheers, I appreciate it!

    • Author
      Swift Ideas - Ed 3 years ago

      Hi there,

      We use wpengine.com – can’t recommend them enough!

      – Ed

Leave a reply

Your email address will not be published. Required fields are marked *

*