Please open advanced-woo-search/assets/js/common.js file, find lines
resultLayout: function () {
var $resultsBlock = $( d.resultBlock );
var offset = self.offset();
var bodyOffset = $('body').offset();
var bodyPosition = $('body').css('position');
var bodyHeight = $(document).height();
var resultsHeight = $resultsBlock.height();
if ( offset && bodyOffset ) {
var width = self.outerWidth();
var top = 0;
var left = 0;
if ( bodyPosition === 'relative' || bodyPosition === 'absolute' || bodyPosition === 'fixed' ) {
top = offset.top + $(self).innerHeight() - bodyOffset.top;
left = offset.left - bodyOffset.left;
} else {
top = offset.top + $(self).innerHeight();
left = offset.left;
}
if ( bodyHeight - offset.top < 500 ) {
resultsHeight = methods.getResultsBlockHeight();
if ( ( bodyHeight - offset.top < resultsHeight ) && ( offset.top >= resultsHeight ) ) {
top = top - resultsHeight - $(self).innerHeight();
}
}
$resultsBlock.css({
width : width,
top : top,
left: left
});
}
},
and replace with
resultLayout: function () {
var $resultsBlock = $( d.resultBlock );
var offset = self.offset();
var bodyOffset = $('body').offset();
var bodyPosition = $('body').css('position');
var bodyHeight = $(document).height();
var resultsHeight = $resultsBlock.height();
if ( offset && bodyOffset ) {
var styles = {
width: self.outerWidth(),
top : 0,
left: 0
};
if ( bodyPosition === 'relative' || bodyPosition === 'absolute' || bodyPosition === 'fixed' ) {
styles.top = offset.top + $(self).innerHeight() - bodyOffset.top;
styles.left = offset.left - bodyOffset.left;
} else {
styles.top = offset.top + $(self).innerHeight();
styles.left = offset.left;
}
if ( bodyHeight - offset.top < 500 ) {
resultsHeight = methods.getResultsBlockHeight();
if ( ( bodyHeight - offset.top < resultsHeight ) && ( offset.top >= resultsHeight ) ) {
styles.top = styles.top - resultsHeight - $(self).innerHeight();
}
}
// @since 2.10
styles = AwsHooks.apply_filters( 'aws_results_layout', styles, { resultsBlock: $resultsBlock, form: self } );
$resultsBlock.css( styles );
}
},
Also please use following code snippet
add_action( 'wp_footer', 'storefront_footer_action' );
function storefront_footer_action() { ?>
<script>
window.addEventListener('load', function() {
function aws_results_layout( styles, options ) {
if ( typeof jQuery !== 'undefined' ) {
var $storefrontHandheld = options.form.closest('.storefront-handheld-footer-bar');
if ( $storefrontHandheld.length ) {
if ( ! $storefrontHandheld.find('.aws-search-result').length ) {
$storefrontHandheld.append( options.resultsBlock );
}
styles.top = 'auto';
styles.bottom = 130;
}
}
return styles;
}
if ( typeof AwsHooks === 'object' && typeof AwsHooks.add_filter === 'function' ) {
AwsHooks.add_filter( 'aws_results_layout', aws_results_layout );
}
}, false);
</script>
<style>
.storefront-handheld-footer-bar .aws-search-result ul li {
float: none !important;
display: block !important;
text-align: left !important;
}
.storefront-handheld-footer-bar .aws-search-result ul li a {
text-indent: 0 !important;
text-decoration: none;
}
</style>
<?php }
You need to add it somewhere outside the plugins folder. For example, inside functions.php file of your theme or use some plugin for adding code snippets.