Posts

Showing posts with the label php

Netsuite PHP Toolkit ADD Record Example ( SuiteTalk WebServices)

Image
 In this example demo we will create a simple php form and send the data to Netsuite to create a contact record through PHP Toolkit for SuiteTalk WebServices. First you need to download the php tool kit and define configuration like connection details in php config file. After that you need to import  require_once '../PHPToolkit/NetSuiteService.php'; In each php file where you want to use the Netsuite Webservices for PHP <!DOCTYPE HTML> <html> <head> <style> .error {color: #FF0000;} </style> </head> <body> <?php require_once '../PHPToolkit/NetSuiteService.php' ; if ($_SERVER[ "REQUEST_METHOD" ] == "POST" ) { $contact = new Contact(); $contact-> entityId =$_POST[ "firstName" ]. ' ' .$_POST[ "lastName" ]; $contact-> firstName = $_POST[ "firstName" ]; $contact-> lastName = $_POST[ "lastName" ]; $contact-> phone

Parsing complex jason data in php

<?php $json = '{ "productsku": "", "name": "", "description": "", "short_description": "", "meta_description": "", "status": "", "tax_class_id": "", "price": "", "img": "", "img1": "", "img2": "", "img3": "", "img4": "", "img5": "", "category_id": "", "variant": [ { "seqId": 3, "SKU": "", "attribute": [ { "attribute_name": "size", "value": "l" }, { "attribute_name": "color", "value": "red" } ] }, { "seqId&qu