Deleting a saved item The “internalId” of a saved item can be queried using the getCustomProduct() function. A saved article can then be deleted with the “internalId”.
Example
$deletearticle = ‘articletodelete’;
try {
$getItemArgs = new getCustomProductRequestType();
$getItemArgs->environment = $environment;
$getItemArgs->messageLevel = $messageLevel;
$selection = new catalogueSelectionType();
$getItemArgs->selection = $selection;
$getItemArgs->selection->itemIdentifier = $deletearticle;
$product = $client->getCustomProduct($getItemArgs);
$internalId = $product->product->internalId;
} catch(Exception $e) {
echo “Error on request getCustomProduct: ” . $e->getMessage();
}
try {
$changeArgs->writeMode = ‘deactivate’;
$changeArgs->product = new selectedType();
$changeArgs->product->internalId = $internalId;
$erg = $client->setCustomProduct($changeArgs);
} catch(Exception $e) {
echo “Error on request setCustomerProduct: ” . $e->getMessage();
}
If a currently saved product is not displayed even though you have received an article ID, there was an error in saving.
Possible cause: One or more options / product parameters were not transferred correctly.
If you can no longer find your saved products, it may be because you are working with the DEV development system.
This test environment is always overwritten with the production system overnight.
If you create test data or test orders in the test system, they are only available on the test system on the day of the creation.
Use this sample script to display or edit your saved articles.
http://interface.unitedprint.com/ws2/catalogueList.php
The catalog products you have saved are listed with the respective group assignment and can be edited further.
These product properties are displayed during product creation – shown here for the sample product “Flyer”.
- page Count
- Format
- Alignment
- Paper thickness
- Paper
- Paper feature
- Print
- Processing
- Finishing
- Type of finishin
- Creasing
- Perforation
- Quantity
- Delivery
Important
The properties must be selected from “top” to “bottom” in order to exclude combinations that cannot be ordered.
The properties in the hierarchy above always have an influence on which options can be selected in the groups below.
To create a product, call the following example script.
http://interface.unitedprint.com/ws2/catalogue.php
The individual product properties are displayed and can be selected from dropdown lists.
A clear combination of all available options is saved as a “product”.
This “product” will be addressed later in the order creation in the field orderPositions [$ pos] -> orderInformation -> customerProductId.
The following required fields are defined for order creation in the Order Client.
- environment
- portalName
- countryCode
- languageCode
- partyGroupName
- accountInformation
- customerNumber
- password
- orderInformation
- customerProductId
- orderQuantity
- shippingType
- orderName
- dataSourceInformation
- dataSourceHost
- dataSourceUser
- dataSourcePassword
- dataSourcePort
- dataTransmission
- messageLevel
When creating an order, a product previously created in the product catalog is transferred to the interface together with the order data, order quantity and shipping method.
The order quantity and shipping method are overwritten in the following fields:
$order->orderQuantity
$args->orderPositions[0]->orderInformation->orderQuantity
$args->orderPositions[0]->orderInformation->shippingType
Example
http://interface.unitedprint.com/ws2/order.php
In the example, the parameter “validate” can be set.
$args -> validate = ($_GET{‘validate’} == ‘on’ ? 1 : 0);
$erg = $client -> createOrder($args);
An order can be checked using this parameter.
With “validate = 1” no order is created – the order is only checked without being saved at UP.
If the check is successful, the expected delivery date, net and gross price and the currency are returned.
With„validate = 0”
$args -> validate = 0
$erg = $client -> createOrder($args);
the order is written into the UP system and the order number is returned.
// begin processing
$args->accountInformation->password = ‘passwort’;
$args->accountInformation->customerNumber = 1234567;
$args->accountInformation->portalName = ‘print24’;
$args->accountInformation->languageCode = ‘de’;
$args->accountInformation->countryCode = ‘DE’;
Once you have selected a product in the catalog, you can save it to create an orderable product. Use the name of this newly created product for your order.
A user account is required for each order request. The order script requires a product name, a quantity and at least one delivery address. The quantity and shipping method may differ from your saved product. You can order any quantity in the catalog.
The order demo script supports only one delivery address. You can use multiple delivery addresses.
Use the validation indicator to validate your order. You can also use it for price queries.
Downlaod
order_demo.php
This sample script shows how you can use the catalog script to access custom products that you previously saved.
This makes it possible to obtain detailed information for stored products such as price and delivery information.
This script uses the catalog functions getCatalogueList and getCustomProduct.
It is a faster alternative to getCustomCatalogue.
Download
catalogueList_demo.php
The saved products of the catalog are listed here together with their group assignment.
Example
http://interface.unitedprint.com/ws2/catalogueList.php
You can access the UP product catalog with your own customer data.
To do this, download the sample script below and a certificate and start your catalog inquiries immediately to obtain price and delivery information.
The script demonstrates the catalog function “getCustomCatalogue”.
The example certificate only gives you access to our test environment.
Sample code
All products that can be ordered by a customer are maintained in the product catalog.
In order to be able to order a product from UP, it must first be created via the catalog interface.
For this purpose, all properties of the product are defined and saved as an article number.
This article number can later be used for order creation.