18.11.2015 Views

Beginning Drupal 8

Todd Tomlinson - Beginning Drupal 8 (The Expert's Voice in Drupal) - 2015

Todd Tomlinson - Beginning Drupal 8 (The Expert's Voice in Drupal) - 2015

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 22 ■ Building a Commerce Site<br />

Kickstart comes with free shipping enabled; however, for demonstration purposes, I want to charge<br />

customers for shipping, and I’ll use the Commerce Flat Rate module that is enabled by default with<br />

Kickstart. To enable and configure flat rate shipping, hover on the “Store settings” admin menu item and<br />

select Shipping from the drop-down menu. On the Shipping administration page, click the “Add a flat<br />

rate service” button near the top left of the page. On the “Add a flat rate service” configuration page (see<br />

Figure 22-18), give the shipping service a Title, a Display title that will appear in the checkout process, and a<br />

Base rate that will be applied to all orders. For the demonstration, I’ll charge a flat rate of $10 per shipment<br />

for shipping and handling.<br />

Other shipping modules, such as UPS, USPS, and FedEx, all calculate the actual shipping rates based<br />

on the number of boxes and the weight of the shipment. When using methods like UPS, USPS, and FedEx,<br />

you’ll need to do a little extra work by adding dimensions to each product, the weight of each product, and<br />

the standard box size that you use to ship products in. Each of those modules does a best guess at how many<br />

items will fit in a box to determine how many boxes and what the total rate should be. You may also use<br />

calculation rules to mark up the rates returned from UPS, USPS, FedEx, or other shipping services. Check the<br />

documentation on <strong>Drupal</strong>.org for details on how to add other shipping methods, configure those methods,<br />

and create and apply calculation rules.<br />

After setting up the flat rate shipping, delete the “Free shipping” method from the list of Shipping<br />

services to provide only the option for flat rate. On the “Shipping services” screen (Store settings ➤<br />

Shipping), click the “delete” link to the right of the “Free shipping” option.<br />

Figure 22-18. Setting up a flat rate shipping method<br />

Taxes<br />

<strong>Drupal</strong> Commerce supports sales and value added taxes (VAT). To configure taxes, hover over the “Store<br />

settings” menu item and click Taxes in the drop-down menu. Kickstart comes preconfigured with a sample<br />

sales tax rate for the state of Michigan. To see how taxes are configured, click the “edit” link for Michigan<br />

Sales Tax and note the fields and their values (see Figure 22-19).<br />

259

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!