Plugin Settings (tag pair)
plugin_settings outputs saved settings values for a selected CartThrob plugin.
Use this when you need plugin configuration values in templates (for example a shipping, tax, or payment plugin setting).
See also:
Parameters
type
Plugin group to inspect.
Supported values:
paymentshippingtaxtype=”payment”
plugin
Plugin identifier to load settings for.
Both short and class-style names are supported by current lookup logic (for example stripe or Cartthrob_stripe, depending on plugin type and stored config values).
plugin="stripe"
Variables
Settings are returned as template variables from the plugin settings array.
There is no fixed universal variable list; keys depend on the plugin’s own settings definition.
Examples of plugin-specific keys seen in code:
- shipping
single_flat_rate:rate - tax
standard:default_tax - payment
ct_offline_payments:processing_status
Behavior and Constraints
- This is a tag pair intended for variable output from plugin settings.
- Both
typeandpluginparameters are required. - If either required parameter is missing, the tag uses
noResults('plugin_settings')flow. typerouting is strict:payment=> payment plugin lookupshipping=> shipping plugin lookuptax=> tax plugin lookup
- Payment lookup:
- plugin must be in
enabled_gateways - settings are loaded from
Cartthrob_{plugin}_settings, fallback{plugin}_settings
- plugin must be in
- Shipping lookup:
- plugin must match active
shipping_plugin - settings are loaded from
Cartthrob_shipping_{plugin}_settings, fallback{plugin}_settings
- plugin must match active
- Tax lookup:
- plugin must match active
tax_plugin - settings are loaded from
Cartthrob_tax_{plugin}_settings, fallback{plugin}_settings
- plugin must match active
- If plugin lookup fails, output is
lang('plugin_not_found'). - If settings are found, tag parses one variable row from that settings array.
Usage note from codebase review:
No direct installer/stub template usage for this template tag was found in current repository templates. It is available in code and useful for advanced/custom template flows.
Examples
Shipping plugin settings (single flat rate):
{exp:cartthrob:plugin_settings type="shipping" plugin="single_flat_rate"}
Shipping base rate: {rate}
{/exp:cartthrob:plugin_settings}
Tax plugin settings (standard):
{exp:cartthrob:plugin_settings type="tax" plugin="standard"}
Default tax: {default_tax}
{/exp:cartthrob:plugin_settings}
Payment plugin settings (offline payments):
{exp:cartthrob:plugin_settings type="payment" plugin="ct_offline_payments"}
Processing status: {processing_status}
{/exp:cartthrob:plugin_settings}