Difference between revisions of "Order class"

From Catglobe Wiki
Jump to: navigation, search
(Created page with "{{CGscriptClass_Template |Name=Order |Description=Order object used while processing orders |Methods= {{CGscriptMethods_Template|ReturnType=Empty|Name=AddLog|Parameters= {{CGs...")
 
Line 1: Line 1:
{{CGscriptClass_Template |Name=Order |Description=Order object used while processing orders |Methods= {{CGscriptMethods_Template|ReturnType=Empty|Name=AddLog|Parameters= {{CGscriptParameters_Template|Type=string|Name=msg|Description=Message to add.}} |Description=Add an entry to AdminNote automatically appending a newline.}} {{CGscriptMethods_Template|ReturnType=string|Name=ToString|Description=The string representation of the object.}} |Properties= {{CGscriptProperties_Template|ReturnType=string|Name=AdminNote|HasGetter=1|Description=Get the comments the system or admin has written.}} {{CGscriptProperties_Template|ReturnType=number|Name=GiftPoints|HasGetter=1|Description=How many points does the buyer get for completing this order.}} {{CGscriptProperties_Template|ReturnType=number|Name=HandlingPoints|HasGetter=1|Description=How many points was used for handling.}} {{CGscriptProperties_Template|ReturnType=bool|Name=IsPhysicalOrder|HasGetter=1|Description=Does the order contain physical items or not.}} {{CGscriptProperties_Template|ReturnType=string|Name=ObjectTypeName|HasGetter=1|Description=The name of the type of object.}} {{CGscriptProperties_Template|ReturnType=number|Name=OrderCash|HasGetter=1|Description=How much cash was used in total.}} {{CGscriptProperties_Template|ReturnType=DateTime|Name=OrderDate|HasGetter=1|Description=Time and date the buyer completed the order.}} {{CGscriptProperties_Template|ReturnType=string|Name=OrderNumber|HasGetter=1|Description=The order number of the order.}} {{CGscriptProperties_Template|ReturnType=string|Name=OrderPaymentType|HasGetter=1|Description=How was the order paid. Possible values is ByPoint, ByCreditCard, ByInvoice, ByCash, ByGiro, ByDanKort, ByPointAndCreditCard.}} {{CGscriptProperties_Template|ReturnType=number|Name=OrderPoints|HasGetter=1|Description=How many points was used in total.}} {{CGscriptProperties_Template|ReturnType=number|Name=PercentageDiscount|HasGetter=1|Description=How much discount does this user get.}} {{CGscriptProperties_Template|ReturnType=number|Name=PostagePoints|HasGetter=1|Description=How many points was used for postage.}} {{CGscriptProperties_Template|ReturnType=array|Name=ProductOrders|HasGetter=1|Description=List of actual products bought.}} {{CGscriptProperties_Template|ReturnType=number|Name=ProductPoints|HasGetter=1|Description=How many points was used for the actual products.}} {{CGscriptProperties_Template|ReturnType=TypeInformation|Name=TypeInformation|HasGetter=1|Description=Get information about this class.}} {{CGscriptProperties_Template|ReturnType=bool|Name=UseGiftPoints|HasGetter=1|Description=Does this user get gift points if a bought product gives some.}} {{CGscriptProperties_Template|ReturnType=string|Name=UserComment|HasGetter=1|Description=Get the comment the buyer wrote.}} {{CGscriptProperties_Template|ReturnType=number|Name=UserId|HasGetter=1|Description=The id of the user ordering.}} }}
+
{{CGscriptClass_Template
 +
|Name=Order
 +
|Description=Order object used while processing orders
 +
|Constructors=
 +
{{CGscriptConstructors_Template|Parameters=
 +
{{CGscriptParameters_Template|Type=string|Name=currency|Description=Currency to use for calculations. Use empty for default currency}}
 +
|Description=Create a new order}}
 +
{{CGscriptConstructors_Template|Parameters=
 +
{{CGscriptParameters_Template|Type=string|Name=currency|Description=Currency to use for calculations. Use empty for default currency|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=deliveryTo|Description=Name of recipient|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=address|Description=First address line of delivery address|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=address2|Description=Second address line of delivery address|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=city|Description=City of delivery address|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=zipcode|Description=Zipcode of delivery address|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=region|Description=Region of delivery address|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=postbox|Description=Postbox of delivery address|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=country|Description=Country of delivery address|Comma=,}}{{CGscriptParameters_Template|Type=int|Name=deliveryTypeId|Description=Which type of delivery to use|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=userComment|Description=Optional comment from the user}}
 +
|Description=Create a new order for physical products}}
 +
|Methods=
 +
{{CGscriptMethods_Template|ReturnType=Empty|Name=AddLog|Parameters=
 +
{{CGscriptParameters_Template|Type=string|Name=msg|Description=Message to add.}}
 +
|Description=Add an entry to AdminNote automatically appending a newline.}}
 +
{{CGscriptMethods_Template|ReturnType=string|Name=ExecuteFromOther|Parameters=
 +
{{CGscriptParameters_Template|Type=string|Name=successUrl|Description=Url to send buyer to after successfully paying for the product. If empty then send to webshop receipt page|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=failureUrl|Description=Url to send buyer to after cancelling payment. If empty then send to webshop cancel page. Empty means default|Comma=,}}{{CGscriptParameters_Template|Type=string|Name=merchantName|Description=Merchant name to load the appropriate merchant configuration from the web config|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=payByInvoice|Description=Pay by points/creditcard or if true by invoice|Comma=,}}{{CGscriptParameters_Template|Type=Function|Name=callback|Description=Function to call after ordernumber is assigned, so that it can be stored somewhere. OrderNumber is the first and only parameter}}
 +
|Description=Save and initiate the payment process. This will commit current transaction and return the url to show next}}
 +
{{CGscriptMethods_Template|ReturnType=Empty|Name=ExecuteFromQuestionnaire|Parameters=
 +
{{CGscriptParameters_Template|Type=string|Name=merchantName|Description=Merchant name to load the appropriate merchant configuration from the web config|Comma=,}}{{CGscriptParameters_Template|Type=bool|Name=payByInvoice|Description=Pay by points/creditcard or if true by invoice|Comma=,}}{{CGscriptParameters_Template|Type=Function|Name=callback|Description=Function to call after ordernumber is assigned, so that it can be stored somewhere. OrderNumber is the first and only parameter}}
 +
|Description=Save and initiate the payment process. This will commit current transaction and redirect to payment. On next question you can see state of order}}
 +
{{CGscriptMethods_Template|ReturnType=Empty|Name=ExecuteFromQuestionnaire|Parameters=
 +
{{CGscriptParameters_Template|Type=string|Name=merchantName|Description=Merchant name to load the appropriate merchant configuration from the web config. Empty means default|Comma=,}}{{CGscriptParameters_Template|Type=Function|Name=callback|Description=Function to call after ordernumber is assigned, so that it can be stored somewhere. OrderNumber is the first and only parameter}}
 +
|Description=Save and initiate the payment process. This will commit current transaction and redirect to payment. On next question you can see state of order}}
 +
{{CGscriptMethods_Template|ReturnType=Empty|Name=ExecuteFromQuestionnaire|Parameters=
 +
{{CGscriptParameters_Template|Type=Function|Name=callback|Description=Function to call after ordernumber is assigned, so that it can be stored somewhere. OrderNumber is the first and only parameter}}
 +
|Description=Save and initiate the payment process. This will commit current transaction and redirect to payment. On next question you can see state of order}}
 +
{{CGscriptMethods_Template|ReturnType=string|Name=ToString|Description=The string representation of the object.}}
 +
|Properties=
 +
{{CGscriptProperties_Template|ReturnType=string|Name=AdminNote|HasGetter=1|Description=Get the comments the system or admin has written.}}
 +
{{CGscriptProperties_Template|ReturnType=number|Name=GiftPoints|HasGetter=1|Description=How many points does the buyer get for completing this order.}}
 +
{{CGscriptProperties_Template|ReturnType=int|Name=HandlingPoints|HasGetter=1|Description=How many points was used for handling.}}
 +
{{CGscriptProperties_Template|ReturnType=bool|Name=IsPhysicalOrder|HasGetter=1|Description=Does the order contain physical items or not.}}
 +
{{CGscriptProperties_Template|ReturnType=string|Name=ObjectTypeName|HasGetter=1|Description=The name of the type of object.}}
 +
{{CGscriptProperties_Template|ReturnType=number|Name=OrderCash|HasGetter=1|Description=How much cash was used in total.}}
 +
{{CGscriptProperties_Template|ReturnType=DateTime|Name=OrderDate|HasGetter=1|Description=Time and date the buyer completed the order.}}
 +
{{CGscriptProperties_Template|ReturnType=string|Name=OrderNumber|HasGetter=1|Description=The order number of the order.}}
 +
{{CGscriptProperties_Template|ReturnType=string|Name=OrderPaymentType|HasGetter=1|Description=How was the order paid. Possible values is ByPoint, ByCreditCard, ByInvoice, ByCash, ByGiro, ByDanKort, ByPointAndCreditCard.}}
 +
{{CGscriptProperties_Template|ReturnType=int|Name=OrderPoints|HasGetter=1|Description=How many points was used in total.}}
 +
{{CGscriptProperties_Template|ReturnType=number|Name=PercentageDiscount|HasGetter=1|Description=How much discount does this user get.}}
 +
{{CGscriptProperties_Template|ReturnType=int|Name=PostagePoints|HasGetter=1|Description=How many points was used for postage.}}
 +
{{CGscriptProperties_Template|ReturnType=array|Name=ProductOrders|HasGetter=1|Description=List of actual products bought.}}
 +
{{CGscriptProperties_Template|ReturnType=int|Name=ProductPoints|HasGetter=1|Description=How many points was used for the actual products.}}
 +
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=TypeInformation|HasGetter=1|Description=Get information about this class.}}
 +
{{CGscriptProperties_Template|ReturnType=bool|Name=UseGiftPoints|HasGetter=1|Description=Does this user get gift points if a bought product gives some.}}
 +
{{CGscriptProperties_Template|ReturnType=string|Name=UserComment|HasGetter=1|HasSetter=1|Description=Get the comment the buyer wrote.}}
 +
{{CGscriptProperties_Template|ReturnType=int|Name=UserId|HasGetter=1|Description=The id of the user ordering.}}
 +
}}

Revision as of 07:20, 23 December 2016

Order



Order object used while processing orders

Constructors

  • (string currency "Currency to use for calculations. Use empty for default currency") - Create a new order
  • (string currency "Currency to use for calculations. Use empty for default currency", string deliveryTo "Name of recipient", string address "First address line of delivery address", string address2 "Second address line of delivery address", string city "City of delivery address", string zipcode "Zipcode of delivery address", string region "Region of delivery address", string postbox "Postbox of delivery address", string country "Country of delivery address", int deliveryTypeId "Which type of delivery to use", string userComment "Optional comment from the user") - Create a new order for physical products

Methods

  • Empty AddLog(string msg "Message to add.") - Add an entry to AdminNote automatically appending a newline.
  • string ExecuteFromOther(string successUrl "Url to send buyer to after successfully paying for the product. If empty then send to webshop receipt page", string failureUrl "Url to send buyer to after cancelling payment. If empty then send to webshop cancel page. Empty means default", string merchantName "Merchant name to load the appropriate merchant configuration from the web config", bool payByInvoice "Pay by points/creditcard or if true by invoice", Function callback "Function to call after ordernumber is assigned, so that it can be stored somewhere. OrderNumber is the first and only parameter") - Save and initiate the payment process. This will commit current transaction and return the url to show next
  • Empty ExecuteFromQuestionnaire(string merchantName "Merchant name to load the appropriate merchant configuration from the web config", bool payByInvoice "Pay by points/creditcard or if true by invoice", Function callback "Function to call after ordernumber is assigned, so that it can be stored somewhere. OrderNumber is the first and only parameter") - Save and initiate the payment process. This will commit current transaction and redirect to payment. On next question you can see state of order
  • Empty ExecuteFromQuestionnaire(string merchantName "Merchant name to load the appropriate merchant configuration from the web config. Empty means default", Function callback "Function to call after ordernumber is assigned, so that it can be stored somewhere. OrderNumber is the first and only parameter") - Save and initiate the payment process. This will commit current transaction and redirect to payment. On next question you can see state of order
  • Empty ExecuteFromQuestionnaire(Function callback "Function to call after ordernumber is assigned, so that it can be stored somewhere. OrderNumber is the first and only parameter") - Save and initiate the payment process. This will commit current transaction and redirect to payment. On next question you can see state of order
  • string ToString() - The string representation of the object.

Properties

  • string AdminNote { get; } - Get the comments the system or admin has written.
  • number GiftPoints { get; } - How many points does the buyer get for completing this order.
  • int HandlingPoints { get; } - How many points was used for handling.
  • bool IsPhysicalOrder { get; } - Does the order contain physical items or not.
  • string ObjectTypeName { get; } - The name of the type of object.
  • number OrderCash { get; } - How much cash was used in total.
  • DateTime OrderDate { get; } - Time and date the buyer completed the order.
  • string OrderNumber { get; } - The order number of the order.
  • string OrderPaymentType { get; } - How was the order paid. Possible values is ByPoint, ByCreditCard, ByInvoice, ByCash, ByGiro, ByDanKort, ByPointAndCreditCard.
  • int OrderPoints { get; } - How many points was used in total.
  • number PercentageDiscount { get; } - How much discount does this user get.
  • int PostagePoints { get; } - How many points was used for postage.
  • array ProductOrders { get; } - List of actual products bought.
  • int ProductPoints { get; } - How many points was used for the actual products.
  • TypeInformation TypeInformation { get; } - Get information about this class.
  • bool UseGiftPoints { get; } - Does this user get gift points if a bought product gives some.
  • string UserComment { get; set; } - Get the comment the buyer wrote.
  • int UserId { get; } - The id of the user ordering.