otm:paperexample

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
otm:paperexample [2010/06/02 22:41]
aspectscript
otm:paperexample [2010/06/03 16:11] (current)
aspectscript
Line 7: Line 7:
 desired payment method.  desired payment method. 
  
-{{:otm:matching3-2.png|The sequence for the restrictive discount feature}}+{{ :otm:matching3-2.png |The sequence for the restrictive discount feature}}
  
 Now, consider that we need to add the discount restrictive feature, which potentially adds a different discount for each product when it is added to the shopping cart. The discounts are applied when the client does checkout. Each discount is only valid for a period of time; however, the discount feature must respect the discount that was active when the product was added to the shopping cart. The restrictive discount feature limits the number of discounts are really applied (say three): they are the discounts that generate the best benefits for the client. In addition, all discounts are only valid if the client does checkout before Christmas Day. The sequence shown in the figure implements this new feature in a hypothetically TM that matches this sequence before Christmas Day and with a matching strategy that matches only one sequence at a time. When this sequence matches, it contains as contextual information a list of all products and discounts. The associated advice applies the discounts to the products of the list that generate the best benefits according to the store policy.  Now, consider that we need to add the discount restrictive feature, which potentially adds a different discount for each product when it is added to the shopping cart. The discounts are applied when the client does checkout. Each discount is only valid for a period of time; however, the discount feature must respect the discount that was active when the product was added to the shopping cart. The restrictive discount feature limits the number of discounts are really applied (say three): they are the discounts that generate the best benefits for the client. In addition, all discounts are only valid if the client does checkout before Christmas Day. The sequence shown in the figure implements this new feature in a hypothetically TM that matches this sequence before Christmas Day and with a matching strategy that matches only one sequence at a time. When this sequence matches, it contains as contextual information a list of all products and discounts. The associated advice applies the discounts to the products of the list that generate the best benefits according to the store policy. 
Line 13: Line 13:
 The implementation follows:  The implementation follows: 
 <html> <html>
 +  <br>
    <link href="/aspectscript/external/otm/paperExample/style.css" rel="stylesheet" type="text/css"/>    <link href="/aspectscript/external/otm/paperExample/style.css" rel="stylesheet" type="text/css"/>
   <script type="text/javascript" language="javascript" src="/aspectscript/external/otm/paperExample/lib.js"> </script>   <script type="text/javascript" language="javascript" src="/aspectscript/external/otm/paperExample/lib.js"> </script>
-   <iframe id="example" src="/aspectscript/external/otm/paperExample/" width="810" height="320"></iframe>     +   <iframe id="example" src="/aspectscript/external/otm/paperExample/" width="395" height="500"></iframe>     
-    <iframe id="code" style="display:none" src="/aspectscript/external/otm/paperExample/script.js" width="810" height="320"></iframe>+    <iframe id="code" style="display:none" src="/aspectscript/external/otm/paperExample/script.js" width="700" height="500"></iframe
 +   <br>
    <a id="button" class="button" onclick="toggle('code','example')"> <span>Toggle between the code and example </span></a>    <a id="button" class="button" onclick="toggle('code','example')"> <span>Toggle between the code and example </span></a>
 </html> </html>
  • otm/paperexample.1275518496.txt.gz
  • Last modified: 2010/06/02 22:41
  • by aspectscript