Rule - How to set up pricing by quantity | ParagonERP

Rule - How to set up pricing by quantity

For some products, depending on industry practices, customer contracts, or other purposes, you might want to calculate and indicate the total price for a certain quantity of your product. For example, if you always sell a product by thousands, it might come in handy for you to have a field that indicates the price for a thousand units of this product, instead of only showing the price for a single unit. This type of automation can be arranged with the setup of a system rule. Please contact us at support@paragon-erp.com for help setting up rules.

Step 1: Create the necessary attributes

You will need to create two new attributes as explained below. Note that you can name them differently than what is suggested, but you will need to modify the rule to include those differences (see step 5). This will also be necessary if you want to enter the attributes in a different language than English.

First, create a new money attribute and name it price by quantity (suggested).

Second, create either a number attribute or an attribute with lists to choose from, and name it quantity for pricing (suggested). It is recommended that you enter a default value for this attribute.


Step 2: Add the attributes to the product screen

We now need to setup the product screen in order to add the new attributes.

Go to the settings page by hitting the settings button, then select screen setup.


Select the product module, and hit the edit button.


Using the add button, add the two attributes you just created.




Make sure you check the disallow multiple checkbox.

Step 3: Add/modify your product

This step is necessary only if you didn't put a default value on your quantity for pricing attribute, or you want to use a different value than the default one. In this example, we want to use a value of 100 instead of the default value 1000.

You can either create a new product or edit an existing one. In this example, we will edit an existing product, but the steps are the same if you create a new product.

Navigate to your product screen and hit the edit button. Change the value for the quantity for pricing attribute, and hit the save button.


Do not enter any value for the price by quantity attribute as it will be calculated as: price by quantity = sale price x quantity for pricing.

Please note that if either the sale price or quantity for pricing attributes isn't set, the calculation will be ignored and the price by quantity attribute will be blank.

Step 4: Install the rule

Rules are initially created by Jonar - all you have to do is install and activate them.


This rule should be saved under the after_save_product trigger.


Step 5: Modify the rule

This step is necessary only if you entered different names than the one suggested in step 1.

Locate the following text in the rule and modify the words in " " by your attributes name.

var priceByQuantity = 'priceByQuantity' // TODO replace by custom attribute
var quantityForPricing = "quantityForPricing" // TODO replace by custom attribute

Note: If your attribute has more than one word, write the first word with lower case, then the following words with only the first letter in capital, without a space between words. For example, if your attribute is named "Calculation unit", you should write "calculationUnit" in the rule.

Attention: Do not modify the words on the left of the "=" symbol.

What's next?

Please note that this rule only fills the price by quantity attribute for reference purposes. It will not affect any of the transaction entries.  As always - please contact us at support@paragon-erp.com for help setting up rules.


    • Related Articles

    • Rule - Special pricing based on customer class

      Rules in Paragon can be custom designed for your business's unique needs. Sometimes, rules are written for specific requirements, but can be applied to the majority of organizations. In this article, we'll walk you through one of the rules that can ...
    • Rule - Save order number as the project number

      Organizations sometimes take on large projects that need to be tracked and traced at every step.  Often the best way to do that is to assign a tracking number of some kind (maybe you call it a contract ID or a project #) to the entire process and ...
    • Set up your company information

      Introduction Before starting anything, you should store relevant information about your company, or how you want things to look. Luckily, Paragon stores all these settings in My Company, where all the changes and necessary configurations can be found ...
    • Rule - How to automatically update the warehouse attribute in a transaction

      An important feature of your shipments may be to have the warehouse name as a header attribute. Rather than filling in this information every time you create a shipment, Paragon allows this attribute to be automatically updated once your shipment is ...
    • How to add product specific discounts to specific customers

      Dealing with any large or major account can be challenging and dealing with their myriad of discounts and rebates can make it even harder.  Paragon helps out by giving you the ability to setup automatic discounts for specific customers and/or for ...