Data feed file integration price comparison shopping script

Documentation Wiki - - Online merchant datafeed integration for affiliates : DFFDFFML

HomePage | Categories :: PageIndex :: RecentChanges :: RecentlyCommented :: Login/Register
Home Affiliate FAQ Merchant FAQ Examples Merchants Networks & Programs Forum Blog Wiki Knowledge Base Login

DFFML - Mark-up Language

DFFML Functions

DFFML stands for DFF mark-up language. DFFML is a combination of HTML + DFF placeholders.
DFFML is one of the three needed major components to generate a web page easily using DFF shopping data.
Eventhough DFFML is not required, we hope DFFML will make it easier to create web pages providing complete separation between Layout,Styles vs Data.
DFFML will also provide a shareable Layout + Style across different web scripting languages.

You can think of DFFML kind of like a template. It is similar like downloading a web site template from many free web site template sites. You will get an empty shell contain text, titles and content which you have to change yourself. The difference between typical web site template vs DFFML is that DFFML contents will be driven by data from specific DFF search engine via JSON -> array.

Why we created DFFML?
We have created DFFML to help affiliates generate and manipulate output. DFFML is basically HTML combined with DFF data placeholders. Your can include CSS styles within DFFML since it is just HTML but we recommend to separate contents against styling.

Why use DFFML?

DFFML Placeholder Syntax
Full DFFML placeholder syntax (NON - ROW)

Full DFFML placeholder syntax (ROW(s) LOOPING)

Always starts with Placeholder Starter = <|DFF| and ends with Placeholder ending = |>.
Between the starter and ending you can enter the 1 (one) Fieldname.
Fieldname can be a multilevel array which you will use => between the array levels.
Fieldname value can be processed with some supported PHP like functions and function + parameters (funcparam). Using function is optional, so most of the time you will not use the function(...)^ in your placeholder. The character ^ is used to separate between function and fieldname if function does exists. List of functions supported by DFFML.
The last section of the placeholder (|param~param...param) is optional also. This is may be used in the future to pass in additional parameters. In the Rows Looping Placeholder version, these parameters (|param~param...param) can contain offset=# and/or limit=# separated by ~ between the parameters.

Using Rows Looping
Since DFF shopping functionality always list and displays a lot of data. We need to have a way to display ROWS of array data using the same set of HTML codes. DFFML supports looping through a subset of DFFML to list rows or columns of data. The Rows Looping functionality require different Placeholder Starter (<|DFF|ROWS=) and Placeholder Ending (|END|>). Any DFF placeholder(s) inside the ROWS Looping will always points to the child of the fieldname array specified at the started <|DFF|ROWS=. For example, lets say you have an array of the following structures:

                [0] = 'name'=>'level3-0'
                [1] = 'name'=>'level3-1'
                [2] = 'name'=>'level3-2'

To loop and display contents of array[Level1][Level2][name] you have to use the following DFFML codes:
	Content of level 3 is: <|DFF|name|> <br>

This will generate the following output:
Content of level 3 is: level3-0
Content of level 3 is: level3-1
Content of level 3 is: level3-2

Using any PHP Global variables
Instead of only using variables within the main inputted parent array, you can actually access any PHP variable as long as they are global / public.
To use any PHP global variable within DFFML placeholder simply add PHP{...fieldname...} before and after the field(s)names.
For example: <|DFF|PHP{myPublicVariable}|>

You can also access any PHP Global / Public array by using => separator between the fieldname(s) / sub-array(s).
For example: <|DFF|PHP{myPubicArray=>subarray1=>subarray2}|>

Evaluate any expression within DFFML
Sometime you need to calculate or return a certain PHP expression within DFFML. For this reason we provided the capability to perform PHP Eval function within DFFML.
The syntax is: <|DFF|PHPEVAL{....php expression...}|>
Please note since your eval expression will be executed within a local function, you must use $GLOBALS[...][][] to access any global/public variable.

Example to increase the value of $i :
(don't forget the ;)

Example to execute expression and return the value:
<|DFF|PHPEVAL{return $GLOBALS[i]++;}|>
(you must use return to return value back to DFFML output)

How can I get DFFML?
You can get samples of DFFML from our Open Source Code wiki.

How can I create my own DFFML?
To create your own DFFML, you have to first understand the DFFML Syntax. You also need to know the structure of the data that you will be using inside the DFFML.
There is no specific list of DFFML Placeholders since any placeholder is basically just a variable depending on which data array you are using.
For example, if you are creating a page to display search result from PSE (product search engine) you will have to see the search result array structure and use those array elements for your DFFML placeholders.

How can I share DFFML?
We will create a sharing platform later to allow affiliates to cut-and-paste your DFFML to share with other affiliates.

How can I customize DFFML obtained from DFF or other affiliates?
DFFML is mostly HTML, so you can modify any of the HTML freely. If HTML contains CSS IDs or Classes elements you can either add the CSS elements before or after the DFFML or even on a separate CSS file.

There are no comments on this page. [Add comment]

Integrate price comparison shopping data feed file from thousands of online merchant product data feeds | Valid CSS

Page was generated in 0.0468 seconds