January 7, 2013

Improved WordPress to ASPDotNetStorefront integration

Filed under: General news — Tags: , , — Webopius @ 12:22 am

btn-download

Over the past few months, Webopius has received a lot of enquiries about integrating WordPress with the ASPDotNetStorefront eCommerce platform. The original blog post about this WordPress/ASPDNSF integration is here.

Originally, we wrote this as custom code for a specific client and there wasn’t an installable module that would support this integration out of the box.

Because of the amount of interest shown, we’ve now built a much better version which is currently at prototype stage that we’re planning to release shortly. It includes:

– A WordPress plugin to provide RESTful/JSON web services to remote sites such as ASPDotNetStorefront
– ASPDotNetStorefront custom controls to display Posts, Images and Pages from WordPress
– ASPDotNetStorefront custom XSLT extensions to allow WordPress data to be shown in XMLPackages
– ASPDotNetStorefront custom page to allow WordPress to be used as a Content Management System (CMS) for ASPDotNetStorefront.

Examples of how this can be used based on the prototype we have working include:

Using WordPress as a Content Management system for ASPDotNetStorefront

WordPress has a superb editor including media, tags, taxonomy mappings, HTML editing and much more. Why not use WordPress to maintain all of your page content?

For example, instead of creating an ‘About Us’ topic page in ASPDotNetStorefront, you can create and edit this and other pages using WordPress. Then within your ASPDotNetStorefront site, the URL: wp-about-us.aspx will show your standard ASPDNSF page but which contains the ‘about us’ page content from WordPress.

Displaying the latest WordPress posts on your ASPDotNetStorefront homepage

Simply include a line like this within your store’s master template:

<webopius:getposts args="numberposts=2" runat="server"/>

To show the latest two WordPress posts within ASPDotNetStorefront. You can edit the control’s HTML and decide which WordPress fields to show. All of the WordPress post fields are available.

Display a WordPress post’s thumbnail image on an ASPDotNetStorefront product page

To show a WordPress post’s thumbnail image within your ASPDotNetStorefront’s product page, simply include a line like this in your Product XML package:

<xsl:value-of select="webopius:GetPostImage(960,'thumbnail')" disable-output-escaping="yes" />

This example, displays the thumbnail image of WordPress post ID 960

Retrieve WordPress posts within an XML package

To retrieve WordPress post information within any ASPDotNetStorefront XML package, include lines such as this:

<xsl:variable name="posts" select="webopius:GetPost(960)" />
<xsl:for-each select="$posts//Post">
    <xsl:value-of select="post_title"/><br />
</xsl:for-each>

In this simple example above, WordPress post ID 960 is retrieved and the Post Title field is shown within the XML package. Again, all standard WordPress post fields are available within your ASPDotNetStorefront XML packages. You are also able to retrieve posts by ID, Category, Status and change the sort order and number of posts returned using standard WordPress queries.

If you are interested in finding out more, please contact us. We hope to release this package within the next few weeks once testing is complete.

btn-download Click here for more information and to download the module.

  • Tags