Creating and using web services with PHP

Basic Implementation of a Web Service client with PHP

A web service is an application that exposes or publish its functionalities or methods through an interface. It works in client-server mode, other applications talk to the web service using messages in a standardized format. Essentially, the communication is the same as a web server returning requested data by a browser such as an HTML page, the only difference is that instead of serving up HTML in response to HTTP requests, it serves up SOAP (XML) responses to SOAP requests.

Four elements make a web service:


WescoTurf is a distributor of irrigation, golf and grounds equipment. The company had the need to start selling their products through Internet, that is why they decided to develop an E-Commerce. Based on their request, we used a familiar and large known PrestaShop eCommerce solution.

Although this tool solved most of the functionalities related to the sale and web marketing, they needed to adapt it to their business rules and also make a very custom integration with their internal ERP system (Prelude). WescoTurf offers a vast list of products and specific prices for different users, and also the same and is stored in a system they are already running in-house.


  • Prestashop: It is a free, open source e-commerce solution. The software is published under the Open Software License (OSL). It is written in the PHP programming language with support for the MySQL database management system.
  • Prelude: fully integrates all areas of a distributor's operations—from front office to back office functions.
  • jQuery: Javascript framework that offer lots of awesome features for modern websites
  • SOAP API: originally an acronym for Simple Object Access Protocol, is a protocol specification for exchanging structured information in the implementation of web services.
  • ARI Partstream:

Custom module:

  • Wescoturf module: we implemented this custom module for handling SOAP API connection between PrestaShop and Prelude ERP.

Installed module:

Overrides and customization:

  • User Registration: this default functionality has been modified in order to save this record into Prelude ERP. A Salesperson would be checking and confirming new sign up. Once this new customer is confirmed, the user will be able to actually login and proceed with a purchase.
  • Product lists: We did some changes to show all information according to the response from Prelude. Pricing and purchasing options change according to specific User groups.
  • Product view: Custom view for specific product
  • Product search: default search functionality was modified to use Prelude rules and customer group options. Product visibility and pricing depends of the customer group, therefore the user will receive search result accordingly.
  • Checkout page: further changes to connect to Prelude and retrieve proper information (product status, price, availability, etc) based on logged in customer as well as to generate the order and send this to Prelude. Besides changes that allowed the user to change their shipping address and store this information into Prelude system.
  • Open orders: a new interface where customer can check open orders from Prelude.
  • Parts Lookup: a new page where customer who belong to a specific group was allowed to perform a search for Wescoturf parts. This page connects with ARI PartStream application (3rd party software) in order to find and choose parts to add to the cart.
  • Change for customer user: New functionality was developed for allowing certain group of users to perform purchases on behalf of others. To complete this, the user enter to a section of his account and select, in a list of available users, the one who will be owner of the purchase order, then continue with the checkout process.
  • Load orders: We developed a feature for a certain group of users whom have the ability to import a list of products from a CSV files. During this action, the products is listed in the page for being added to the cart. The user is directed to the checkout page and proceed with the purchase.
  • Generate PDFs: different views were modified in order to show information in a better way so user can generate a PDF and download it. For example, quote of products and order detail page.

Serfe info(at) FALUCHO 2032, S3016LDB, SANTO TOME, SANTA FE, ARGENTINA 1-305-5375397
Cookies & Privacy: 
This website uses cookies to ensure you get the best experience on our website.

Privacy Policy