You are here

commerce_usps.module in Commerce USPS 8

Same filename and directory in other branches
  1. 7.2 commerce_usps.module
  2. 7 commerce_usps.module

File

commerce_usps.module
View source
<?php

/**
 * @file
 * Contains commerce_usps.module.
 */
use Drupal\Core\Routing\RouteMatchInterface;

/**
 * Implements hook_help().
 */
function commerce_usps_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {

    // Main module help for the commerce_usps module.
    case 'help.page.commerce_usps':
      $output = '';
      $output .= '<h3>' . t('About') . '</h3>';
      $output .= '<p>' . t('This module provides USPS shipping calculations for Drupal Commerce by extending the Drupal Commerce Shipping API. This module should be used by those that want to provide dynamic USPS shipping rates on their US based Drupal Commerce sites.') . '</p>';
      $output .= '<h3>' . t('Configuration') . '</h3>';
      $output .= '<dt>' . t('1. Go to /admin/commerce/config/shipping-methods/add') . '</dt>';
      $output .= '<dt>' . t('2. Select "USPS" as the Plugin') . '</dt>';
      $output .= '<dt>' . t('3. Enter the USPS API details') . '</dt>';
      $output .= '<dt>' . t('4. Select a default package type') . '</dt>';
      $output .= '<dt>' . t('5. Select all the shipping services that should be disabled') . '</dt>';
      $output .= '<dt>' . t('6. Fill out any of the optional configs and save configuration') . '</dt>';
      $output .= '<dt>' . t('7. Add a product to cart and checkout') . '</dt>';
      $output .= '<dt>' . t('8. Enter your shipping address and click on "Calculate Shipping"') . '</dt>';
      $output .= '<dt>' . t('9. The estimated rates retrieved from USPS will now show up for the order') . '</dt>';
      return $output;
  }
}

Functions

Namesort descending Description
commerce_usps_help Implements hook_help().