Login
Register

VirtueMart

WooCommerce

Others

Docs

Support

Blog

About

Blog

IMPORTANT ANNOUNCEMENT: Plugin development ceased, all plugins made available freely (GPL)

With great sadness we have to announce that we are ceasing development of all our VirtueMart, WooCommerce and Joomla plugins. Effective immediately, all our plugins -- even those that were paid downloads -- are made available for free from our homepage (GPL license still applies), but we cannot and will not provide any support anymore.

It has been a great pleasure to be part of the thriving development communities of VirtueMart as well as WooCommerce. However, during the last year it became painstakingly clear that in addition to a full-time job, a young family and several other time-consuming hobbies at professional level (like being a professional singer) the plugin development and the support that it requires is not sustainable and is taking its toll. It has been an honor, but it is now time to say good bye!

Blog

Tutorials

Tutorial: Automatic updates for paid VirtueMart and WordPress extensions

Introduction

Both big CMS systems, WordPress and Joomla, have an automated plugin update mechanism, which informs site admins about new versions of the installed extensions and lets the admin install those new versions. Also, in both systems, this extension update mechanism works very well for freely available extensions (WP relies on releases on wordpress.org/plugins, while Joomla uses XML files with update information that can be placed anywhere on the internet). However, paid extensions are not very well supported by either CMS out of the box.

We at Open Tools develop and distribute both free and paid extensions, so we had to set up a proper update system also for paid extensions for WordPress and for Joomla. In this article, we will show how automatic updates can easily be added to paid extensions that need some kind of log in or access key or download password. 

Parts of this Tutorial

The setup of the automatic update system consists of three parts:

  1. The update server: A simple php script that returns the update information in XML or JSON format. 
  2. Implementing automatic updates for commercial WordPress plugins
  3. Implementing automatic updates for commercial Joomla/VirtueMart plugins

Read more: Tutorial: Automatic updates for paid VirtueMart and WordPress extensions

Proposal for a general API for third-party WooCommerce invoice numbering plugins

While WooCommerce provides a standard way for third-party plugins to generate nice order numbers via the filter

woocommerce_order_number($orderid, $order)

it does not provide any invoicing solution. There are several third-party invoicing plugins available, each of which implement their own numbering schemes with their own settings. And each of them stores the invoice numbers for an order differently, so switching to another invoicing plugin is not possible without loosing all invoice numbers for existing orders.

Furthermore, most invoice plugins only allow simple running counters with a prefix and a postfix as invoice numbers, possibly with a yearly reset. Our OpenTools "Advanced Order Numbers for WooCommerce" plugin, however, allows for much more flexible numbers, like monthly numbers (like 2016-02-0001) or even per-country numbers (like 2016-DE-0001, 2016-US-0001, etc.). 

We therefore propose a general API for invoice numbering plugins that invoice plugins can call to allow third-party plugins provide more flexible invoice numbers.

Possible Use Cases

  • Dedicated numbering plugins like our OpenTools Advanced Ordernumbers plugin, or the WooCommerce Sequential Ordernumbers Pro plugin
  • Interfacing plugins that connect WooCommerce to an external bookeeping system, which would make sure invoices for in-shop purchases and online purchases use the same sequential invoice numbering, while invoices for online purchases are still created by WooCommerce.
  • Payment providers that generate their own invoice numbers, but don't actually issue a PDF invoice and leave that up to the webshop.

Read more: Proposal for a general API for third-party WooCommerce invoice numbering plugins

HowTo upgrade your VirtueMart2 plugin to VirtueMart3

This is a quick overview of several necessary changes when upgrading a VirtueMart2 plugin to VirtueMart3. The following list is by no means meant to be complete, it is just a list of all changes I had to do to upgrade my plugins to VM3. Much of this material comes straight from Milbo's blog "Code adjustments for VirtueMart 3".
This page does NOT try to list all differences needed to upgrade the plugin(s) from Joomla 2.x to Joomla 3. For this, we refer e.g. to https://techjoomla.com/joomla-development/joomla-30-conversion-changes-needed-when-converting-a-common-installable-package-for-joomla-15x-a-25x-to-joomla-30.html

The largest changes to VirtueMart are:

  • VM3 uses Joomla 2 and 3's <config> tags in the plugin's xml file (VM2 used Joomla 1's <params> tags)
  • VM3 introduced some new triggers (mostly similar to those from VM2, just with changed function signature)
  • The custom fields sytem was completely changed internally
  • The cart system was completely changed (affects mainly templates)

Read more: HowTo upgrade your VirtueMart2 plugin to VirtueMart3

Tutorial: Providing Custom Views in VirtueMart using vmextended Plugins

OpenTools VirtueMart TaxReport ReportIn this tutorial, I will show how a plugin of type vmextended can be used to add your own custom view to the VirtueMart backend. As an example, we will implement a view that generates a simple tax report (for each tax rate we will show the amount of taxes charged in the selected period). In the first step, the view will not offer any configuration settings. The example contains no copyright and license statements to make it easier to read. You should add them yourself if you build upon this example. The example plugin developed here is released under the GPL v3+.

The full code for the example in this tutorial can be downloaded HERE (plg_vmextended_taxreport_v0.1.zip, 22kB).

The view will have the internal name "taxreport" and will be implemented as a Joomla plugin of type vmextended and its files are located in plugins/vmextended/taxreport. The view will be displayed in the backend when the URL administrator/index.php?option=com_virtuemart&view=taxreport is called.

 

Read more: Tutorial: Providing Custom Views in VirtueMart using vmextended Plugins