Calculate the price based on attributes

I'm looking for a way to:

  1. See the price of an attribute
  2. See the price of a group element
  3. Recalculate and display the updated prices when you have selected an attribute or an element group.

Any help would be apprecated.

Thank you

I built something like this for a customer on this site

http://bit.LY/17SjOZ3

Look at the source and find the called build - pricer.js for examples of code.

See you soon,.

Mario

Tags: Business Catalyst

Similar Questions

  • Calculate the price based on the field

    Hello

    My apologies, I know it's a very basic question, but I can't understand the correct syntax for the custom calculation Script necessary to produce the total cost in my form (I just received Acrobat Pro today).

    I have the user fill in the quantity field and then I try to set the TOTAL field to calculate the cost by multiplying the quantity by the price of $29. I thought it was simple, like writing a formula in Excel, but it doesn't seem to work that way and I can not find all resources on Adobe.com or online who point me in the right direction. Any help anyone can offer would be greatly appreciated.

    It might be easier to use the option of simplified field notation, in which case you must enter:

    29 * QTY

    If you want to use a custom calculation script, it could be something like:

    Custom calculation for a field text script

    (function () {}

    Get the value of the quantity, as number

    var qty = + getField("QTY").value;

    Calculate the value of this field if the quantity is greater than 0

    If (Qty > 0) {}

    Event.Value = util.printf ("%.2f", 29 * qty);  round to the nearest hundred

    } else {}

    Event.Value = "";   This field blank

    }

    })();

    If this option gives you more flexibility. you to round off and empty the field. You can also perform additional checks to ensure that the amount of sense (for example, a positive integer within a certain range) you can find more information in the Acrobat JavaScript reference, and here is a link to a tutorial introduction on how to set up calculations in PDF forms: https://acrobatusers.com/tutorials/how-to-do-not-so-simple-form-calculations

    Be sure to set the computed fields read-only so that the user does not try to interact with them.

  • Calculate the price of line from adjustments

    Hi guru.

    Could you please help me to prepare a query?
    Sale price must be calculated from the unit_list_price & adjustment details.

    Two tables & data setting command line.
    Price group sequences are the order of calculation of adjustment at every stage to arrive at the current price to adapt more.

    Example of calculation:

    25000 - price
    5% 1250 - first compartment - 5% discount on the price
    50-50 - first compartment - 50 discount off the list price
    23700 - price after the first setting of bucket
    7% 1659 - adjustment for second bucket - on top of 23700
    22041 - price after the second bucket setting
    20-20 - 20 on 22041
    2% 440.82 - 2% on 22041
    21580.18 - price after the third adaptation of bucket
    2% 431, 6-2% on 21580.18
    21148.58

     select * from v$version
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE     11.2.0.3.0     Production
    TNS for Linux: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    
    
    create table xx_line
    (line_id number,
    item varchar2(30),
    unit_list_price number,
    selling_price number);
    
    insert into xx_line
    (line_id,item,unit_list_price,selling_price)
    values
    (1234,'xxitem',25000,21148.58);
    
    create table xx_price_adjustments
    (
    adjustment_id number primary key,
    Line_id number,
    pricing_group_sequence number,
    operand number,
    arithmetic_operator varchar2(4) check (arithmetic_operator  in ('%','AMT'))
    );
    
    insert into xx_price_adjustments
    (adjustment_id,line_id,pricing_group_sequence,Operand,arithmetic_operator)
    values
    (10000,1234,1,5,'%');
    
    insert into xx_price_adjustments
    (adjustment_id,line_id,pricing_group_sequence,Operand,arithmetic_operator)
    values
    (10001,1234,1,50,'AMT');
    
    
    insert into xx_price_adjustments
    (adjustment_id,line_id,pricing_group_sequence,Operand,arithmetic_operator)
    values
    (10002,1234,2,7,'%');
    
    
    insert into xx_price_adjustments
    (adjustment_id,line_id,pricing_group_sequence,Operand,arithmetic_operator)
    values
    (10003,1234,3,2,'%');
    
    
    insert into xx_price_adjustments
    (adjustment_id,line_id,pricing_group_sequence,Operand,arithmetic_operator)
    values
    (10004,1234,3,20,'AMT');
    
    
    insert into xx_price_adjustments
    (adjustment_id,line_id,pricing_group_sequence,Operand,arithmetic_operator)
    values
    (10005,1234,4,2,'%');
    
    select * from xx_line;
    
    select * from xx_price_adjustments order by pricing_group_sequence;

    ActiveSomeTimes wrote:
    Seems your approach of the solution is ok, but here's my points for you...

    If adjustment_id is completely independent of the pricing_group_sequence then simply the order of bucket:

    with a as (
               select  row_number() over(partition by line_id order by pricing_group_sequence) adjustment_sequence,
                       count(*) over(partition by line_id ) adjustment_count,
                       line_id,
                       pricing_group_sequence,
                       operand,
                       arithmetic_operator
                 from  xx_price_adjustments
              ),
         r(
           line_id,
           item,
           unit_list_price,
           selling_price,
           pricing_group_selling_price,
           adjustment_sequence,
           adjustment_count,
           pricing_group_sequence
          ) as (
                 select  line_id,
                         item,
                         unit_list_price,
                         unit_list_price selling_price,
                         unit_list_price pricing_group_selling_price,
                         0 adjustment_sequence,
                         1 adjustment_count,
                         1 pricing_group_sequence
                   from  xx_line
                union all
                 select  r.line_id,
                         r.item,
                         r.unit_list_price,
                         case r.pricing_group_sequence
                           when a.pricing_group_sequence then r.selling_price - case a.arithmetic_operator
                                                                                  when '%' then r.pricing_group_selling_price / 100 * a.operand
                                                                                  when 'AMT' then a.operand
                                                                                end
                         else r.selling_price - case a.arithmetic_operator
                                                  when '%' then r.selling_price / 100 * a.operand
                                                  when 'AMT' then a.operand
                                                end
                         end selling_price,
                         case r.pricing_group_sequence
                           when a.pricing_group_sequence then r.pricing_group_selling_price
                         else r.selling_price
                         end pricing_group_selling_price,
                         a.adjustment_sequence,
                         a.adjustment_count,
                         a.pricing_group_sequence
                   from  r,
                         a
                   where a.line_id = r.line_id
                     and a.adjustment_sequence = r.adjustment_sequence + 1
               )
    select  line_id,
            item,
            unit_list_price,
            selling_price
      from  r
      where adjustment_sequence = adjustment_count
    / 
    
       LINE_ID ITEM                           UNIT_LIST_PRICE SELLING_PRICE
    ---------- ------------------------------ --------------- -------------
          1234 xxitem                                   25000    20701.9904
    
    SQL>
    

    SY.

  • How to format a cell to calculate the distance based on names of cities in the other two cells

    I am using 3.6.1 numbers to display distances in Miles or Km in column 3 based on the names of the cities in columns 1 and 2

    For example:

    "Boston' appears in the cell"A1"and"New York"in cell"B1. "  I would like that the cell "C1" then automatically read "215 Miles.

    I could not find a way to do it. Any help would be appreciated. Thank you in advance.

    Hi Nicolas,.

    Which you will store the information needed for the numbers compute these results?

    If she wants to be a direct calculation of the shortest distance, you will need the geographical location of each of the two cities, as well as an algorithm/formula for the calculation of the circle distance between these two places. Boston-New York, is about 190 miles.

    On distance (215 miles) of driving, the calculations are a bit more complicated. They require access to a wide range of data including a "route map" for the area that you want to include, then an algorithm that can look up cities, determine a route between them, find the distance of conduct for each section of this road and add them to the top.

    If you place a strict limit on the number of cities and have access to networks "driving distance" which were (and maybe still) included with the paper maps printed of gas stations or AAA (to the United States), CAA (Canada), the AA (in Britain) and other organizations to motorist elsewhere in the world, you might be able to manage it with one or more lookup tables and a search feature appropriate in column C.

    Otherwise, you may incur development of Google (or one of several others) team to reinvent the wheel, so to speak, and provide you a stand-alone application to do this.

    Or you can choose to use a more suitable and existing tool. Some choices are MapQuest, OpenStreetMap, Bing Maps, Google Maps, or maps (Apple) (included in recent versions of Mac OS X).

    Kind regards

    Barry

  • calculate the total based on text filled fields

    Hi, I have 5 text fields to fill out my form. first 4 fields are normal text fields to fill & 5th is total field. each field value is $ 15. what I want to do, is if the first field filled with any text and then the field value total is $ 15. If it is filled with second text fields and field value total $30. like this, he must calculate all 4 total fields. pls help me to handle this. Thank you...

    You can use something like that the custom field calculation script total (simply adjust the field names, of course):

    var total = 0;
    if (this.getField("Text1").valueAsString!="") total+=15;
    if (this.getField("Text2").valueAsString!="") total+=15;
    if (this.getField("Text3").valueAsString!="") total+=15;
    if (this.getField("Text4").valueAsString!="") total+=15;
    event.value = total;
    
  • Calculate the value based on the selection of the checkbox

    People from g ' Day,.

    I have myself a little stuck on a job that I have here, this javascript Gets the better of me.

    The idea is that this script takes the total sub and adds a surcharge for credit card (in percentage) based on a selection of the checkbox, then spit out the value to be entered in another field.

    If someone could have a quick look over what follows and let me know where I went wrong, it would be appreciated.

    ---

    Subtotal var = this.getField("SubTotal").value;

    var mastercardTick = this.getField ("MasterCard");

    var visaTick = this.getField ("Visa");

    var amexTick = this.getField ("Amex");

    Var extra = this.getField("CreditSurcharge").value;

    card credit var = this.getField("PayCredit").value;

    If (creditcard.value = 'Off') {}

    Event.Value = 0;

    } else {}

    If (mastercardTick.value = 'Yes') {}

    overload. Value = (1,2 / 100) * subtotal.value;

    } ElseIf (visaTick.value = 'Yes') {}

    overload. Value = (1,2 / 100) * subtotal.value;

    } ElseIf (amexTick.value = 'Yes') {}

    overload. Value = (3.75 / 100) * subtotal.value;

    } else {}

    Event.Value = 0;

    }

    }

    ---

    For lines like these:

    overload. Value = (1,2 / 100) * subtotal.value;

    If it should not be as:

    Event.Value = (1,2 / 100) * subtotal.value;

    The variable supplement is defined at the beginning of the script to the value of the field, so the surcharge.value parameter is not any sense.

  • Calculate the percentage based on the other 2 columns column

    I did 2 columns. These two columns are column_a = separate count of all documents and
    column_b = separate count of the subset of records based on the specific condition.
    I try to get column_3 = (column_b/column_a) * 100
    These 2 columns comes from the same physical tables but two different logical tables (I have the condition where the different for each)
    Result is correct (100) where column_a = column_b, but I get 0 when they are different
    col_a, col_b %
    8 7 0 why not 87.5
    1 1 100
    27 23 0 why not 85.2

    NP, any chance of some reputation points if this has been helpful?
    Thank you

  • Calculate the difference based on the values of 2 different columns

    Hello friends,

    I basically want to do something like below that is the Format t - SQL:
    SUM (CASE column WHERE 'ABC' THEN 1 ELSE 0 END)-SUM (CASE columnB WHERE 'XYZ' THEN 1 ELSE 0 END)

    For which I was changing the following code in Oracle:
    SUM (CASE column = 'ABC' THEN 1 ELSE 0 END)-SUM (CASE columnB = END ELSE 0 'XYZ', 1).

    But his failure to validation with an error message - missing right parenthesis...

    Rest of the qry is very good, and each time I have add this line it starts failing.

    Published by: Sweta on 11-Sep-2009 09:32

    Try this

    SUM (CASE
                     WHEN columna = 'ABC'
                        THEN 1
                     ELSE 0
                  END)
           - SUM (CASE
                     WHEN columnb = 'XYZ'
                        THEN 1
                     ELSE 0
                  END)
    

    or

    COUNT (CASE
                       WHEN columna = 'ABC'
                          THEN 1
                    END)
           - COUNT (CASE
                       WHEN columnb = 'XYZ'
                          THEN 1
                    END)
    

    Note: you can use this sythax in oracle

    SUM(CASE columnA WHEN 'ABC' THEN 1 ELSE 0 END) - SUM(CASE columnB WHEN 'XYZ' THEN 1 ELSE 0 END)
    

    Example of

    SELECT emp_test.*,CASE ename
              WHEN 'SCOTT'
                 THEN 1
           END ind
      FROM emp_test
    
         EMPNO ENAME      JOB              MGR HIREDATE          SAL       COMM     DEPTNO        IND
    ---------- ---------- --------- ---------- ---------- ---------- ---------- ---------- ----------
          7369 SMITH      CLERK           7902 1980-12-17        800                    20
          7499 ALLEN      SALESMAN        7698 1981-02-20       1600        300         30
          7521 WARD       SALESMAN        7698 1981-02-22       1250        500         30
          7566 JONES      MANAGER         7839 1981-04-02       2975                    20
          7654 MARTIN     SALESMAN        7698 1981-09-28       1250       1400         30
          7698 BLAKE      MANAGER         7839 1981-05-01       2850                    30
          7782 CLARK      MANAGER         7839 1981-06-09       2450                    10
          7788 SCOTT      ANALYST         7566 1987-04-19       3000                    20          1
          7839 KING       PRESIDENT            1981-11-17       5000          0         10
          7844 TURNER     SALESMAN        7698 1981-09-08       1500                    30
          7876 ADAMS      CLERK           7788 1987-05-23       1100                    20
          7900 JAMES      CLERK           7698 1981-12-03        950                    30
          7902 FORD       ANALYST         7566 1981-12-03       3000                    20
          7934 MILLER     CLERK           7782 1982-01-23       1300                    10           
    
    14 rows selected.
    
  • Can I define an element of Promotion (BOGO) w/c is the formula in the price list?

    Hello!

    We anticipate using (BOGO) promotion in Advanced Pricing in our requirement business in sales. My question is can I define a free item in Promotion in which the unit price in the price list is using formula? Here is an example of our business requirements:

    Promo A - list Unit 30

    Free items (Get): Point A1, A2 of the element, element A3

    sold

    individual class

    Point A1 - 10 unit list 0

    The point A2 - unit list 20 0

    The point A3 - 30 10 unit list

    * Unit list must be calculated using the formula based on the table above.

    When we create a command line client for A Promo, the Advanced engine Pricing SHOULD calculate the price of every free item according to the formula defined for these elements of the price list (point A1 = 0, point A2 = 0, point A3 = 10).

    Is this possible? Are there other options available?

    The new price in modifier I think will just allow you to specify the new price to be used instead of the price from the price list. I read that I can not specify modifier form of Promotion, I understand it correctly? This should be the best place for calculate us the price of our requirement.

    Thank you.

    I checked this and read the user Oracle Advanced Pricing Guide. I can't use the formula if the type modifier is promotional voucher and line level. I create right now of the workaround is to create line Discount that uses a formula and within the formula, do the manipulation and then pass a new price for each item.

  • Show only the value not save to the database based on the dynamic action

    Nice day
    I have a select box with products and dynamic action that updates a single display element with the price, based on the selection of products.
    Once the selection is made and the page is submitted, I noticed that the price is not stored in the database. If I change the display
    only the value of a text box, the data is saved. This is expected behavior? If so, can I add something to the text box to make it uneditable?

    Thanks for any help you can provide.

    Version is Application Express 4.1.1.00.23

    Steve

    stmontgo wrote:
    Hello
    Thanks for your advice. I changed the STATE of SESSION SAVE Yes with the other values remains the same, as they met to your recommendations.
    When I change the value, I get the error below. It's maybe because the value is taken from a dynamic action?

    Yes. That would mean there isn't an item "view only". The value is changed by the browser.

    You might change view as textitem and set read-only by adding the ReadOnly attribute to the property attributes of HTML form elements .

  • Calculate the elements without generating a request

    Dear users of the forum,

    It is possible to calculate the elements in a page without generating a request for the page.

    I have 3 items, allows the appeal of quantity, price and total price.

    If I want to calculate the price total that I have to apply, place a process page to calculate, and so forth.
    But the screen is splashing with the request to leave.

    How a javascript function would work, when it is placed in the page header?

    Thank you very much for the help!

    Concerning

    Frank

    Hello

    of course, you can calculate your price without submitting the page.

    What you need is the javascript function that takes the value of the quantity and the price and returns the total value.

    Equip your header of this code page (I guess the name of your items are like P1_PRICE etc..):

    
    

    Create a button, then replace his target at the following URL ("Redirect URL" option button section):

    javascript:calculateTotalSum();
    

    Now, whenever you press the button, total price will be calculated without presenting.

    Kind regards
    Przemek

  • How to calculate the Total price based on a rate of m² with different prices?

    Hello

    I'm guessing that it is a script, but I've never done any script so I would like to ask you guys...

    I have a form where I would calculate the total price for some carpet based on the price per sqm.

    -L the user enters the number of carpet needed.

    -There are different price points for 1-20, 21-60, 61 + m² (each with their own hidden field that contains the value of awards).

    -The Total Price field evaluates the relevant quantity and multiply by the square metre rate.

    Is it achievable?

    I guess that all solutions are placed in the "Custom calculation Script" field too?

    Thanks in advance!

    Yes. You can use something like this, as the custom of the price field calculation total (you may need to adjust the domain names):

    var sqm = Number (this.getField("SQM").value);

    rate of var = 0;

    If (sqm > 0 & m²)<=20) rate="">

    ElseIf (> 20 sqm & m²)<=60) rate="">

    ElseIf (> 60 sqm) rate = Number (this.getField("Rate3").value);

    M² = Event.Value * side;

  • Prices are based on attributes of the expedition?

    Hello

    I have configured the Web site of the artist with the attributes of the product, but I'm looking for a way to modify the port charges based on what the user selects.

    The situation is:

    The shop of the centers around a collection of original pieces. From there, the artist sells prints and prints A4 canvas.

    I configured the workshop of creation of a product for a piece and then assigns it to Original, printed canvas and print, A4, so that the user can select a drop down menu to choose who they want to. That's fine, but the problem is the cost of shipping between Original canvas and A4 printing is too large. Is there a way to separate shipping based on that attribute the user chooses?

    Thank you

    Tom

    Why don't add you the shipping costs for the price of the original / canvas prints / A4 prints and then propose delivery inclusive prices? Or split the difference and have a flat rate for shipping, but add more printing on canvas? It is likely that they will order more than one?

    Best wishes

    Alan

  • Calculate the attribute (entity) Total value based on a specific entity

    I'm writing a calc that will calculate a total based on an attribute (entity) and based on a specific entity. I am currently able to calculate the total value of the attribute by using @SUM (@ATTRIBUTE (attrmembername)). I tried specifying the entity specifi in DIFFICULTY, but it is still calculating the total of the entire dimension, rather based on a specific entity. I would greatly appreciate any suggestions. Thank you!

    Use the @REMOVE function to exclude members that you do not want. The FIX is not your problem. Within the function, when you call @ATTRIBUTE, you get all basic members associated with this attribute.
    So in your @SUM function that you must exclude members you won't be part of the sum.

    Suppose you had a structure where you had a '1' attribute that has been associated with several children of 'A' and 'B', but in your sum function, you want only to the sum of the members who have the '1' attribute, AND are children of "A". If you want to exclude with the attribute members that are under the 'B '.

    @SUM (@REMOVE (@ATTRIBUTE("1"), @CHILDREN ('B'));

  • What is the API to generate the unit price based on price list (advanced price)?

    Hello!

    I'm looking for the api generate the price unit, based on the price list in advanced pricing. In addition, how will I know what are the manual available modifiers / header lines that can be applied to my order?

    Thank you.

    The api to use is QP_PREQ_PUB. PRICE_REQUEST.  You must complete all the variables table with the point attribute information and qualifier info to get a table at the back the modifiers that can be applied.  Check:

    HOW to use QP_PREQ_PUB. PRICE_REQUEST API at the price of an item (Doc ID 759804.1)

Maybe you are looking for