WooCommerce – Philip Allfrey http://philip.allfrey.co.nz Web developer & WordPress specialist Tue, 25 Jul 2017 21:29:26 +0000 en-US hourly 1 https://wordpress.org/?v=5.0.2 HRtoolkit http://philip.allfrey.co.nz/2014/09/hrtoolkit/ Fri, 26 Sep 2014 00:04:24 +0000 http://philip.allfrey.co.nz/?p=242 This is one of the larger projects I have worked on. HRtoolkit provide access to an online library of HR document templates, either by annual subscription or purchase of individual documents. They wanted to update the appearance (…) Read more

The post HRtoolkit appeared first on Philip Allfrey.

]]>
This is one of the larger projects I have worked on. HRtoolkit provide access to an online library of HR document templates, either by annual subscription or purchase of individual documents. They wanted to update the appearance of their website and make it easier to manage. Their business model meant there was a lot of backend functionality which needed to be implemented.

One pain point of their existing website was that documents needed to be uploaded twice, once for member access and once for individual purchases. This was multiplied by needing to do this for each reseller site. I solved this by installing WordPress in multisite mode, and writing a custom plugin which copied uploaded documents from the master site to all sub-sites at the click of a button. I also wrote another plugin which parsed the XML of the MS Word documents and customised the footer with a different logo and contact information for each site, then used the FPDF library to generate a 5-page pdf sample of each document.  The Google Doc Embedder plugin then displays the sample document, so that users don’t have to leave the page to view it. To allow the client to keep the product description pages synced across all the sites I installed the Multi-Site Content Copier plugin and made some modifications to get the partially implementing syncing functionality working. I also needed to write a filter to make internal links relative rather than absolute, so that links to a particular page on the master site pointed to the correct page on the sub-site when copied across.

I used WooCommerce to handle the eCommerce side of the site. This also required some customisation. For example the client wanted logged-in subscribers to be able to download any document from its product description page, however out of the box WooCommerce only grants access to files associated with a particular product that has been purchased. To prevent the duplication of effort involved in adding files both to the single products and to the subscription I wrote a custom download handler, which changed the “Buy now” button to a direct download link if the member’s subscription was valid. On the document category pages the client wanted all documents to be displayed, grouped by subcategory. Again WooCommerce does not handle this out of the box so I needed to write some custom functions.

The client wanted to be able to do as much as possible from within the website backend, so for sending emails to customers I installed the SendPress Newsletter plugin. A few custom functions meant that SendPress had automatically updated lists of members, and a checkbox on the checkout page allowed signing up for the newsletter without filling in an additional form. I also customised the WP-CRM plugin to give a better interface for managing user information.

Customers found the new site easier to navigate than the previous one, leading to more sales which made the client happy.

The post HRtoolkit appeared first on Philip Allfrey.

]]>
Philip Allfrey
Driveline http://philip.allfrey.co.nz/2014/03/driveline/ Tue, 25 Mar 2014 07:02:50 +0000 http://philip.allfrey.co.nz/?p=137 For this website the client wanted to be able to present many different categories, makes, and models of vehicles which they lease. The easiest way to  organise this on the backend was to set the (…) Read more

The post Driveline appeared first on Philip Allfrey.

]]>
For this website the client wanted to be able to present many different categories, makes, and models of vehicles which they lease. The easiest way to  organise this on the backend was to set the site up as an eCommerce website, but without any purchasing functionality.

For the eCommerce side of things I used WooCommerce. The client provided a custom design, which I implemented, as usual, as a responsive,  mobile-first, Genesis child theme. With all the different types of vehicles a good search interface was key. Because much of the data was stored as custom fields I needed to install the Search Everything plugin in order for users to be able to locate the correct vehicle. The design also called for custom styled drop-down select boxes. These are a nightmare to try to handle cross-browser with CSS, so I used a jQuery plugin instead – Selecter from the Formstone family, which has a very elegant documentation website.

This project also had another couple of unusual features. One was a requirement for the possibility of having custom header image for each post, page, product, or category. While it is easy enough to use the featured image for such a purpose, most of these pages already used a featured image for another purpose. Instead I installed the Multiple Post Thumbnails plugin to handle most of these cases, WP Custom Category Image to handle the categories, and wrote a custom function to retrieve the appropriate image.

The second feature was to allow a large section of boilerplate text to be inserted on product pages via an iframe, to avoid falling foul of Google’s duplicate content penalty. To allow the client to easily edit it, this had to be a regular WordPress page with a custom page template. However because the height of the text would vary depending on the screen size I had to use a snippet of JavaScript to prevent scrollbars from appearing and breaking the illusion of seamless text.

Finally, to import and manage all the vehicles, whose prices change weekly, the client wanted the ability to upload from a spreadsheet, for which I used the free plugin WooCommerce CSV Import along with its premium addons. (This plugin has also proved used in setting up other WooCommerce sites.)

The post Driveline appeared first on Philip Allfrey.

]]>
Philip Allfrey