Previous Topic

Book Contents

Book Index

Next Topic

How to Redefine the Calculation

It is possible to change the order of the standard information, change its formatting or redefine the calculation completely be defining your own function which calculates your desired text displayed in the attribute mapped to the GUI field. See the image below for an example of how to write your own script in order to completely change additional info in the configurator.

Help Image

Same as for adding the info, for the configurator you only need to edit the calculation for attribute ‘PricingOffer.shopAdditionalInfo’. For the cart, you also need to edit the calculation for attribute ‘Reqitem.shopAdditionalInfo’.

Recommendation - proceed as follows:

  1. Copy the ‘pricingOffer_CalculateShopAdditionalInfo()’ function (used in the configurator) and/or the ‘reqitem_calculateShopAdditionalInfo()’ function (used for the cart) into your own library workflow. In the example above, the new function is ‘pricingOffer_xCalculateShopAdditionalInfo()’ and it is placed in workflow ‘xMyLibrary’ in workflow node ‘xMyModule’.
  2. Change the calculation of the standard attribute (see the image above) so that the calculation calls your new function.
  3. Change the body of the function so that it returns the info you need. You can add / remove some information and change the order of the information. Make sure that the code is exception-safe!

See Also

Displaying Additional Information in the Shop

How to Remove Additional Info

How to Add More Info

Miscellaneous Hints