Skip to content

Latest commit

 

History

History
63 lines (55 loc) · 1.41 KB

File metadata and controls

63 lines (55 loc) · 1.41 KB

SmartShopping Application

It is simple application for crawler products from amz with jan number

Installation

  1. Clone app
git clone https://github.com/thanhtungka91/smartshopping.git
  1. Run app (if you dont have composer, please install php, composer before)
https://getcomposer.org/doc/00-intro.md

Then install php extension

brew search intl
brew install homebrew/php/php71-intl

Then install cakephp and libraies

composer install 
  1. Start App
bin/cake server -p 8765

Then visit http://localhost:8765 to see the welcome page.

Configuration

  1. Configue database Read and edit config/app.php and setup the 'Datasources' and any other configuration relevant for your application.

  2. Create Database a. Create database, please note that need to set utf8 which is used for saving japanese charater latter.

CREATE DATABASE smartshopping
  DEFAULT CHARACTER SET utf8
  DEFAULT COLLATE utf8_general_ci;

b. Create products table

CREATE TABLE `smartshopping`.`products` (
  `product_id` INT NOT NULL AUTO_INCREMENT,
  `product_name` VARCHAR(255) NULL,
  `product_jan` VARCHAR(45) NULL,
  `product_asin` VARCHAR(45) NULL,
  `product_amz_url` VARCHAR(255) NULL,
  PRIMARY KEY (`product_id`));

How to use the application

  1. Copy file jan to smartshopping directory example file
4904740511511
4973512257896
  1. Run crawler http://localhost:8765/crawler