$jsSrc .= ",\n\t flyToCart: '" . $shkconf['flyToCart'] . "'"; } if (!$shkconf['linkAllow']) { $jsSrc .= ",\n\t linkAllow: false"; } if ($shkconf['style']) { $jsSrc .= ",\n\t style:'" . $shkconf['style'] . "'"; } if ($shkconf['noLoader']) { $jsSrc .= ",\n\t noLoader: true"; } if ($shkconf['debug']) { $jsSrc .= ",\n\t debug: true"; } if ($shkconf['cartHelperTpl']) { $helperChunk = preg_split("/[\r\n]+/", trim($shopCart->fetchTpl($shkconf['cartHelperTpl']))); $helperStr = ''; for ($i = 0; $i < count($helperChunk); $i++) { $plus = $i == 0 ? '' : '+'; $helperStr .= "{$plus}'" . trim($helperChunk[$i]) . "'\n"; } $jsSrc .= ",\n\t shkHelper: {$helperStr}"; } $jsSrc .= "\n\t};\r\n jQuery(document).ready(function(){\r\n jQuery(shkOptions.stuffCont).shopkeeper();\r\n });"; $jsSrc .= "\n\t//-->\n\t</script>"; $jsSrc .= "\r\n <script src=\"" . SHOPKEEPER_URL . "lang/" . $shkconf['lang'] . ".js\" type=\"text/javascript\"></script>\r\n <script src=\"" . SHOPKEEPER_URL . "js/jquery.livequery.js\" type=\"text/javascript\"></script>\r\n <script src=\"" . SHOPKEEPER_URL . "js/shopkeeper.js\" type=\"text/javascript\"></script>\r\n "; if ($shkconf['debug']) { $jsSrc .= "\r\n <script src=\"" . SHOPKEEPER_URL . "js/log4javascript.js\" type=\"text/javascript\"></script>\r\n <script src=\"" . SHOPKEEPER_URL . "js/shkdebug.js\" type=\"text/javascript\"></script>"; } $modx->regClientScript($jsSrc); }