Jump to content

didz666

Members
  • Posts

    11
  • Joined

  • Last visited

Everything posted by didz666

  1. Hi i have added ini_set('display_errors', '1'); to the code thanks for that, i will go do some more research thanks for your time.
  2. Hi im not explaining it right. The results returned by the call are governed by the search term "query" in my case and i then choose what to include in the output as you mentioned. There are no options within the call itself to not display an item so its all or nothing. This is my issue i want to be able to single out a product using its itemID and stop it from being displayed if its the same as the item being viewed at that time. being a total novice i have no idea where to start i may be wanting something that cant be done.
  3. Hi ginerjim thanks for your reply. I have attached the api call below. (eBay Finding api) The api does the searching and then display its findings into a jquery carousel. I know i need to add a $_REQUEST with the variable itemID or similar, its what to next im unsure about. I hope this makes better sense. I just don't want the item i'm currently viewing to be included in the similar items carousel. thanks again for your time. <?php error_reporting(E_ALL); // Turn on all errors, warnings and notices for easier debugging // API request variables $endpoint = 'http://svcs.ebay.com/services/search/FindingService/v1'; $version = '1.12.0'; $appid = ''; // Replace with your own AppID $globalid = 'EBAY-GB'; $query = ''; $safequery = urlencode($query); // Construct the findItemsByKeywords HTTP GET call $apicall = "$endpoint?"; $apicall .= "OPERATION-NAME=findItemsIneBayStores"; $apicall .= "&SERVICE-VERSION=$version"; $apicall .= "&SECURITY-APPNAME=$appid"; $apicall .= "&GLOBAL-ID=$globalid"; $apicall .= "&keywords=$safequery" $apicall .= "&paginationInput.entriesPerPage=18"; $apicall .= "&keywords="; // Load the call and capture the document returned by eBay API $resp = simplexml_load_file($apicall); // Check to see if the request was successful, else print an error if ($resp->ack == "Success" ) { $results = ''; // If the response was loaded, parse it and build links foreach($resp->searchResult->item as $item) { if ($item->pictureURLLarge) { $pic = $item->pictureURLLarge; } else { $picsml = $item->galleryURL; } $pic = $item->pictureURLLarge; $picsml = $item->galleryURL; $link = $item->viewItemURL; $title = $item->title; $price = $item->sellingStatus->convertedCurrentPrice; // For each SearchResultItem node, build a link and append it to $results $results .= "<div class='output'></div>" // include all elements you want to display echo $results; ?>
  4. Hi very new to php and all things web so please bare with me. I'm using an api call that display related items for a given product it receives from a query in the url. I would like to add another variable to the url so when i input the current product "ID" that item is not shown in the related items carousel but if no item id is found display all as normal. If that makes sense. Any help would be really appreciated.
  5. Hi fastsol thats great thanks very much, I really appreciate it.
  6. Im still learning how to use php so sorry if this is a stupid question. Is it possible to change a variable in a php using its url when calling it using ajax. <?php $variable = '1'; //can i change it via the url to 2 ?> <script> $.ajax({ type: 'POST', url: "http://mysite.co.uk/myphp.php?$variable=1", success: function (data){ $("$mydiv").html(data); } }); </script> any help would really be apreciated. thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.