Drupal 7

Commerce Module Tuesday: Commerce Price Table

Commerce Price table is a module that provides both a field type and a display formatter that allows to manage and displays prices in a table based in the quantity so that different prices can be shown depending on the quantity of products that the customer purchases.

It plays nice with the default price field, allowing to hide it in the edit forms and replacing it in a transparent way using the power of rules and all the pricing rules that you apply to prices are also applied to the price table, such as taxes, discounts, etc.

Pedro's picture
Pedro Cambra

Pedro Cambra is a Drupal developer and trainer based in Barcelona, Spain, with more than four years of experience in Drupal and PHP development mostly focused on building and maintaining e-commerce sites. Currently in lead of the Spanish Drupal association, Pedro helps organizing both Drupalcamps and local events and encourages local communities.

Commerce Module Tuesday: Commerce Price Savings Formatter

Commerce Price Savings Formatter achieves a very demanded and useful feature for managing Drupal Commerce prices, it displays the original price of the products crossed and enhances the discounted price, displaying the amount and percentage that the customer would save if they purchase the item. All those components are optional so you can choose which to show in your prices.

The module uses a display formatter for doing all these operations so it can be used both in the display fields configuration screen and in Views. Oh, and it is also VAT safe, which is a great thing.

Pedro's picture
Pedro Cambra

Pedro Cambra is a Drupal developer and trainer based in Barcelona, Spain, with more than four years of experience in Drupal and PHP development mostly focused on building and maintaining e-commerce sites. Currently in lead of the Spanish Drupal association, Pedro helps organizing both Drupalcamps and local events and encourages local communities.

Commerce Module Tuesday: Manual payment methods for Drupal Commerce

There are many automated payment methods for Drupal Commerce around, we have solutions for Paypal, Authorize.net, Ogone and of course a lot of local banks, but there are some that are also widely used and are somehow "manual", we're going to take a look to three of them:

  • Commerce Bank Transfer allows to input bank information that is going to be displayed to the user so they can note that down and make a wire transfer for the total of the purchase.
  • Commerce Cheque and Commerce Cash on Delivery are quite similar, both of them need some information filled in their settings that is going to be exposed to the user so they can follow the payment instructions, however the intention of the modules is quite different as one is for cheque payments and the other to pay when the items purchased are sucessfully delivered.

The three of them need some manual action from the store administrator to actually confirm that the payment has been done.

Pedro's picture
Pedro Cambra

Pedro Cambra is a Drupal developer and trainer based in Barcelona, Spain, with more than four years of experience in Drupal and PHP development mostly focused on building and maintaining e-commerce sites. Currently in lead of the Spanish Drupal association, Pedro helps organizing both Drupalcamps and local events and encourages local communities.

Commerce Module Tuesday: Commerce Views Bulk Operations

Commerce Views Bulk Operations replaces Drupal Commerce default administrative Views for managing Orders, Products, Product Displays, Customer Profiles, etc and allows to perform massive operations on all those items, easing administrative tasks.

When you enable this module, some of the default views that are disabled, those will be enabled again when disabling Commerce VBO.

Thanks to the Rules integration with Views Bulk Operations, you can also configure new custom Rules actions and expose them to Views.

Pedro's picture
Pedro Cambra

Pedro Cambra is a Drupal developer and trainer based in Barcelona, Spain, with more than four years of experience in Drupal and PHP development mostly focused on building and maintaining e-commerce sites. Currently in lead of the Spanish Drupal association, Pedro helps organizing both Drupalcamps and local events and encourages local communities.

Commerce Module Tuesday: Commerce Bulk Product Creation

Commerce Bulk Product Creation was the first contributed module to the commerce project and provides a quick way to create multiple combinations of products with a single form submission. It also optionally manages the creation of the display associated to the product variations in different ways such as generating a display for each product created in bulk.

Some conditions in the product configuration need to be met in order to use the bulk creation feature, you need to have one or more fields of list type, boolean or term references with the submodule for taxonomy support. There's also support for Entity Reference fields with the BPC entity reference module.

Note that once created, this module doesn't support yet bulk edition or deleting, you may find useful Commerce VBO for that purpose, but that belongs to other Tuesday's overview.

Pedro's picture
Pedro Cambra

Pedro Cambra is a Drupal developer and trainer based in Barcelona, Spain, with more than four years of experience in Drupal and PHP development mostly focused on building and maintaining e-commerce sites. Currently in lead of the Spanish Drupal association, Pedro helps organizing both Drupalcamps and local events and encourages local communities.

Commerce module tuesday: Commerce Fieldgroup Panes (Screencast)

Commerce Fieldgroup Panes is an excellent module that exposes fields into the checkout process. It creates one checkout pane for each fieldgroup of the order entity using Field group module.

This is one of the easiest ways to collect information in the checkout phase, it can be used for many purposes, probably getting customer comments is the most usual, but this screencast also shows how to use information exposed by this module as data for registering users in the checkout process.

These are the basic steps to set up this module and collect information from your customers.

  • Create one or several fields in the Order entity type (Store » Configuration » Order settings » Manage Fields)
  • Embed those fields justs created in a new Field group.
  • Access the checkout settings admin screen (Store » Configuration » Checkout settings)
  • Drag & drop your fieldgroups exposed as Checkout panes to the correct Checkout pages.

Other great thing of this simple and useful module is that all the information stored in the Order entity can be used afterwards with Rules and Views, the screencast below will also show how to use this collected information for creating new user accounts.

Pedro's picture
Pedro Cambra

Pedro Cambra is a Drupal developer and trainer based in Barcelona, Spain, with more than four years of experience in Drupal and PHP development mostly focused on building and maintaining e-commerce sites. Currently in lead of the Spanish Drupal association, Pedro helps organizing both Drupalcamps and local events and encourages local communities.

Selling Per-Node Access With Drupal Commerce

This screencast builds on the previous screencast showing selling a role. This time, though, we're going to sell an individual node. Here's the recipe:

  • We have Content Access and its submodule Content Access Rules enabled
  • Create a content type called Premium Content
  • Instead of granting access to that entire content type by role, grant it on a user-by-user, node-by-node basis
  • Add a nodereference field to our product; each product that sells access to a node should have the nodereference set to the content in question.
  • Add a rule (and component)
    • When the order is updated
    • If its state is Completed
    • Loop through the line items (invoke a component)
    • If the line item has a product reference field
    • If the Product has a nodereference field
    • Grant access to the node listed in the nodereference to the user who created the order.

rfay's picture
Randy Fay

Randy has been doing software development since 1981 and web development since 1994, having built systems in a myriad of languages and environments. He stumbled into the Drupal community by moving a number of dynamic websites to Drupal in the 4.6 days (2004?) and became an active Drupal core developer after an epic bicycle ride from Canada to Argentina in 2006-2008. He is an active Drupal core contributor, is a co-maintainer of the Drupal AJAX subsystem, and developed and maintains a number of contrib modules on Drupal.org. His blog is at randyfay.com.

Selling Content with Drupal Commerce using Content Access and Roles

In this screencast we'll use Drupal's built-in access control mechanisms (using the Content Access module) to grant access to premium content to users who have a "premium" role.

Here's the recipe:

  • Enable Content Access and the ACL (optional) module.
  • Create a role called "premium"
  • Create a content type called "Premium Content" and put some great content in it.
  • Verify that users can only access the premium content if they have the premium role.
  • Create a product representing the premium role.
  • Create a rule that grants the premium role on order completion:
    • After updating an order
    • If the order state is Completed
    • And the order contains our premium product
    • Add a role to the user who is the owner of the order

That's really all there is to it.

rfay's picture
Randy Fay

Randy has been doing software development since 1981 and web development since 1994, having built systems in a myriad of languages and environments. He stumbled into the Drupal community by moving a number of dynamic websites to Drupal in the 4.6 days (2004?) and became an active Drupal core developer after an epic bicycle ride from Canada to Argentina in 2006-2008. He is an active Drupal core contributor, is a co-maintainer of the Drupal AJAX subsystem, and developed and maintains a number of contrib modules on Drupal.org. His blog is at randyfay.com.

Commerce Module Tuesday: Commerce File (Screencast)

Commerce File is an outstanding and mature module that allows you to sell downloads. It uses Drupal 7's private file system and provides a field that can be added to a product for the downloadable item. If you're interested in Commerce File, you may also be interested in the Commerce Downloads distribution, which comes with Commerce File completely preconfigured for use.

Here's how you set up to sell downloads with Drupal Commerce:

  • Download and enable Commerce File.
  • Make sure that your private files system is properly configured (admin/config/media/file-system).
  • Add a field of type "Commerce File" to the product type you want to use.
  • Create products and display nodes as you need.
  • Let people buy!

The default rules provided with Commerce File grant licenses to the file when the order gets to the "Completed" stage. Your store may not be set up to automatically complete orders; you can change this with rules based on your payment strategy.

And don't forget to read the Commerce File documentation page, which provides more information.

rfay's picture
Randy Fay

Randy has been doing software development since 1981 and web development since 1994, having built systems in a myriad of languages and environments. He stumbled into the Drupal community by moving a number of dynamic websites to Drupal in the 4.6 days (2004?) and became an active Drupal core developer after an epic bicycle ride from Canada to Argentina in 2006-2008. He is an active Drupal core contributor, is a co-maintainer of the Drupal AJAX subsystem, and developed and maintains a number of contrib modules on Drupal.org. His blog is at randyfay.com.

Commerce Discount Campaign Feature (Screencast)

Discounts in Commerce have generally required configuration using rules, and have often required hand-applied configuration and wired-in discount amounts, which is probably out of reach for many site managers. In the Commerce Discount Campaign Feature I've put together a few rules with a content type so that discount amounts and dates can be done just by editing a node. This screencast tells how.

rfay's picture
Randy Fay

Randy has been doing software development since 1981 and web development since 1994, having built systems in a myriad of languages and environments. He stumbled into the Drupal community by moving a number of dynamic websites to Drupal in the 4.6 days (2004?) and became an active Drupal core developer after an epic bicycle ride from Canada to Argentina in 2006-2008. He is an active Drupal core contributor, is a co-maintainer of the Drupal AJAX subsystem, and developed and maintains a number of contrib modules on Drupal.org. His blog is at randyfay.com.

Syndicate content