The content you're reading is getting on in years
This post is on the older side and its content may be out of date.
Be sure to visit our blogs homepage for our latest news, updates and information.
Below are the steps you would follow when creating a digital download in the Sitefinity backend.
Step 1) Create a Product Type and assign the type as a “Downloadable product”. You can add fields for this product type such as the artist, author, ISBN, manufacturer, number of pages, etc…
Step 2) Create a product based on the product type just created.
Add a new product and select the “File to Download” button. Select the file from their local computer or use a file which has already been uploaded and attach it to the product.
Once completed, the file is then saved into the system folder library and attached to the product.
Upon successful purchase by the customer, the customer can go to their My Account page to download the digital file.
The Pre-Processing hook provides the ability for a developer to cancel an order based on a custom order processing rule. You can create a custom rule to cancel the order if the order did pass certain pre-defined rules. For example, you may want to check the inventory quantity from an ERP system before you communicate with the payment gateway. The OrderValidator class allows you the ability to show a Friendly Error Message on why an order did not go through.
(The pre-processing hook compliments our post-processing hook which was released in version 4.4. With the post-processing hook, a call can be made to a CRM or ERP system transmitting the successful order information automatically into a 3rd party system.)
Documentation article(s) / Extension sample(s):
Add a Global.asax file then add the code below in a cs file
Protected void Application_Start(object sender, EventArgs e){Bootstrapper.Initialized += new EventHandler<Telerik.Sitefinity.Data.ExecutedEventArgs>(Bootstrapper_Initialized);
}void Bootstrapper_Initialized(object sender, Telerik.Sitefinity.Data.ExecutedEventArgs e){if (e.CommandName == "Bootstrapped"){EcommerceEvents.PreProcessOrder += new EcommerceEvents.OnPreProcessOrder(EcommerceEvents_PreProcessOrder);
}}OrderValidator EcommerceEvents_PreProcessOrder(Guid cartOrderId, CheckoutState checkoutState, Customer customer){bool isOrderValid = DateTime.Now.Second % 2 == 0;
OrderValidator orderValidator = new OrderValidator
{IsOrderValid = isOrderValid,StatusMessage = "Order failed because of my custom rule"
};return orderValidator;
}
If the site is multilingual then the attributes/values can also be shown another languages.
Follow the steps below to create a multilingual variation:
Step 1) Administration->Settings, click the Languages on the left nav.
Step 2) Go to Ecommerce->Attributes
Step 3) View the attributes
Click “ES” adding the Spanish version, then enter the Spanish name for the Attribute:
Then add the values in the second language:
Once you’ve translated the attributes/values then you can view the product and the variations on the store front.
Here is a screen shot in English
Here is the screen shot in Spanish
(The pages, product, templates all need to be translated)
View all posts from The Progress Team on the Progress blog. Connect with us about all things application development and deployment, data integration and digital business.
Let our experts teach you how to use Sitefinity's best-in-class features to deliver compelling digital experiences.
Learn MoreSubscribe to get all the news, info and tutorials you need to build better business apps and sites
Progress collects the Personal Information set out in our Privacy Policy and the Supplemental Privacy notice for residents of California and other US States and uses it for the purposes stated in that policy.
You can also ask us not to share your Personal Information to third parties here: Do Not Sell or Share My Info
We see that you have already chosen to receive marketing materials from us. If you wish to change this at any time you may do so by clicking here.
Thank you for your continued interest in Progress. Based on either your previous activity on our websites or our ongoing relationship, we will keep you updated on our products, solutions, services, company news and events. If you decide that you want to be removed from our mailing lists at any time, you can change your contact preferences by clicking here.