TourCMS community

For users of the TourCMS tour operator ecommerce platform

Graham Edgeley

Setting up a summary price list table on our website linked to TCMS tours/prices database

We need a page on our website with a price summary of the individual tours displayed for different party sizes and seaons, linked through to the pricing and season tables on TCMS. Is this something which could be set up by API or is there a report within TCMS would could be set up with a link to the web?

Views: 7

Reply to This

Replies to This Discussion

Hi Graham,
This would probably be best with a CMS templates driven page. A "Single Page Template" could be used to produce the HTML (web page) directly, or it could produce a data file (XML, CSV etc) which your developer could process using PHP to get the values out.

Presuming you are producing HTML the code would be something like the code below will list all Tours with a table of their "Freesale Seasons" underneath:

<TourCMSlist_tours orderby="name">
<h2><$TourCMStour output="t_name"$></h2>
<table>
<tr>
<th>From</th>
<th>To</th>
<th>Price</th>
</tr>
<TourCMStour_freesale_seasons orderby="start_date">
<tr>
<td><$TourCMSfreesale output="f_start_date_display"$></td>
<td><$TourCMSfreesale output="f_end_date_display"$></td>
<td><$TourCMSfreesale output="f_price_display"$></td>
</tr>
</TourCMStour_freesale_seasons>
</table>
</TourCMSlist_tours>


There are optional attributes you can use to change the ordering of Tours, limit which Tours get shown, list Departures or display pretty much any other element. For details see the CMS template documentation.

As you use TourCMS for your booking engine but not to manage your developer will need to go into Website Manager > FTP Setup and load some FTP settings so TourCMS can log onto your website to store the page. Probably best to work in a new sub-directory to avoid accidentally overwriting anything that's there already.

Then it's just a case of heading to Website Manager > Single Page Templates, saving a new Template with the above code and then clicking "Rebuild" (and then Rebuilding just that template).

Using CMS templates would require you to log into TourCMS occasionally and "Rebuild" the page to update the dates & prices, the API wouldn't require this however for the example you have given it would be a bit more complex to set up.

Paul
Hi Paul,

Is there any chance we can read in a remote xml file and display within our cms? It'd be preferrable if there was an xml file always available which we could read 'on the fly'.

Darren
Hi Darren,
The template code above could be used to produce an XML file instead of HTML (just swap out the HTML tags for XML tags of your choice), this could then be transferred via FTP to a location of your choosing by clicking "Rebuild" on the template.

Obviously that is local rather than remote, if you don't want TourCMS to send you the file you could pull something together from the XML API, perhaps with a CRON job to cache the output locally as to get the full pricing/availability for all Tours in one page you would be doing multiple API calls.

Generally (i.e. no specific knowledge of your setup) I would say the former is technically simpler but does create a manual process moving forward to generate the file.

Paul
OK, this being the case, then you're probably right. So would you send the html file that your system generates, via ftp, to a specific directory on our server each time, or web root - and does it overwrite the last one or rename it?
The file would be overwritten each time it gets generated, you load FTP settings (which would control where TourCMS logs in) then when you set up your template you can configure the path.

http://www.tourcms.com/support/webdesign/tags_overview.php
OK, can you generate a test if i give you ftp details here - or could you let me know where to login and generate the file?
Hopefully everything you need is in my first post on this topic, more detail via the above link.
Yes, i imagine so. Graham has sent login details for his tourCMS admin, but I don't have a record of where to log in.
http://www.tourcms.com/

About half way down the page, on the left hand side click "MAIN LOGIN"
Paul,

I've followed your steps added the following single page template:
http://www.villageways.com/tourcms/pricesummary.php and made that directory writable, added ftp details also, but rebuilding the template does not result in a file ftp'd to that directory.

Darren
Hi Darren,
I just logged in using the FTP details you have entered in TourCMS and can see "pricesummary.php" in the root, it appears to contain the dates & prices ok.

EDIT: Additionally I have just rebuilt the page (presumably you have changed the path of the template since rebuilding the first time) and now have a "/tourcms/pricesummary.php". However, the link still isn't working, presumably the FTP login details you have entered don't match up to the root of the actual villageways.com website?

Paul
OK thanks. I had entered the wrong ftp details by mistake. It seems to be working now. I'll contact Graham.

RSS

© 2012   Created by TourCMS team.

Badges  |  Report an Issue  |  Terms of Service