kartrisimport

4.1.4.5. Custom control product

In some cases, none of the built-in Kartris product types will suit your purposes. A typical example would be a site producing bespoke curtains or signage. You would need the user to enter a height and width (which could for example be anything in mm between 30 and 3000). Options would be impractical as you'd need to create every option between 30 and 3000. Furthermore, height and width values would both be required to calculate the area of fabric needed, and then the price - but option prices can only apply to a single option selection.

Fortunately, if you're familiar with ASP.NET, it is possible to create virtually any type of product configurator and plug it into Kartris. This is done by creating a custom user control that contains all the logic needed to price and detail a product. Examples of the kind of thing that is possible with a custom user control:
  • A product configurator for signage, with choice of materials, prices/m2 and all other data pulled from an Excel spreadsheet
  • A product configurator for insurance policies which uses an XML web service to pull pricing from another remote web site
  • A product configurator which uses a formula to calculate the price of the item based on the various values entered
Kartris includes a couple of sample custom controls to illustrate the kind of coding required. These can be found within the default install of Kartris at this location:

UserControls/Custom/

To link a product to a custom control, you should create a single version product. The price can be zero, assuming that you will calculate this within your custom control. You then need to go to the 'object config' and enter the name of your new custom user control, which itself must be placed in the UserControls/Custom folder.
 
powered by tomehost