4. GSOrder Object

4.1. Introduction

The GSOrder object is used for GeoShop order processing.

4.2. GSOrder Methods

ConstructorGSOrder()
DescriptionCreates a new GSOrder object.
Example
var gsorder = new GSOrder();
MethodsetUser(GSUser user)
DescriptionSets the user authentication for sendOrder().
Example
gsorder.setUser(gsuser);
MethodsetProduct(String product)
DescriptionSelects the product to be ordered by name.
Example
gsorder.setProduct("dxf_geobau");
MethodsetParameterModelByProduct(String product)
DescriptionSets the "model" parameter by product name.
Example
gsorder.setParameterModelByProduct("dxf_geobau");
MethodsetParameter(String parameter,String value)
DescriptionSets a product parameter value. Possible parameter names depend on the product definition.
Example
gsorder.setParameter("name1","infoGrips GmbH");
gsorder.setParameter("adr1","Technoparkstrasse 1");
gsorder.setParameter("zip","8005");
gsorder.setParameter("city","Zürich");
gsorder.setParaemter("email","info@infogrips.ch");
gsorder.setParameter("selection_polygon",gsmap.getSelectionPolygon());
MethodsendOrder(function successCallback(GSHashtable), function errorCallback(String))
DescriptionSends the order to the GeoShop server. If the order is successfully send to the server, successCallback() is called asynchronously, else errorCallback().
Example
gsorder.sendOrder(function(order) {
      // order was submitted successfully
   }, function(errorMessage) {
      // some error occured
   }
);
MethodString getInfoMessage()
DescriptionGets some information about the state of the last sendOrder() as String.
Example
alert(gsorder.getInfoMessage());
[Note]

More information on available product parameters can be found in the separate "GeoShop Batch Client" documentation.