Phoca Cart includes XML Feed feature. You can define unlimited amount of XML feeds for your products.

To start using XML Feeds, you need to create one. Go to:

Joomla! administration - Components - Phoca Cart - XML Feeds and click on New.

Each XML Feed service defines own specific options. Such options need to follow specifications set by this service. See Google Merchant header and footer example:

Phoca Cart - XML feedXML Feed

XML Feed values are defined in:

  • Products
  • Categories (Title (XML Feed), Category Type (XML Feed))
  • Stock Statuses (Title (XML Feed)).

For example, if you set Categories for Google Merchant, they have specific format and specific ID:

Apparel & Accessories > Clothing (1604)

This format and ID needs to be specified exactly so the feed will be successfully parsed.

Following feed is rendered by Phoca Cart automatically when:

  • xml, rss, channel tags are set in XML Feed - in XML Header parameter
  • channel, rss tags are set in XML Feed - in XML Footer parameter
  • item tag is set in XML Feed in XML Product element
  • title, sku, price, g:availability_date, g:condition tags are set in Products
  • g:google_product_category tag is set in Categories
  • g:availability tag is set in Products and Stock Statuses.

Phoca Cart - XML feed example - source codeXML feed example - source code

Each XML Feed includes specific URL. Such should be copied and added to XML Feed service.

XML Feed Plugins

XML Feed elements can be extended by plugins. You can define new elements in XML feed plugin and add product values to these elements in product edit:

Phoca Cart - XML feed - Product edit - Feed pluginPhoca Cart - XML Feed - Product Edit - Feed Plugin

The information is displayed in XML Feed:

Phoca Cart - XML feed including Phoca XML Feed plugin informationPhoca Cart - XML Feed including Phoca XML Feed plugin information

If you need to insert custom elements that contain the same information for each product, it is better to use the Product Fixed Elements parameter.

Phoca Cart - Product Fixed Elements parameterPhoca Cart - Product Fixed Elements parameter

Be aware, the format and correctness of these XML elements is not checked. Make sure all tags are closed correctly.

How to work with Phoca Cart XML Feed plugins:

  1. Install the plugin
  2. Activate it in Plugin Manager
  3. Go to product edit in administration and navigate to Feed Options - fill the values there. In this place - all plugins are listed, so you can fill data for all plugins
  4. Go to XML feed edit - create one and assign plugin to this XML feed with help of parameter: XML Feed Plugin.

XML Feed Stock Status

See image explaining which elements are set when stock status is managed:

Phoca Cart - XML Feed - Stock StatusPhoca Cart - XML Feed - Stock Status

XML Feed - Specific Values Set by Plugin Parameters

In XML Feed, there are specific values which can be set at different levels. For example CATEGORYTEXT tag can be set in category or in product or in product feed (parameters set by feed plugins):

  • Category - when set for category, then there is no need to set it for each product. This is possible only when you use one feed on your website.
  • Product - you can set specific category for each product. This is even possible only when you use one feed on your website.
  • Product feed - you can set specific category for each product and each feed. This solution is available when you use more feeds on your website. In Administration - Product edit - Feed options you can set the category not only for current product but for each feed too. This is useful when each feed has different format for displaying category tree.

You can define that product will be not published in some selected feed in Feed options. Just use parameter Published (Feed).

XML output produced by Phoca Cart can be even customized by Joomla! template override feature. This means that you can set completely different XML output for your feeds. The following file can be overridden:

components/com_phocacart/views/feed/tmpl/default.php.

For more information about Joomla! template override feature see Joomla! documentation.