2017 © Pedro Peláez
 

library product-comparison

Product Search/advertisement Package for Flipkart & Amazon & Snapdeal

image

phpscots/product-comparison

Product Search/advertisement Package for Flipkart & Amazon & Snapdeal

  • Tuesday, May 23, 2017
  • by sharadjaiswal1411
  • Repository
  • 1 Watchers
  • 0 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 33 % Grown

The README.md

original package

https://github.com/jsartisan/shopkart-laravel/ br/ Upgarding package for laravel 5.4 br/ Upgrading dependencies phpunit and guzzle http br/ Creating support for snapdeal, (*1)

Please Don't use, Still in development

Shopkart-Laravel is a very simple package for laravel for making call to Flipkart and Amazon Search APIs., (*2)

Installing Shopkart-Laravel

Install through Composer., (*3)

composer require phpscots/product-comparison dev-master, (*4)

Next, add the service provider to app/config/app.php. :, (*5)

# app.php

'providers' => [
    // ..
    Phpscots\ProductSearch\ProductSearchServiceProvider::class,

]

Also add the facade. :, (*6)

# app.php

'aliases' => [
    // ..
    'ProductSearch'  => Phpscots\ProductSearch\Facades\ProductSearch::class,

]

Now add your flipkart and amazon affilate id credentials in services.php, (*7)

# services.php

    // ..
    'amazon' => [
        'client_id'         =>  'your_amazon_client_id',
        'client_secret'     =>  'your_amazon_client_secret/',
        'tag'               =>  'your_amazon_id_tag',
        'country'           =>  'your_country_code'
    ],

    'flipkart' => [
        'client_id'         =>  'your_flipkart_client_id',
        'client_secret'     =>  'your_flipkart_client_secret',
        'country'           =>  '',
        'tag'               =>  ''
    ],
    'snapdeal' => [
        'client_id'         =>  'your_snapdeal_client_id',
        'client_secret'     =>  'your_snapdeal_client_secret',
        'country'           =>  '',
        'tag'               =>  ''
    ],

Usage

Amazon API

To search for product in amazon api , write : , (*8)

    ProductSearch::with('amazon')->search('PS3','Electronics');

This will return list of products based on Keyword 'PS3'.The important thing is you have to pass the Search Index for Amazon Search API Request which is 'Electronics' in our case. Check more about it here - Search Indices., (*9)

First parameter of amazon search method is the keyword and second parameter is the Search Index., (*10)

Flipkart API

To search for products in flipkart api, write : , (*11)

    ProductSearch::with('flipkart')->search('PS3',5);

This will return list of flipkart products from their api based on keyword specified.('PS3' in our case)., (*12)

First parameter of flipkart search method is the keyword and second parameter is the result count i.e. number or product you want from api. ( max 10 )., (*13)

Please Don't use, Still in development

Online Interview Questions, (*14)

The Versions

23/05 2017

dev-master

9999999-dev

Product Search/advertisement Package for Flipkart & Amazon & Snapdeal

  Sources   Download

MIT

The Requires

 

The Development Requires

by Sharad Jaiswal

amazon flipkart