Create a SampleSettingsField.ascx file and add the following markup:
SampleSettingsField.ascx
The SampleSettingsField.ascx file contains the markup for the properties displayed to a user who is configuring your shipping provider in the Shipping method area. The sample SampleSettingsField.ascx file has the following default fields:
Create SampleSettingsField.cs class that inherits FieldControl and add the following code:
SampleSettingsField.cs
FieldControl
Add SampleSettingsField.js file and add the following content:
SampleSettingsField.js
In the code above the javascript validates the controls and sends Sitefinity CMS rhe serialized data that has to be saved in the database. The code also controls the popup that is displayed for each service in the shipping provider.
You need to change the SampleSettingsField.ascx and SampleSettingsField.js files to be Embedded Resources. In your Visual Studio solution, in the cintext menu of the file, click Properties. Change the Build Action property to Embedded Resource.
If you add or remove any fields from the markup file, you will need to modify the code behind file SampleSettingsField.cs and the JavaScript file SampleSettingsField.js.
Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.
This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.
This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.
The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important