PROMOTIONS: how to know how much the customer will save

Hi again!
I have a promotion set up of the type "buy this T-Shirt together with this Bag and save $99,99" and would like to show on the screen how much the costumer will save.
Example: Buy this together: T-Shirt + Bag for $500 ( SAVE $30! )
How can I calculate HOW MUCH the costumer will save should he buy those items together?
So far I've been drifting around without luck... Tried classes like:
- ItemPricingEngine
- ItemDiscountCalculator
- BulkItemDiscountCalculator / BulkItemDiscountCalculator
Any guesses?
thanks,
lucas.
Edited by: 881684 on Sep 22, 2011 9:31 AM
Edited by: 881684 on Sep 22, 2011 9:32 AM
Edited by: 881684 on Sep 22, 2011 9:32 AM

You ll need to parse the pmdl rule of the promotion to get the required attributes out of it, and probably write a custom api to calculate that.
For reference
Re: Retrieval of Qualifier Quantity in Promotion
So you ll need to get the qualifier, target and the adjuster and do a calculation in your api to show the savings.

Similar Messages

  • How to know what are the privs for one custom schema?

    how to know what are the privs for one custom schema?
    please suggest me......

    Hi,
    Check this user_sys_privs
    Cheers
    Pavan Kumar N

  • How to know how much quantity is available for the batch ?

    hi all,
    I am doing a batch split on delivery item....but when i enter the batch and quantity ( say 500qty) it says Zero quantity available for the batch....
    <b>How to know how much quantity is available for the batch for that material</b> so that can we use the batch during batch split.....because batches are attached to a handling unit as well.....
    regards,
    Subba

    HI Subba,
    You can know this Thr MMBE Transaction Code
    Reward if it helps
    regards
    Srini

  • How do I tell if the customer is B2B or B2C

    I'm wanting to create a "dealer" area on our website.  A place where B2B customers can go to download special deals, pricelists, etc.
    My idea was to put a link on the my account page to an asp page that I would build.  On that page I need it to figure out if the customer in that session is B2B or not.  If not, give them a "sorry" message, and redirect them back to the my account page.
    If it's a dealer, it displays the page with all the dealer info.
    Is there a way to do this in netpoint already?  If so, how?  If not, how do I tell if the customer is B2B or not in an asp page?
    Thanks,
    Jim

    Hi Jim,
    To determine if a user is a B2B account or not you can use the API.
    So for example here is a skeleton you can use: (assuming you are using c#)
    <%@ Page Language="C#" inherits = "netpoint.classes.NPBasePage" %>
    <%@ Import Namespace = "netpoint.classes" %>
    <%@ Import Namespace = "netpoint.api.account" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
            //check if this is a B2B user.
            NPBasePage p = (NPBasePage)Page;
            NPAccount acc = new NPAccount(p.AccountID);
            if (acc.AccountType == "B")
                //its a B2B user
          else
               //not a b2b user, redirect
               Response.Redirect("http://wherever you want to go to");
    </script>
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title>Untitled Page</title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
        </div>
        </form>
    </body>
    </html>
    hope that helps.

  • How do I do use the custom code and format for a percentage with 2 decimals in Report Builder 3.0?

    In Report Builder 3.0, I have the following custom code entered:
      Public Function SafeDivide(Numerator as String, Denominator as String) as String
    Try
    If Numerator = “” or Denominator = “” then
    Return “-“
    End if
    If Numerator = “-“ or Denominator = “-“ then
    Return “-“
    End If
    If CDbl(Numerator) =0 or CDbl(Denominator) = 0 then
    Return “-“
    End if
    If IsNothing(Numerator) or IsNothing(Denominator) then
    Return "-"
    End if
    Return Val( ( (CDbl(Numerator) / CDbl(Denominator) )*100 ) )
    Catch
    Return "-"
    End Try
    End Function
    I call the custom code in the cell with the following equation:
      =Code.SafeDivide(sum(Fields!TY_UNITS.Value)-sum(Fields!LY_UNITS.Value),sum(Fields!LY_UNITS.Value))
    I have the format for the cell set to 0.00%, but it’s not being followed.
    I want the result to be formatted as a Percentage, but instead I get values like: 
    -78.9473684210
    80
    300
    -100
    I have the format for the cell set to 0.00%, but it’s not being followed.
    How do I do use the custom code and format for a percentage with 2 decimals?

    Hi AngP,
    After testing the issue in my local environment, I can reproduce it. Based on my research, I find this issue is caused by the type of Units_VAR_Percentage cell is string, while the type of CDbl(Parameters!Var_Threshold.Value) is double, so they cannot be
    compared.
    To fix this issue, we can add a hidden column (Textbox91) next to the Units_VAR_Percentage column, and type =(sum(Fields!TY_UNITS.Value)-sum(Fields!LY_UNITS.Value)) /sum(Fields!LY_UNITS.Value) as the expression. Then use the expression below to control the
    BackgroundColor:
    =iif(iif(reportitems!Units_VAR_Percentage.Value=CStr(format(reportitems!Textbox91.Value,"0.00%")),reportitems!Textbox91.Value,0)>CDbl(Parameters!Var_Threshold.Value),"Yellow","PaleTurquoise")
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • I ordered cards 1 week ago through iPhoto and I have not yet received a shipping confirmation.  How do I know when/if the cards will be processed and shipped? Thank you.

    I ordered cards 1 week ago through iPhoto and I have not yet received a shipping confirmation.  How do I know when/if the cards will be processed and shipped? Thank you.

    go to the online apple store (store.apple.com) and check your account for order status
    LN

  • HOW TO KNOW HOW OLD IS THE PHONE

    How to know how old is the iphone

    Plug the SN in here:
    http://www.chipmunk.nl/klantenservice/applemodel.html
    This will tell you when your phone was made.

  • How to know how much size we need in a tablespace to create index

    Hi,
    can anybody plz let me know,
    how to know how much space i need in a tablespace to create an index.
    thanks in advance

    Estimate Index Size and Set Storage Parameters
    http://www.camden.rutgers.edu/HELP/Documentation/Oracle/server.815/a67772/indexa.htm#388
    Estimating Bitmap Index Size
    http://download.oracle.com/docs/cd/A87860_01/doc/server.817/a76992/ch6_acce.htm#3625
    HTH
    Girish Sharma

  • How to know how many equipments can be produced?

    Hello friends,
    One equipment is having bill of material.  How to know how many equipments can be made with the stores stock? How to know for making min. no. of materials reqd for making optimum no. of equipments?
    bye,
    srinivas.

    Hi,
    Please have a look at the Rules of Engagement before posting to these forums. The link is here:
    [https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement]
    Once you have read the above, please provide the necessary information.
    Regards,
    Amit

  • How to know how much I can shrink the table

    How can I know how much I can shrink the table after firing the delete statement?

    Hi,
    alter table table_name shrink space;
    For example:
    create table HWM_TEST(
      ID      NUMBER,
      DB_USERVARCHAR2(12),
      TARIH   DATE
      STORAGE(
              MAXEXTENTS       UNLIMITED
    insert into HWM_TEST
      select level   id,
              user    db_user,
              sysdate tarih
       from dual
      connect by level<100001;
      commit;
      100000
    rows created.
      Commit complete.
      insert into HWM_TEST
      select * from HWM_TEST;
      insert into HWM_TEST
      select * from HWM_TEST;
      insert into HWM_TEST
      select * from HWM_TEST;
      insert into HWM_TEST
      select * from HWM_TEST;
      insert into HWM_TEST
      select * fromHWM_TEST;
      commit;
      100000
    rows created.
      200000
    rows created.
      400000
    rows created.
      800000
    rows created.
      1600000 rows created.
      Commit complete.
    select count(*) from hwm_test;
       COUNT(*)
    3200000
       1 row selected.
      Elapsed: 00:00:02.26
    delete from HWM_TEST;
      commit;
      COUNT(*)
    0
      1 row selected.
      Elapsed: 00:00:02.42
      alter table HWM_TEST enable row movement;
      alter table HWM_TEST shrink space;
      set timing on
      select count(*) from hwm_test;
    COUNT(*)
    0
       1 row selected.
      Elapsed: 00:00:00.01
    Thank you

  • How to Call BAPI From the Custom Controller

    Hi
    I developed frist WD Application Using RFC Adapter.
    i did the following steps
    1. created the project
    2. created the model.
    3. created the customer controller and mapped the model of the controller to the model.
    4. mapped controller context to the views
    5. created one action in the start view
    6. created one method in the customer controller.
    so please let me know the lines of code to call BAPI using RFC.
    and  how to pass input valus to the bapi and how to execute the BAPI
    plese send the reply ASAP
    regards
    mmukesh

    Hi
    i did like this
    In  Start View OnActionSearch () method code
    public void onActionsearch (com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
           wdThis.wdGetTestCustControllerController().executeGetlistBapi();
    in CustomController Init method
    public void wdDoInit()
        Bapi_Flight_Getlist_Input input = new Bapi_Flight_Getlist_Input();
        wdContext.nodeBapi_FlightGetlist_Input().bind(input);
        input.setDestination_From(new Bapisfldst());
        input.setDestination_To(new Bapisfldst());
    In CUSTOMECONTROLLER executeGetlistBapi();
    METHOD
    public void executeGetlistBapi( )
        //@@begin executeGetlistBapi()
        try{
           wdContext.currentBapi_FlightGetlist_InputElement().modelObject().execute();
           wdContext.nodeOutput().invalidate();
        }catch(Exception ex){
           ex.printStackTrace();
    Then let me know what is wrong in this
    i did as per pdf
    please correct if there is any worng in this code.
    this is flight example .
    regards
    mmukesh

  • How to know precisely when the revision of a content item is released?

    Hi,
    I have written a filter to handle delete event of content item revisions. Whenever a revision of a data file (WCM data file) is deleted my filter gets triggered and and checks for some criteria on our meta data. When the criteria is met it has to compare the contents of the revision that is deleted with the new revision. Since the revision will be deleted when my filter is exited, I copied the contents of the revision that is deleted and invoked a java thread with required document information.
    In that thread I am checking for when the revision is successfully deleted so that I can read the contents of new revision and compare them with old revision.
    For that I calling DOC_INFO_BY_NAME service from my thread and am checking until the following values for below meta data are in effect
    dStatus=RELEASED
    dReleaseState=Y
    Unfortunately this is not working properly. I am still seeing the data file content of deleted revision only. For testing purpose I put a sleep of 10 seconds in my code instead of reading the meta data values which is making the code work as expected. I am to get the contents on new revisions after the sleep time. But I don't want to work this way as this is not a guaranteed mechanism.
    How to know for sure when the revision is released?
    Regards,
    Pratap

    Hope as you mentioned I would be able to use link manager. That would make my work much simpler. But just want to ensure that we both are on the same page relating to my requirements. I still feel there is some gap in what I have tried to explain and what you understood. May be I couldn't put it in simple words.
    I will try my best to explain the requirements again in a simpler manner. This is only to ensure that I wouldn't end up spending lot of time in understanding new stuff but only to relaize at later time it may not work for me. I haven't used Link Manager before. That is why I am speculating a bit. I will start looking into the documentation of the Link Manager and Related Content to checkout if they work for me.
    First thing is that the links are not just present in static lists. They can also be in content generated using WYSIWYG editors and Image elements.
    Second when I talked about HTMLs they are not true content items. We are generating these HTMLs based on the structure of the site studio data file that is checked-in. I think it would be more clear if I add more details here.
    The data files that I have been referring so far are bit complex. Our site studio contibution site allows creation of parent content items like detailed page, news articles etc and child items like RelatedSections, FAQ Items etc. The child items are referenced in the parent content items for organizing the parent content item's structure. All these site studio content items are XML files and each of them can internally contain links to other items. In fact the child items can have references to parents items or other childd items as static list (with link selector elements) and WYSIWYG editors are used while creating these content types (parent and child items).
    Finally we generate the HTML only for parent items and display them on our portal. Child references are used only for defining parent item structure and the generated HTML for the parent item contains the details of child items. Our differentiation of parent and child is in the context. HTMLs that I have been talking so far are these ones only. They are not real content items.
    The HTML will be generated when ever the parent item is updated and approved in the last step in our workflow. Now since parent item's HTML is dependent on child items, whenever a child item is updated and approved in the last step of workflow we should look up for all the parent items that are referring to this child and regenerate the HTML for those parent items using updated contents of this child.
    Similar logic of HTML regeneration should be applied in the delete events.
    Finally the revision related issues that I listed for data files apply for images as well. Since the images are also managed content items with multiple revisions they are maintained in site studio content items with their dDocName instead of its file file path and extension. Lets say an image is being referred in one of the parent content items and the image extension at the time it was initially used in the parent item is gif. The HTML contents for this parent that get generated will have gif extension for this image item. Now after some time if the user checks-in a new revision for this image item and lets say the extension now is png. But the HTML generated for the parent item is still having .gif in the img src attribute. Which means we need to re-generate the HTML in this case by checking where all this image item is referred.
    If link manager can be helpful in meeting the above requirements it would be great. It shouldn't matter if there is bit of customization work involved.
    Regards,
    Pratap

  • How to get AEGP_EffectRefH within the custom effect?

    Hi,
        I want to get the AEGP_EffectRefH of the custom effect applied. This is what I'm trying to do:
    In global setup of custom effect:
    AEGP_GlobalRefcon globalRef    =    NULL;
    const A_char*        pluginName    =    "ADBE Custom Effect";
    AEGP_SuiteHandler    suites(in_data->pica_basicP);
    suites.UtilitySuite5()->AEGP_RegisterWithAEGP(globalRef, pluginName, &S_Plugin_ID );
    After getting the plugin ID, I do this in a function to get the AEGP_EffectRefH:
    I call this function when the custom effect is added:
    void function()
         AEGP_EffectRefH        effect_refH        =    NULL;
         AEGP_SuiteHandler    suites(in_data->pica_basicP);           
         ERR(suites.PFInterfaceSuite1()->AEGP_GetNewEffectForEffect(S_Plugin_ID, in_data->effect_ref, &effect_refH));
    But the effect_refH returned is NULL. AE pops up a dialog saying
    After Effects error: internal verification failure, sorry! {child not found in parent}
    (29 :: 0)
    What am I doing wrong?
    Thanks,
    Dheeraj

    about the reliability of effectRefs:
    they are reliable for the duration of one call.
    i.e. for the beginning to the end of the render call or updtate_params_ui call.
    after that cal has ended, the effectRef is likely to become invalidated.
    do an experiment:
    get an effect's effectRef, and check it's address in ram.
    releast the effetcRef and get another effectRef for a DIFFERENT effect.
    check it's adress and you'll be amazed that it has the same address as the first.
    why is that?
    because it doesn't point to the address of that effect in ram.
    it's an internal id that allows AE to operate on the effect for you.
    so that same effectRef you have, might point to a different effect or to nothing at all, once AE decides that the effectRef you acquired is no longer in use.
    AE will decide that after you release the effetcRef, or that you effect returns from it's call.
    so what does all that mean?
    it means you should treat effectRefs and a temporary key for accessing an effect, and NOT as a long term means of identifying and effect.
    there is no perfect solution for tracking an effect for long spans.
    if you want to keep track of an effect outside the scope of one call you have to:
    1. get the itemID for the comp it's in
    2. get the layerID for the layer it's on
    3. get the effect's index on the layer (this is the tricky bit)
    the comp's itemID and layerID both last for the lifetime of the project.
    they will keep across sessions, even if the project is loaded on a different machine and a different platform.
    these only get invalidated if the project is imported into another project.
    the index of the effect is the problem bit.
    there is no API call for getting an effects index.
    you can only tell the index by counting all effects on the layer, until you hit the desired effect.
    even then it's hard to tell because you tell what effect you hit by reading it's matchName.
    what if you have to copies of the same effect on one layer?
    how do you tell them apart?
    it's up to you to create a unique identifier.
    either a hidden slider holding a random value that's unique to each instance, or change the effect name to something unique (the user might change that without you knowing)
    the last problem with the index is that the user might change effects order on that layer, and your effect get no notification of that having happened.
    so even if you stored the itemID, layerID and effect index, you still have to make sure it's the correct effect before you do something hasty like access it.
    as i said,
    there is no perfect long term solution for tracking effects.

  • How can I re-release the Customizing request

    Hi,
    Yesterday, I released a customizing request to QAS. At the QAS, I used the T-code STMS to check the import request, I could not find out it.
    But, today, I released another customizing request to QAS. I can find out it. I don't known what had happened.
    Could I re-release the CR? How to deal with this question?
    Waiting for answer, THX
    jk

    Dear all,
    Thanks for your time. The problem is still have.
    I have released the Task and Sub-task, and I checked the import queue in which there isn't the TR.
    I released a new customizing request, it can be find out the import queue.
    I think the transport routes maybe have problem at yesterday, so I want to re-transport the customizing request.
    Which method can I choose to do that?
    jk

  • How to know and change  the current memory settingf of a libray ?

    Hi
    is anybody know how to change the current quota setting of a library or workspace with content services api.
    and how will we change the same.
    i need to get current wuota settings of a library and need to change that settings..
    Thanks

    To determine existing quota settings, check out Attributes javadoc for
    QUOTA_ALLOCATED Quota allocated to the closest parent folder that has a QuotaConfiguration (could be the item itself, in the case of a Folder item).
    Available on: DOCUMENT , FOLDER
    Constant Field Value: QUOTA_ALLOCATED
    Data Type: Long
    QUOTA_CONSUMED Quota consumed by the subtree of the closest parent folder that has a QuotaConfiguration.
    Available on: DOCUMENT , FOLDER
    Constant Field Value: QUOTA_CONSUMED
    Data Type: Long
    Create an AttributeRequest[] for the above attributes on the appropriate item concerned.
    For example, to determine quota of my personal workspace :-
    FdkSession session = new FdkSession(....);
    SessionManager sM = Managers.getSessionManager(session);
    AttributeRequest ar1 = new AttributeRequest();
    ar1.setAttributeName(Attributes.PERSONAL_WORKSPACE);
    ar1.setRequestedAttributes(new AttributeRequest[]
    new AttributeRequest(Attributes.QUOTA_ALLOCATED,null),
    new AttributeRequest(Attributes.QUOTA_CONSUMED,null)
    AttributeRequest[] requestedAttributes = new AttributeRequest[] { ar1 };
    Item i = sM.getCurrentUser(requestedAttributes);
    log(i);
    In order to update quota of a Workspace (or potentially the domain), call
    QuotaManager.updateQuota method.
    Check out the javadoc for QuotaManager.
    cheers
    Matt.

Maybe you are looking for

  • [SOLVED]Blender won't start.

    Hi, everyone. I've been using blender on Archlinux. It's been working fine. Yesterday when I want to open blender after upgrading the system( pacman -Syu), it just won't start. I try to start from the Konsole, It gave me the following information: bl

  • Films stuck on Apple TV

    I have 3 films stuck on Apple TV which will not transfer over to my Mac. Since I found this problem I just purchase now through my Mac. I recently lost some Apps I purchased and when I went to purchase them again iTunes came up saying something along

  • HT4623 how to upload older version in my iphone

    i am upload the ios 7 beta in my iphone 5 .. please tell me if i want the older version then what can i do? and aslo tell me is it fine for my iphone ios7 beta?

  • How to register sjsws7.x with sjsDir svr 5,2

    Running sjsws 6.1 SP8 and sjs7 on Solaris 9 SPARC Would like to register 7 with the existing accounts/access control list already in Dir 5.2 I do not see a way of registering 7 with the sjsDs 5.2 How?? Thanks

  • View by file name...

    My images are sequentially named by my camera. Isn't there any way to view a slideshow using the file names? Seems like a silly oversight by Adobe. Ted