Feature Spotlight: Time limited packages and other updates

Today we are pleased to announce the release of another feature that has been requested by a number of our customers - time limited packages.

These are packages that are only displayed on your webstore (and the new API) until a specified date/time. After this point, they will not be displayed on your store or on the API, and trying to visit the package page directly will return a 'Not Found' error. Based on feedback from our customers, this would be great for creating excitement over an 'exclusive' package, or offering 'flash bonus chests' for a day, hour, or even just a few minutes, at a time.

To generate even more excitement and action over these time limited packages, we have added the option to display a countdown timer on the store.


We have exposed a new variable to the category (inside the product loop) and product templates - package.countdownEnds. This variable will usually be false (if it's a standard package without a time limit) but will contain the number of seconds remaining until the package will be removed when the package is time limited. This could be used for a number of things, such as a countdown, which is exactly what we've done for the Flat template.

Support on custom templates

If you want to reproduce the countdown on your custom template as we have in the default Flat template, you can do so using the below:

Add this code after the package name in category.html (note, it may need to be entered twice, once for the list layout and once for the grid layout):

{% if package.countdownEnds %}<span class="text-danger">&nbsp;&nbsp;<i class="fa fa-clock-o"></i> <span class="countdown-to" data-countdown="{{ package.countdownEnds }}">Ending Soon!</span>{% endif %}

The following then needs adding to layout.html (after the rest of the <script> tags at the bottom of the file):

            var countdowns = $(".countdown-to");    
               setInterval(function(ele) {
                   timeLeft = parseInt(ele.attr("data-countdown"));
                   if (timeLeft == 0) {
                       ele.html("Time Expired!");
                   } else {
                       ele.attr("data-countdown", timeLeft);
                      var days = Math.floor(timeLeft / (60 * 60 * 24));
                      var hours = Math.floor((timeLeft % (60 * 60 * 24)) / (60 * 60));
                      var minutes = Math.floor((timeLeft % (60 * 60)) / (60));
                      var seconds = Math.floor((timeLeft % 60));
                      ele.html(days + "d " + hours + "h " + minutes + "m " + seconds + "s");
               }, 1000, jQuery(this)); 

And in other news....

It's been a little while since we've posted on our blog, but that doesn't mean we've not been busy - quite the opposite! Over the past few weeks we've released a wide range of smaller features - many in response to feature requests from our customers as well as other small improvements. This is what we have been up to:

  • The ability to restrict which gateways can be used to purchase a specific package
  • Subscription statistics
  • Payment gateways can now be configured with a minimum and maximum price, so they are only available if the basket meets that condition
  • Notes can be added while creating manual payments
  • Bans can now be added for a PayPal email address (Express Checkout)
  • Giftcards can now be disabled against usage on particular packages (Enterprise)
  • User lookup now includes the total spent by the user on the store
  • API updates
  • Enterprise customers can now honour gift cards from other webstores
  • Addition of a fraud detection feature where the store will check that the customer's IP address matches the provided billing address
  • Viewing payments now shows in the activity log

Look out for more features in the changelog and coming soon on our blog. In the meantime, if you have any ideas as to how we can make the Buycraft platform better, please let us know!