Jump to content

didz666

Members
  • Posts

    11
  • Joined

  • Last visited

didz666's Achievements

Newbie

Newbie (1/5)

0

Reputation

  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
  7. Hi basically I have a html listing template that i want to show related products using an ebayapi call. The call is written in php and displays related products based on keyswords etc. its as simple as that. Is using an ajax call to access the php the way to go. thanks
  8. Hi its not the php i have issues with its getting any type of php to load with in ebay, I have tried linking the php as you would with a js script using the full url with no joy and i have converted my template into a php doc rather than a html and still the php will not load.
  9. Hi i have a php app that uses the ebay api to pull related products and feedback etc for a custom template i have built but cannot for the life of me get the php script working in ebay. Does any one have any experience using php within ebay any help would be really appreciated. thanks
  10. Hi Ch0cu3r thanks i feel stupid now for asking. appreciate your help. thanks
  11. Hi all new to php and this forum i have been looking around and im very impressed most questions get answered not like on some of the forums around. Is there any one kind enough to help me out i have an api call via php and would like to output the results to owlcarousel where do i start with this. Code i have is: <?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'; // URL to call $version = '1.0.0'; // API version supported by your application $appid = 'YourAppID'; // Replace with your own AppID $globalid = 'EBAY-GB'; // Global ID of the eBay site you want to search (e.g., EBAY-DE) $query = 'tools'; // You may want to supply your own query $safequery = urlencode($query); // Make the query URL-friendly // 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 .= "&storeName=yourstorename"; $apicall .= "&paginationInput.entriesPerPage=6"; $apicall .= "&paginationInput.pageNumber=1"; // 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) { $pic = $item->galleryURL; $link = $item->viewItemURL; $title = $item->title; $price = $item->currentPrice; // For each SearchResultItem node, build a link and append it to $results $results .= "<div id='item'><div class='img-wrap' align='center'><img src=\"$pic\" class='itemimg'></div> <div class='itemtxt' align='center'><a href=\"$link\">$title</a>$price</div></div>"; } } // If the response does not indicate 'Success,' print an error else { $results = "<h3>Oops! The request was not successful. Make sure you are using a valid "; $results .= "AppID for the Production environment.</h3>"; } ?> <html> <head> <body> <table> <tr> <td> <div id="result"> <?php echo $results;?> </div> </td> </tr> </table> </body> </html> Im sure is pretty basic but being new to this i have no idea where to start, any advice would be much appreciated. 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.