Select Page

There are big players in Drupal’s e-commerce landscape. I have used Ubercart and Commerce. Both have their merits. Drupal Commerce is loved by all of the cool kids. Drupal Commerce’s rules based processing gives you opportunities to introduce alternative conditions and snug in lots of additional elements of functionality. One module that I like is Commerce Node Checkout. It allows a site owner to let the public pay to publish content. In my example, I was using it to let businesses create and pay for advertisements. They would have access to be able to upload the ad of their choice. After hitting “submit” the node / ad is held in an unpublished state while the business user is taken to a checkout page so that they can purchase the publication rights. Nice. Automated. Money-making. In theory.

I really like Commerce, but it goes a little far with its abstractions. So much so that if I step away from Commerce for too long, I am left with some super basic head-scratchers like “How do I put a product up for sale?” That seems like a no-brainer, but how it works:

  1. Install and activate Commerce and the contributed modules you opt to include.
  2. Go to the product types: [your site] /admin/commerce/products/types to add new fields to better define your product (size, color, etc.).
  3. Go to the product add page: [your site] /admin/commerce/products/add to add new products. The process is very snappy as it prompts you to add the next product after you’re done with one product.
  4. All commerce products, need a product display node type in order for users to be able to access it and add it to their cart. You can also use a View, a Panel or Content Type to reference and include products. In the Commerce Node Checkout functionality, the act of making a blog post is the same as making a product choice. The link comes from making a specific content type that users will be allowed to purchase. With more standard products, you can expose them by creating a View and then the View will show off the product and associate the all important add to cart button.
  5. People will also need to checkout to complete a purchase. That is possible if a role is allow to access the checkout. Go to [your site]/admin/people/permissions and under Checkout give the role the Access checkout permission.

Configuring Commerce Node Checkout

There is a missing manual for Commerce Node Checkout. This post is about what I found– and how my experiments went.

  1. First off, I set up a role called, “Business.”
  2. I made a content-type called “Advertisement.”
  3. A big gotcha– you do not want the Business role to be able to post advertisements for free. When you create the content type, make sure the published option is left UNCHECKED.
  4. The Business role has to be able to see the create node option for the Advertisement content-type.
  5. When a submission is created, the node will be held unpublished and the user will be moved to the checkout to make the purchase. After that, creating a node did route me to the shopping cart checkout to ask me to pay for my creation.

Do you need help with this? Contact Me and we can talk!