drupal-commerce

Swapping Drupal 8 services to customize Drupal Commerce mglaman Sun, 06/04/2017 - 11:11

One of the reasons that I love Drupal 8 is the fact it is object orientated and uses the Dependency Injection pattern with a centralized service container. If you’re new to the concept, here’s some links for some fun reading.

Explore Drupal Commerce 2 with Commerce Demo! mglaman Mon, 07/11/2016 - 19:08

When we talk about Drupal Commerce 2, the biggest we questions we get are not about features, but when you can start building with it. Well, the answer is and has been now! Drupal Commerce 2 has been in alpha and nearing beta. What does this mean? In alpha we might have some schema changes, requiring a reinstall of your site. Luckily Drupal 8 has that fancy new configuration management system to export your site, right?

Drupal Commerce and Migrate status mglaman Thu, 05/19/2016 - 08:55

First Steps

Plans were made back in December 2015 to put effort into the ability to support Migrate with Drupal Commerce to speed up adoption of Drupal Commerce 2.0. Commerce Migrate for Drupal 8 will provide migrations from Drupal Commerce 1.x, Ubercart for D6, and Ubercart for D7. Ideally, this module will also support other vendors, such as Magento and WooCommerce.

Commerce entity's and storing arbitrary data mglaman Thu, 06/25/2015 - 15:39

Drupal Commerce entities all make use of the "data" attribute. The data attribute is a blob that contain just about anything you would like - for example, Commerce Shipping utilizes this for shipping line items. Recently there was a StackExchange question on the documentation of this attribute.

Programmatically change the "Add to Cart" line item type mglaman Thu, 11/27/2014 - 11:47
Drupal Commerce has a very interesting "Add to Cart" form. The add to cart form is a field formatter for the product reference field (or even entityreference field.) In a general sense, a node has a product reference field using the "Add to Cart" formatter. What makes it more unique is that this form exposes certain fields from the product entities, but also the line item type being used. Specific fields on products can be exposed as attributes, things you pick to make your purchase.
"Getting Cozy with Drupal Commerce" mglaman Mon, 06/02/2014 - 23:26
Getting Cozy with Drupal Commerce cover art. I'm writing a book! Mid May I began work on a book called "Getting Cozy with Drupal Commerce." Commerce is a robust module with a lot of power under the hood, unfortunately many of its features can be confusing or frustrating. Why? Because its architected to be flexible and extensible. My book aims to dive in headfirst to what makes Drupal Commerce tick.
Sort Drupal Commerce Shipping Services mglaman Sun, 11/10/2013 - 04:47

If you are using Drupal Commerce and are allowing customer's two or more shipping services you'll notice that the order may not make sense. By default the shipping services are displayed by how they're output in grouping of shipping provider then some other sorting that isn't cost based. There is a hook within Commerce Shipping that allows reordering of all shipping services.

 

Commerce Reports 4.x mglaman Thu, 11/07/2013 - 00:29

I spent a few hours this evening and knocked out a few updates for Commerce Reports to kick off the 4.x version of the module. It separates the module from the non-maintained Visualization API for the maintained Charts module. This version also removes the granularity filter we've all come to know and love with using Views Date Format SQL module. This cuts back on module code to maintain for this module and better usage of the SQL query. Not to mention more reliable (I always seemed to get an extra month or day rolled in.)

Drupal Commerce and Reporting mglaman Mon, 10/28/2013 - 22:08

Drupal Commerce is an amazing open source ecommerce solution; with its foundation in Drupal it can easily contend with the big cookie-cutter ecommerce solution companies. Except for one area - reporting. Drupal Commerce and reporting seem to have missed each other while its growth skyrocketed. I mean, there are ways to build reports and show your store's revenue...just nothing "perfect," in my mind. Let's start with this: Drupal commerce orders have a creation date and updated date.

Drupal Commerce Free Shipping Rule mglaman Mon, 09/30/2013 - 19:59

Free shipping offers are a huge request in Drupal Commerce. Here is how you can use one shipping calculation rule to provide free shipping without making new shipping services or modifying existing ones. Typically tutorials have you create a new "Free shipping" flat rate service that checks if the order is greater than XX and have your other services check if the order is less than XX. That's neat, but sucks if you or your client is just trying to offer a sweet deal for a month.