User Tools

Site Tools


building

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
building [2013/01/07 12:00]
cruisefactory
building [2018/08/31 17:26] (current)
cruisefactory
Line 179: Line 179:
 FROM FROM
  sailingdates,  sailingdates,
- factorysailingdates+ specialsailingdates
 WHERE WHERE
- factorysailingdates.`special_id`=1234567 + specialsailingdates.`special_id`=1234567 
- AND factorysailingdates.`sailingdate_id`=sailingdates.`id`+ AND specialsailingdates.`sailingdate_id`=sailingdates.`id`
 ORDER BY ORDER BY
  sailingdates.`sailingdate` ASC  sailingdates.`sailingdate` ASC
Line 189: Line 189:
 The above would return all sailing dates available for the special ID 1234567. The above would return all sailing dates available for the special ID 1234567.
  
-====== Uploaded PDF Retrieval =====+===== Uploaded PDF Retrieval =====
 To download a PDF attached to your special, you can use the following URL: To download a PDF attached to your special, you can use the following URL:
   http://images.cruisefactory.net/pdf/[SPECIAL ID]/[PDF NAME].pdf   http://images.cruisefactory.net/pdf/[SPECIAL ID]/[PDF NAME].pdf
Line 197: Line 196:
   http://images.cruisefactory.net/pdf/1111111/Cruise_Details.pdf   http://images.cruisefactory.net/pdf/1111111/Cruise_Details.pdf
 would fetch the attached PDF for the special ID 1111111. would fetch the attached PDF for the special ID 1111111.
 +
 +
 +
 +===== eFlyer Retrieval =====
 +To download the eFlyer you can use the following URL:
 +  http://images.cruisefactory.net/eflyer/[SPECIAL ID].pdf
 +
 +The [SPECIAL ID] being the number corresponding to the special you’re fetching the eflyer PDF for. For example:
 +  http://images.cruisefactory.net/eflyer/1111111.pdf
 +would fetch the eflyer PDF for the special ID 1111111.
 +
 +
 +
 +
 +===== Autoflyer Retrieval =====
 +To download a special auto-flyer use the following URL:
 +  http://images.cruisefactory.net/autoflyer.html?special_id=[SPECIAL_ID]&sailingdate=[YYYY-MM-DD]
 +
 +
 +
 +
 +===== Image Archive =====
 +Images are archive into gzipped tar files ready for download. They can be rather large in download size and are updated once every week. They are available as follows:
 +  http://images.cruisefactory.net/images/archive/destinations.tar.gz
 +  http://images.cruisefactory.net/images/archive/cruises.tar.gz
 +  http://images.cruisefactory.net/images/archive/cruiselines.tar.gz
 +  http://images.cruisefactory.net/images/archive/ships.tar.gz
 +  http://images.cruisefactory.net/images/archive/ports.tar.gz
 +
 +===== Image References =====
 +You may link directly to the images on the Cruise Factory server or download them to your own server using a batch script.
 +
 +Use the URLs below to link the image reference in the XML data to the image on the Cruise Factory server.
 +
 +An example using the an image reference found in the cruise XML data:
 +  http://images.cruisefactory.net/images/cruises/cruise__11968102406861
 +
 +==== cruises ====
 +  http://images.cruisefactory.net/images/cruises/
 +
 +==== ports ====
 +  http://images.cruisefactory.net/images/ports/
 +
 +==== deck plans ====
 +  http://images.cruisefactory.net/images/ships/deckplans/
 +
 +==== ships (photos) ====
 +  http://images.cruisefactory.net/images/ships/photos/
 +
 +==== ships (thumbnails) ====
 +  http://images.cruisefactory.net/images/ships/thumbnails/
 +
 +==== ships (large) ====
 +  http://images.cruisefactory.net/images/ships/largeimages/
 +
 +==== ship cabins ====
 +  http://images.cruisefactory.net/images/ships/cabins/
 +
 +==== ships cabin photos ====
 +  http://images.cruisefactory.net/images/ships/cabinphotos/
 +
 +==== dining ====
 +  http://images.cruisefactory.net/images/cruiselines/dining/
 +
 +==== kids programs ====
 +  http://images.cruisefactory.net/images/cruiselines/kidsprograms/
 +
 +==== destinations ====
 +  http://images.cruisefactory.net/images/destinations/image/
 +
 +===== Incremental feed & images =====
 +The incremental XML feed for cruises now updates the row for each cruise that has had its image updated.
 +
 +We recommend that you include functionality into your import scripts to automatically compare and update these images so that your site is always displaying the most up to date and correct images.
 +
 +===== Port latitude & longitude =====
 +The latitude and longitude coordinates are now included for each port within the Cruise Factory database. You can [[structure#latlong|view the structure of the table here]].
 +
 +To access a coordinate of a port you will need to have both the `ports` and `latlong` tables imported successfully. They will then link together via the `ports.id` and `latlong.port_id` columns.
 +
 +For example, to retrieve all ports with their corresponding lat/long coordinates you could run a query as such:
 +
 +<code sql>
 +SELECT
 + ports.*,
 + latlong.lat,
 + latlong.long
 +FROM
 + ports,
 + latlong
 +WHERE
 + ports.id=latlong.port_id
 +</code>
 +==== Google maps ====
 +As a suggested usage for the new port coordinates we recommend using [[https://developers.google.com/maps/documentation/javascript/tutorial|Google Maps Javascript API]] for creating an interactive map of the selected port for your site visitors.
 +
 +If you follow the tutorial at the link above you will have an API key to access the Google API for you own site. You will then be able to generate maps that display your selected ports using the Cruise Factory provided latitude/longitude coordinates by editing this in your Google map javascript:
 +
 +<code javascript>
 +var mapOptions = {
 + center: new google.maps.LatLng(-34.397, 150.644),
 + zoom: 8
 +};
 +</code>
 +
 +By entering in (dynamically) the lat & long of the port into the above you will find that the map automatically centers on the location of the port in your Google map widget.
 +
 +Read the [[https://developers.google.com/maps/documentation/javascript/tutorial|Google Maps JavaScript API]] for more details on how to customize your maps.
 +
 +==== Amended Conditions ====
 +Cruise lines may require specific conditions and disclaimers for the bookings and pricing. We have a table named ''amended_conditions'' which will give you the details required by the cruise line for display on your site. Currently on a per sailing date basis, we provide the pricing disclaimer and terms & conditions text that must be displayed.
 +
 +As above the required table name is ''amended_conditions'' which has 3 fields of interest:
 +  * **''sailingdate_id''**
 +    * This will link to the current sailing:
 +    * ''sailingdates.id = amended_conditions.sailingdate_id''.
 +  * **''disclaimer''**
 +    * This text must be displayed. Suggested under the pricing.
 +  * **''conditions''**
 +    * This text must be displayed.
 +    * Will usually be much longer text and should be displayed under a "Terms & Conditions" heading.
building.1357520414.txt.gz · Last modified: 2013/01/07 12:00 by cruisefactory