Welcome to the ZingMap development blog.

Our blog provides how-to instructions, development stories, and realistic solutions that we've implemented for our clients.
Please note this blog is intended for developers and programmers.

Which to use: WordPress multisite, separate websites, or a shared install on two domains?

Many times I have been tasked to build two websites for a business. As a developer it is my responsibility to advise how these two websites should interact, or if they should interact at all. This can be very difficult for the developer, and can be very expensive for the client.

In this post I will share from my past experiences – good and bad – to try to help you make the right decision.

The question is: If you are building two websites, which should you use?

  1. Two separate WordPress websites
  2. One multisite with two sub-sites
  3. One website connected to two domains
read more…

How to optimize slow queries caused by filtering many meta_query custom fields in WordPress.

If you are working with a custom post type that has many fields you might want to let users filter by those fields. This filtering can be very powerful. With the limitations of a MySQL and more specifically, WordPress’s metadata tables, filtering by custom fields can become slow. This post describes one such scenario, and a few solutions. One ideal solution for WordPress’s metadata tables.

read more…

Self-boxed products with the WooCommerce UPS Shipping Method plugin

“Today a customer called in to let us know a product was being quoted by UPS for $90 to be shipped, while using the UPS calculator yourself showed a total cost of $30.”

– Client’s support ticket

That’s an upsetting bug report to get from a client, especially when it’s not your own code that is broken. This is for the official WooCommerce UPS Shipping Method plugin. It can be difficult to fix an external plugin.

As it turned out, the large dimension product could only fit in an even larger custom box size we had entered. The product in question was already packed and ready to be shipped as-is, though. The plugin was effectively trying to double-box the product. But there is no way to tell the plugin that the product does not need to be boxed.

In this article you’ll find my solution, where you can tell WooCommerce which products are already boxed and should not be combined with other packages. Here is the option we’ll be adding to your WooCommerce products:

read more…

Updating Google Maps latitude/longitude after importing addresses into ACF

Let’s assume you are setting up a store locator or distance search system on WordPress. The client provided you with a spreadsheet of companies that you’ve already imported to a post type. The spreadsheet included business name, phone numbers, and the address.

Along the way you’ve realized the address alone will not work for putting a pin on Google Maps, or calculating the miles between a visitor’s zip code and the business address. You need the Latitude and Longitude, too, which your client probably does not have.

This tutorial will provide some code and explanation on how you can (mostly) automate Google’s GoeCoding API to get the latitude and longitude of addresses.

read more…