CartThrob Fees Version 1.2

CartThrob Fees addon enables your CartThrob powered site to capture fees. The fees can be tied to specific customer locations, item options, or custom data that's been set in your cart.

CartThrob Fees is an addon for CartThrob. Like other CartThrob addons, it must be uploaded and installed on your website, and CartThrob must be active for it to run. To use this addon, you will need to configure the settings, and it's advisable to add template tags to output fees information.

All fees are added to the cart as non-removable cart items. Like other items, they will be listed as order items in the customer cart history, and will be saved with other order items. Sample template code can be found here in the documentation.

Features

  • Multiple fees can be set
  • Fees can be based on customer location information, cart contents, or other custom data
  • Fees are saved like any other product in the order channel.

Requirements

  • ExpressionEngine 2.5+
  • CartThrob 2.2+
  • PHP 5.3+

Installation

  • Upload the /system/expressionengine/third_party/cartthrob_fees/ folder to /system/expressionengine/third_party/
  • Make sure Extensions are enabled on your system
  • Install the CartThrob Fees Extension (through EE's add-ons/extensions panel)

Upgrading

  • Upload the /system/expressionengine/third_party/cartthrob_fees/ folder to /system/expressionengine/third_party/ Overwriting existing files.

Settings

For each fee you set, you can specify a flat fee, or a percentage of the subtotal (before fees). You can set each fee to activate based on a number of settings including

  1. Always apply fee
  2. Based on contents of a custom data field
  3. Based on the contents of an item option
  4. Or based on the contents of customer data.

Backend Settings Backends Settings.

Tags

get_fees

Outputs information about all of the fees currently active in the cart

fee_total

Fee total with prefix (ex. $4.50)

fee_total_numeric

Fee total (numeric) (ex. 4.50)

fee_percent

Fee percent (if any)

fee_name

Fee descriptive name

{if no_results}

Conditional will display if no fees are set.

Example
{exp:cartthrob:get_fees}

    Fee total with prefix {fee_total}
    Fee total (numeric) {fee_total_numeric}
    Fee percent (if any) {fee_percent}
    Fee descriptive name {fee_name} 

    {if no_results}no fees were added{/if}

{/exp:cartthrob:get_fees}

fees_total

Total amount of fees currently active in cart

{exp:cartthrob:fees_total}