Datafeed Studio V2.8 Released with Web Service API and User Functions

Muno guitar loves Datafeed Studio

Apart from a couple of minor bug fixes, the main thrust of this 2.8 release is the introduction of a Web Service (REST) API that allows you to access your products remotely.

Product API

The first client of the new API is the Datafeed Studio WordPress plugin.

The upshot is that you can now access your Datafeed Studio products from any WordPress installation, even if it isn’t on the same physical host as your server!

There’s also example code in the ‘extra/apiclient’ folder which will show you how you can, with just a couple of lines of PHP code, include a price compare box on any PHP enabled web page that connects to your main Datafeed Studio site to get the product details.

This is great for including on one-page quick-hitters, e.g. this Punch Bags site, when you don’t really want to go through the hassle of installing WordPress, or if you just prefer writing your own SEO optimised HTML pages but still want to have some dynamic product content.

Please note that the API must be enabled from the Config->Datafeed Studio API screen for the new WordPress plugin / API clients to work.

In future releases the API will be expanded to offer more services so watch this space 😉

User Functions

Another technical new feature in this release is the ability to create and access user defined PHP functions in the front-end store templates by creating a file in the new “user” folder named functions.inc.

Any PHP functions defined in this file will be available to use in the store templates.

For example, if you had the function :

function boo() {
	echo("Boo!");
}

In your front-end store template you could invoke this by doing :

<p tal:content="php:boo()"></p>

Note that PHP functions can also be used in the “tal:condition” attribute so you could write your own conditional functions.

ChangeLog

The full changelog is as follows :

  • import process now does a “slug” call on the mykey for the rare cases where a mykey has non-standard characters (i.e. spaces)
  • set CURLOPT_SSL_VERIFYPEER to 0 in CJ API to fix problems on some hosts if invalid/no certificate found
  • support for user PHP functions. Any PHP functions defined in the file ‘user/functions.inc’ will be available to use in front-end templates
  • made site $LOGOTEXT setting capable more flexible with accepting HTML/quotes
  • added Help link for manual feeds
  • removed redundant view log/import links on datafeed list screen for webservice merchants
  • no longer defaults to first parser in list when creating a feed
  • new config option to delete (automatic) feed files after import to save disk space
  • cache folder created as part of installation process
  • new standlone PHP API client library for accessing DS products from any PHP web page (see extra/apiclient folder for example usage)
  • dynamic category type option now automatically set when creating dynamic categories
  • support for remote content units via new built-in REST API server
  • set connection timeout of 60 seconds when trying to downlod a feed
  • cached file names are now based on a hashing algorithm
  • CJ API fix to allow multiple products from the same merchant to be added at once

This release also contains the beta code for the forthcoming voucher code integration.

If you would like to test this drop me a line.

Upgrading – Important!

Existing users please see the main README.txt for general upgrade instructions (note that there are no database changes required for this release).

Also, if you are upgrading be aware that the the following lines must must be added to your .htaccess file :

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule api/v1/(.*)$ api/v1/index.php [L]

immediately after the “RewriteBase /” line.

Download

V2.8 is available from here.

No Comment