Amazon Pay for Craft Commerce Plugin

Craft Commerce payment method using Amazon Pay

I’ve been doing some work recently with Craft CMS, and its ecommerce plugin Craft Commerce.  Although Craft is still up-and-coming, it’s doing quite well.  The community is great, and I love working with it.  Craft itself is quite extensible, and Commerce is progressing in that aspect.  A recent project called for a lot of customization of Commerce, and I ended up creating quite a few plugins to handle third-party integrations.

One such instance was to integrate Amazon Pay as a new payment method in Commerce.  This had not been done by anyone else to this point, and more than a few clients/developers had asked if someone knew of an existing solution.  After a lot of work, I completed the plugin, and I am making it available for purchase here.

(more…)

Code Quickie: Prettify a List of Dates

Code Quickie: Prettify a List of Dates

Most of the time, writing code can be very repetitive. There are only so many ways to handle something. However, a few times per project, I’m tasked to come up with a new solution to a challenge. After accepting and conquering the challenge, I sometimes come up with code that I’m very proud to share because of its elegance, simplicity, and/or novelty.

This particular challenge involved a report that produced a list of dates as parts of its results. When I ran a few sample reports, I noticed that I could potentially get a nigh unreadable list of numerous, consecutive dates. I decided to try and turn that horrible list into something beautiful by condensing three or more consecutive dates into a range.

(more…)

ACF – Get All Fields In A Field Group

ACF - How To Display All Fields In A Field Group

As a WordPress developer, I create a lot of custom data to give clients the functionality they want. I’ve used every way possible, like posts for a custom post type, post meta, taxonomies, options, custom tables, etc. However, for ease of use and client convenience, I mostly use either WordPress native custom fields or the Advanced Custom Fields PRO plugin. With ACF, the interface is great, and, having used it so much, I can quickly setup any field type very quickly. The most time consuming part of using custom data is when it comes time to integrate into the theme.

(more…)

WordPress 4.7: Custom Bulk Actions

Custom Bulk Actions added in WordPress 4.7

With the release of WordPress 4.7, developers have a lot to be thankful for. Many have already covered post type templates, and the addition of the REST API in the core is a game changer. There’s a few more features that came along with the release, but I’d like to cover one that I’ve been looking forward to as a developer: custom bulk actions.

(more…)

How to Handle Long-Running Scripts

Scripts Timing Out? Try this!

Data import scripts are some of the most important, common, and challenging tasks I perform. Time-outs, memory limits, and boredom are just the most common of frustrations. Once a development project enters its final stages, the conversations invariably begin to shift from functionality to data. Most clients have a lot of existing content and data that needs to be incorporated into their brand new site. The information may reside in an old database, large volumes of text files, spreadsheets, or something else entirely. Regardless of the method of storage, any transfer of a large amount of data will require some automation in the form of a script. After you’ve written a few of these types of processes, you’ll undoubtedly encounter the same issues for each one.

(more…)

ACF Post Object Add-On Plugin Released!

WordPress ACF "Post Object" Field Type Add-on Plugin Released

As promised, I’m releasing a new plugin for Advanced Custom Fields(ACF) named “ACF Post Object Add-On”. This is a relatively small plugin that appends text data to post titles in the “post object” field type within ACF. The plugin is based on my previous tutorial with a few more bells and whistles to give users more flexibility without having to edit functions.php. (more…)