Product Options Prefix Characters

If you are upgrading from an older version of Kentico CMS, you may notice the product options show a set of predefined prefix characters before the price.  This article will describe the simple change in order to remove or change these prefix characters.
The default set of prefix characters for version 7.x are defined as either the plus or minus characters, depending on if the product option increases or decreases the price as seen in the screenshot below:

If you want to remove the plus or minus character, or add your own set of characters you can edit the ~\App_Code\CMSModules\Ecommerce\ProductOptionSelector.cs file and edit the code below which can be found on line 636:
Default code:
string preffix = (price >= 0) ? "+ " : "- ";

Modified code to remove the plus and minus characters:
string preffix = (price >= 0) ? "" : "";

This change will remove the plus and minus characters from the product options price as show below:

Share this article on   LinkedIn Google+