v3.4.x Text Snippets and Template Variables

v3.4.x Text Snippets and Template Variables

The template file that is used for displaying surcharge/discount information is add_charge_info.tpl and can be found in the directory /Resources/views/frontend/mnd_add_charge_manager of the plugin.

The following text snippets are defined and can be changed in the shopware backend:

Textbaustein

Beschreibung

{s name="add_charge_info/ggf" namespace="frontend/add_charge_info"}if appl.{/s}

Will be used when the surcharge/discount is limited to a certain shipping country or type of dispatch, or if it is only applicaple for a specific article variant.

{s name="add_charge_info/optional" namespace="frontend/add_charge_info"}optional{/s}

Will be used when surcharges/discounts are optional

{s name="add_charge_info/zzgl" namespace="frontend/add_charge_info"}plus{/s}

Will be used as default for surcharges

{s name="add_charge_info/abzgl" namespace="frontend/add_charge_info"}minus{/s}

Will be used as default for discounts

{s name="add_charge_info/basket" namespace="frontend/add_charge_info"}per order{/s}

Will be used when surcharge/discount is only per order

 

To customize the template please inherit it according to shopware standards. Add a directory in your Theme with the name /frontend/mnd_add_charge_manager and add the file add_charge_info.tpl.

You can use the following variables:

Variable

Beschreibung

Beispiel

Typ

Variable

Beschreibung

Beispiel

Typ

$add_charge

Contains information for all surcharges/discounts of an article

 

array

$add_charge.notApplicable

The surcharge/discount is restricted (see $add_charge.limitedDispatches, $add_charge.limitedCountries, $add_charge.customerGroupException)

true | false

boolean

$add_charge.isVariant

if true it is an article variant

true | false

boolean

$add_charge.isOptional

the surcharge/discount is optional (per shopping cart)

true | false

boolean

$add_charge.grossPrice

the gross price of the surcharge/discount

0.25

float

$add_charge.limitedDispatches

If limited to types of dispatch, this contains a list of types of dispatch this surcharge/discount is limited to.

array {
    [id] => 'Name of Dispatch Type'
}

array

$add_charge.limitedCountries

If limited to shipping countries, this contains a list of shipping countries this surcharge/discount is limited to.

array {
    [id] => 'Country Name'
}

array

$add_charge.customerGroupException

Contains the customer groups the surcharge/discount is limited to.

array {
    [id] => 'Customer Group Name'
}

array

$add_charge.displayName

The display name

Handling Fee

string

$add_charge.type

type of the surcharge/discount (see details in user documentation)

  • multi → surcharge/discount amount equals article

  • single → once per article

  • basket → once per basket

  • optbasket → optional once per basket

multi | single | basket | optbasket

string

$add_charge.description

Contains the short description text

Handling Fee for large items

string

$hideDescription

defines if the short description should be displayed

true | false

boolean