var AgentFy = (function () { var agentfy_data = []; var init = async function (callback = '') { $.ajax({ method: 'post', url: 'index.php?route=agentfy/startup/getData', data: '', dataType: 'json', success: function (json) { agentfy({ agentId: json['agentId'], ...json['options'], header: { color: "#05B6F0", textColor: "#FFFFFF", closeButton: "style2" }, promotion: { url: "https://www.opencart.com/index.php?route=marketplace/extension/info&extension_id=46749" }, footer: { input: { placeholder: "Ask anything..." }, button: { color: "#05B6F0" } }, questions: [ "What is the best quick checkout Extension?", "How to install OpenCart?", "What are the benefits of using OpenCart Cloud?", "How to improve my SEO?" ], button:{ title: "Chat AI", icon: "Sparkles", color: "#01afe8", animation: "ping", size: "sm", type: "rounded", shadow: "md", }, }) }, error: function (xhr, ajaxOptions, thrownError) { console.log(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText); } }); }; return { init: init }; }()); window.addEventListener('load', function () { AgentFy.init(); });