agoda script and manual

12
8/10/2019 Agoda Script and Manual http://slidepdf.com/reader/full/agoda-script-and-manual 1/12 Manual for Affiliate Searchbox V2.1  2012 agoda.com Page 1 of 12 Manual For Affiliate Searchbox V2.1

Upload: purejoenage

Post on 02-Jun-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Agoda Script and Manual

8/10/2019 Agoda Script and Manual

http://slidepdf.com/reader/full/agoda-script-and-manual 1/12

Manual for Affiliate Searchbox V2.1

 2012 agoda.com Page 1 of 12

Manual For

Affiliate Searchbox V2.1

Page 2: Agoda Script and Manual

8/10/2019 Agoda Script and Manual

http://slidepdf.com/reader/full/agoda-script-and-manual 2/12

Manual for Affiliate Searchbox V2.1

 2012 agoda.com Page 2 of 12

Contents

MANUAL INFORMATION ................................................................................................................... 3 

PART I: SCRIPT................................................................................................................................... 3 

SCRIPT DESCRIPTION .......................................................................................................................... 3 

PART II: CSS STYLE ............................................................................................................................. 9 

APPENDIX ....................................................................................................................................... 11 

LANGUAGE TABLE ............................................................................................................................ 11 CURRENCY TABLE ............................................................................................................................ 12 

Page 3: Agoda Script and Manual

8/10/2019 Agoda Script and Manual

http://slidepdf.com/reader/full/agoda-script-and-manual 3/12

Manual for Affiliate Searchbox V2.1

 2012 agoda.com Page 3 of 12

Manual Information

This document is to explain how to implement the agoda.com searchbox on partner sites. It will

be divided into 2 parts including a script and a CSS style according to a description below.

Part I: Script

To implement the search box, just copy/paste the following code onto your website where you

would like the search box to appear. The different elements in the code and how they can be

used to adjust the workings of the search box are further explained below.

<div id="SearchBox">&nbsp;</div><script

src="http://ajaxsearch.partners.agoda.com/partners/SearchBox/Scripts/Agoda.SearchBoxV2.1.js" type="text/javascript"></script>

<script type="text/javascript">

var AgodaSearch = new AgodaSearchBox({cid: 000000,filterCityName: '',fixedCityName: false,fixedCityNameVisible:true,

hotelID: '',checkInDateBefore:3,night:2,language:1,

currencyCode: 'USD',newWindow: false,header: '',footer: '',style: 'style4',Element: 'SearchBox'

});</script>

<!-- Default,CmsLanding,Style1, Style2,Style3,style4, Style6-->

Script Description

No Parameter Value Description

1. cid:(required) 

A site ID that the affiliate receives from Agoda

2. filterCityName:'Bangkok'

-  A pre-defined city name

e.g. 'Bangkok' (see the picture below)

-  Blank ('') is acceptable. 

Page 4: Agoda Script and Manual

8/10/2019 Agoda Script and Manual

http://slidepdf.com/reader/full/agoda-script-and-manual 4/12

Manual for Affiliate Searchbox V2.1

 2012 agoda.com Page 4 of 12

No Parameter Value Description

3. fixedCityName: false(required) 

-  The value for this parameter that the affiliate user can set are

only ‘true’ or ‘false’ as explanation below: 

 true means the city name that the affiliate user set for a“filterCityName” parameter will be shown as a fixed value. The

customer is unable to choose a city name as a following picture:

 false means the city name search box is able to be customizedas a free text search box as a following picture:

4. Fixedcitynamevisible -  The value for this parameter that the affiliate user can set are

only ‘true’ or ‘false’ as explanation below: 

  true means the city name field will be visible in the searchbox

and the customer is able to see the search destination set in

the searchbox.

  false means that the city name field is hidden on the

searchbox and elements of the searchbox are moved up in

order to compact the searchbox.

8. hotelID: '' - 

A fixed hotel ID. If the affiliate user set the hotelID value, asearch result will display only for the fixed hotel. However, they

Page 5: Agoda Script and Manual

8/10/2019 Agoda Script and Manual

http://slidepdf.com/reader/full/agoda-script-and-manual 5/12

Manual for Affiliate Searchbox V2.1

 2012 agoda.com Page 5 of 12

No Parameter Value Description

can fix only one hotel.

-  Blank ('') is acceptable.

9. checkInDateBefore: 1(required)

-  This parameter refers to a pre-defined check-in date. The

value ranges from 1 to 30. Its value is a numbers of days after

current day. The minimum day that affiliate user can set is 1which is the next day from current day (default). However, a

customer is able to select a check-in date from a provided

calendar.

e.g. a current date is “17 Jun 2011”, then the result of this value(1)

will be shown as a following picture:

10. night: 1(required) 

-  A number of nights to stay

11. language: 1(required) 

A language ID for a language display in the search box. (seethe language table in the appendix section) The default

language is 1 which is English.

12. currencyCode: '' -  A currency code for the room rate in the search page. (see

the currency table in the appendix section)

-  Blank ('') is acceptable while the default currency is USD (US

dollar).

13. newWindow: false

(required) 

-  This parameter refers how to display a search result whether it

is a new window or in the same one. The parameter that theaffiliate user can set are only ‘true’ or ‘false’ as explanation

below:

 true: It will display a search box in a new window.

false: It will display a search box in a current window.

14. header: '' -  An URL for header in a search result window. (see example at

below picture)

Blank ('') is acceptable while the default header is Agoda’s

Page 6: Agoda Script and Manual

8/10/2019 Agoda Script and Manual

http://slidepdf.com/reader/full/agoda-script-and-manual 6/12

Manual for Affiliate Searchbox V2.1

 2012 agoda.com Page 6 of 12

No Parameter Value Description

header.

15. footer: '' -  An URL for footer in a search result window.

-  Blank ('') is acceptable while the default footer is Agoda’s

footer.

16. style: - 

A style of the search boxAgoda currently provides 6 searchbox styles

  Style1

  Style2

  Style3

Page 7: Agoda Script and Manual

8/10/2019 Agoda Script and Manual

http://slidepdf.com/reader/full/agoda-script-and-manual 7/12

Manual for Affiliate Searchbox V2.1

 2012 agoda.com Page 7 of 12

No Parameter Value Description

  Style4

  Blank ('') or Default

 

  CMSLanding

 

Page 8: Agoda Script and Manual

8/10/2019 Agoda Script and Manual

http://slidepdf.com/reader/full/agoda-script-and-manual 8/12

Manual for Affiliate Searchbox V2.1

 2012 agoda.com Page 8 of 12

No Parameter Value Description

  Style6

17. Element: 'SearchBox'(required) 

 A searchbox name. It must be the same name as the parameter

“id”. 

Remark:

• 

The Javascript within the searchbox code will check for any JQuery conflicts. The searchbox

must be installed after the last JQuery script on your page.

•  All parameters are required in this script.

•  (Required) means the value of each parameter is required.

•  The value of parameters is case sensitive.

• 

The amount of 1 room, 2 adults and no children is sent by default. The customer can change

these criteria within Agoda website.

•  The DMC has already been fixed by the affiliate team.

As can be seen in the above code, the new search box comes in a number of different styles. You canswitch between these by simple change the style parameter in the code to the desired styles name

The style set in the above code, style4, is identical in size to the old Agoda search box. 

Page 9: Agoda Script and Manual

8/10/2019 Agoda Script and Manual

http://slidepdf.com/reader/full/agoda-script-and-manual 9/12

Manual for Affiliate Searchbox V2.1

 2012 agoda.com Page 9 of 12

Part II: CSS Style

The Affiliate user can adjust the search box in various ways using CSS. The search box is separated

into elements to facilitate the affiliate user to customize as the picture below The CSS elements have

to be included in the users own style sheet and adjusted from there: 

Each element can be described by the following description.

No Element Name Description Area

1. AgodaSearchBox All area ofseachbox

2. CityRow A row for cityincluding a citylabel and a cityfield

3. CityLabel A label for city

4. CityField A text box of a cityname

5. CheckInRow A row for a check-in date and night

6. CheckInLabel A label for check-indate

Page 10: Agoda Script and Manual

8/10/2019 Agoda Script and Manual

http://slidepdf.com/reader/full/agoda-script-and-manual 10/12

Manual for Affiliate Searchbox V2.1

 2012 agoda.com Page 10 of 12

No Element Name Description Area

7. TxtCheckInDate A check-in datedisplay box

8. NightLabel A label for nights

9. Night A drop down list fornights

10. SearchButtonRow A row for searchbutton

11. SearchButton A search button

Page 11: Agoda Script and Manual

8/10/2019 Agoda Script and Manual

http://slidepdf.com/reader/full/agoda-script-and-manual 11/12

Manual for Affiliate Searchbox V2.1

 2012 agoda.com Page 11 of 12

Appendix 

Language Table

Language ID Language Name

1 English

2 French

3 German

4 Italian

5 Spanish

6 Japanese

7 T.Chinese / Hongkong

8 S.Chinese / Mainland

9 Korean

10 Greek11 Russian

12 Portugese

13 Dutch

22 Thai

23 Malay

24 Vietnamese

25 Swedish

26 Indonesian

27 Polish

28 Norwegian

29 Danish

30 Finnish

31 Czech

32 Turkish

33 Catalan

34 Hungarian

35 Hindi

36 Bulgarian

37 Romanian38 Slovenian

39 Hebrew

40 Arabic

46 Lithuanian

47 Latvian

48 Croatian

49 Estonian

50 Ukrainian

Page 12: Agoda Script and Manual

8/10/2019 Agoda Script and Manual

http://slidepdf.com/reader/full/agoda-script-and-manual 12/12

Manual for Affiliate Searchbox V2.1

 2012 agoda.com Page 12 of 12

Currency Table

Currency Code Currency Name

AED Arab Emirates Dirham

AUD Australian Dollar

BRL Brazilian Real

CAD Canadian Dollar

CHF Swiss Franc

CNY Chinese Yuan

CZK Czech Koruna

DKK Danish Krone

EUR Euro

GBP British Pound

HKD Hong Kong Dollar

HUF Hungarian Forint

IDR Indonesian Rupiah

ILS New Israeli Sheqel

INR Indian Rupee

JPY Japanese Yen

MYR Malaysian Ringgit

NOK Norwegian Krone

NZD New Zealand Dollar

PHP Philippine Peso

PKR Pakistan Rupee

PLN Polish ZlotyRON New Leu

RUB Russian Ruble

SAR Saudi Riyal

SEK Swedish Krona

SGD Singapore Dollar

THB Thai Baht

TRY Turkish Lira

TWD Taiwan Dollar

USD US Dollar

VND Vietnamese Dong

ZAR South African Rand