How to implement slab wise pricing for products

Hello Experts,
I am a rank newbie to SuiteCRM.
I was struggling to figure out how to implement slab wise pricing for the products.
Qty: 1 to 5 Price: $10 each
Qty: 6 to 10 Price: $9 each
Qty: 11 or more Price: $8 each
Any help would be highly appreciated.
Thanks in anticipation …

There are a few ways you could approach this depending what you feel comfortable with.

If you’re not comfortable with coding then you could add a dynamic dropdown in studio, which allows the options for one dropdown to be set by another dropdown. You can see an example of this in the cases module where the status dropdown changes depending on what state is set to. Instead of the default textbox input for price you could add a new price field that is a dropdown field with one option and have the option change depending on the quantity.

As I’m a developer I’d probably be more inclined to take an approach involving code. One possibility is not to include the price field on the edit view, but still have it on the detailview and list view. Then I’d add an on save logic hook to set the price on save. If you need more information on logic hooks feel free to ask and I’ll try to explain them in more detail.

Another approach would be to set the price field using javascript. If you wish to add a custom javascript file to an edit view then you need to edit custom/modules/Products/metedata/editview/editviewdefs.php and add the following to the first array:

'includes' => 
      array (
        0 => 
        array (
          'file' => '[i]/pathtoyourfile/yourfilename.js[/i]',
1 Like

Thanks for your response.
I will try to implement the solutions myself.
I will get back to you if I get stuck up …