// This section sets up on the extension page on the storefront a check box for users to turn on or off debug mode public override int GetConfigurationHtml(KeyValuePair[] parameters, out string HTML_configString) { // Load and check if we already have a parameter set LoadModuleDataFromParams(parameters); // If not then we setup one if (parameters == null) { SConfigHTMLBuilder sconfigHtmlBuilder = new SConfigHTMLBuilder(); sconfigHtmlBuilder.AddHeader(); sconfigHtmlBuilder.AddServicesHeader(); // Add checkbox to let user turn on and off debug mode sconfigHtmlBuilder.AddCheckboxField("Debugging Information", _SADEBUGGINGMODE, "true", "false", (string)ModuleData[_SADEBUGGINGMODE] == "true"); sconfigHtmlBuilder.AddTip(@"This box should be checked if you wish for debugging information to be output to the Logs."); sconfigHtmlBuilder.AddServicesFooter(); HTML_configString = sconfigHtmlBuilder.html; } // If we do then move along else { SaveModuleData(); HTML_configString = null; } return(0); }
// This section sets up on the extension page on the storefront a check box for users to turn on or off debug mode and text fields to get logon info for DB and Avalara public override int GetConfigurationHtml(KeyValuePair[] parameters, out string HTML_configString) { // Load and check if we already have a parameter set LoadModuleDataFromParams(parameters); // If not then we setup one if (parameters == null) { SConfigHTMLBuilder sconfigHtmlBuilder = new SConfigHTMLBuilder(); sconfigHtmlBuilder.AddHeader(); // Add checkbox to let user turn on and off debug mode sconfigHtmlBuilder.AddServicesHeader("Debug Mode:", ""); sconfigHtmlBuilder.AddCheckboxField("Debugging Information", _AT_DEBUGGING_MODE, "true", "false", (string)ModuleData[_AT_DEBUGGING_MODE] == "true"); sconfigHtmlBuilder.AddTip(@"This box should be checked if you wish for debugging information to be output to the Logs."); // Add textboxes to get the DB login info sconfigHtmlBuilder.AddServicesHeader("DataBase Logon Info:", ""); sconfigHtmlBuilder.AddTextField("DataBase Data Source", _DATA_SOURCE, (string)ModuleData[_DATA_SOURCE], true, true, ""); sconfigHtmlBuilder.AddTip(@"This field should contain the path that the deployment can be found with. <br>        Example for a site deployed on dev: 172.18.0.67\pageflexdev"); sconfigHtmlBuilder.AddTextField("DataBase Initial Catalog", _INITIAL_CATALOG, (string)ModuleData[_INITIAL_CATALOG], true, true, ""); sconfigHtmlBuilder.AddTip(@"The field should contain the name used to reference this storefront's Database. <br>        Example for a site deployed on dev: Interface"); sconfigHtmlBuilder.AddTextField("DataBase User ID", _USER_ID, (string)ModuleData[_USER_ID], true, true, ""); sconfigHtmlBuilder.AddTip(@"This field should contain the User ID for logging into the storefront's database"); sconfigHtmlBuilder.AddPasswordField("DataBase User Password", _USER_PASSWORD, (string)ModuleData[_USER_PASSWORD], true, true, ""); sconfigHtmlBuilder.AddTip(@"This field should contain the Password for logging into the storefront's database"); // Add textboxes to get the Avalara login info sconfigHtmlBuilder.AddServicesHeader("Avalara Logon Info:", ""); sconfigHtmlBuilder.AddTextField("Avalara Company Name", _AV_COMPANY_NAME, (string)ModuleData[_AV_COMPANY_NAME], true, true, ""); // Added spacing is to ensure that the textboxes for this and DB logon section are aligned sconfigHtmlBuilder.AddTip(@"This field should contain the name of the company on the Avalara Site              "); sconfigHtmlBuilder.AddTextField("Avalara Company Code", _AV_COMPANY_CODE, (string)ModuleData[_AV_COMPANY_CODE], true, true, ""); sconfigHtmlBuilder.AddTip(@"The field should contain the company code used on the Avalara Site"); sconfigHtmlBuilder.AddTextField("Avalara User ID", _AV_USER_ID, (string)ModuleData[_AV_USER_ID], true, true, ""); sconfigHtmlBuilder.AddTip(@"This field should contain the User ID for logging into the Avalara Site"); sconfigHtmlBuilder.AddPasswordField("Avalara Password", _AV_USER_PASSWORD, (string)ModuleData[_AV_USER_PASSWORD], true, true, ""); sconfigHtmlBuilder.AddTip(@"This field should contain the Password for logging into the Avalara Site"); // Footer info and set to configstring sconfigHtmlBuilder.AddServicesFooter(); HTML_configString = sconfigHtmlBuilder.html; } // If we do then move along else { SaveModuleData(); HTML_configString = null; } return(0); }
// This section sets up on the extension page on the storefront a check box for users to turn on or off debug mode and text fields to get logon info for DB and Avalara public override int GetConfigurationHtml(KeyValuePair[] parameters, out string HTML_configString) { // Load and check if we already have a parameter set LoadModuleDataFromParams(parameters); // If not then we setup one if (parameters == null) { SConfigHTMLBuilder sconfigHtmlBuilder = new SConfigHTMLBuilder(); sconfigHtmlBuilder.AddHeader(); // Add checkbox to let user turn on and off debug mode sconfigHtmlBuilder.AddServicesHeader("Debug Mode:", ""); sconfigHtmlBuilder.AddCheckboxField("Debugging Information", _SA_DEBUGGING_MODE, "true", "false", (string)ModuleData[_SA_DEBUGGING_MODE] == "true"); sconfigHtmlBuilder.AddTip(@"This box should be checked if you wish for debugging information to be output to the Storefront's Logs Page. <br>        Whether this box is checked or not, the extension will log to a .txt file saved to the site's deployment folder."); sconfigHtmlBuilder.AddTip(@"* Make sure the 'Logs/Storefront_Analytics_Extension_Logs' folders have been created to hold the .txt files as the extension will crash without it *"); // Add textboxes to retrieve the setup variables for setting up Storefront Analytics sconfigHtmlBuilder.AddServicesHeader(); sconfigHtmlBuilder.AddTextField("Link Name", _SA_LINK_NAME, (string)ModuleData[_SA_LINK_NAME], true, true, ""); sconfigHtmlBuilder.AddTip(@"This field should contain the name that will appear on the button link for the analytics site."); sconfigHtmlBuilder.AddTextField("Storefront Name", _SA_STOREFRONT_NAME, (string)ModuleData[_SA_STOREFRONT_NAME], true, true, ""); sconfigHtmlBuilder.AddTip(@"The field should contain the name used to reference this storefront in the Storefront Analytics Web App."); sconfigHtmlBuilder.AddTextField("Storefront Analytics Domain", _SA_DOMAIN, (string)ModuleData[_SA_DOMAIN], true, true, ""); sconfigHtmlBuilder.AddTip(@"This field should contain the domain of the analytics site. This will likey differ between development and production instances of the storefronts and the analytics site."); sconfigHtmlBuilder.AddTip(@"The domain should be in the form 'www.somedomain.com'."); // This is for adding a second link to the site for a different report sconfigHtmlBuilder.AddServicesHeader("Optional Second Button:", ""); sconfigHtmlBuilder.AddCheckboxField("Show Second Button on Storefront", _SA_ADD_LINK_TWO_FLAG, "true", "false", (string)ModuleData[_SA_ADD_LINK_TWO_FLAG] == "true"); sconfigHtmlBuilder.AddTip(@"This box should be checked if you wish for the Second Button to be added to the nav bar."); sconfigHtmlBuilder.AddTextField("Link Two Name", _SA_LINK_NAME_TWO, (string)ModuleData[_SA_LINK_NAME_TWO], true, true, ""); sconfigHtmlBuilder.AddTip(@"This field should contain the name that will appear on the second button."); sconfigHtmlBuilder.AddTextField("Link Two URL", _SA_LINK_TWO_URL, (string)ModuleData[_SA_LINK_TWO_URL], true, true, ""); sconfigHtmlBuilder.AddTip(@"This field should contain the URL for the second button link."); // Footer info and set to configstring sconfigHtmlBuilder.AddServicesFooter(); HTML_configString = sconfigHtmlBuilder.html; } else { SaveModuleData(); HTML_configString = null; } return(0); }