<?php

use Olegnax\Athlete2\Helper\Helper;

/** @var Helper $_helper */
$_helper = $this->helper(Helper::class);
$scriptString = '';
if ('1' == $_helper->getModuleConfig('products_listing/catalog_ajax_add_to_cart')) {
    $scriptString .= 'window.OXNAjaxCatalog = true;';
}

if ('1' == $_helper->getModuleConfig('products_listing/show_minicart_after_added_product')) {
    $scriptString .= 'window.OXAjaxNShowMCart = true;';
}
if (!empty($scriptString)) {
    if (isset($secureRenderer)){
        echo /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false);
    } else{
        echo sprintf('<script>%s</script>', $scriptString);
    }
} 
?>