Tariffinfo: CDEK tariff details in Joomla Form

WT CDEK library - Documentation
Category: Libraries

Tariffinfo in WT CDEK for Joomla covers tariff details and selector dependencies. This reference explains its purpose, parameters and XML examples for Joomla Form.

Webtolk\Cdekapi\Fields\TariffinfoField displays the tariff name and code, delivery mode, weight and dimension ranges, and payer/sender/recipient types. It does not calculate a shipment price.

Attribute Default Behavior
watchfield Not set Required reference to a tariff-code source: watchfield="tariff_code" or a named JSON map.
tariff_field Not set Legacy alias, used only when watchfield is absent. Even an empty watchfield takes priority.
<field name="tariff_info" type="Tariffinfo"
       addfieldprefix="Webtolk\Cdekapi\Fields"
       label="Tariff details"
       watchfield='{"tariff_code":"tariff_code"}' />

The default catalog is exported as Joomla Script Options under the literal key wtcdek.tariffs. The catalog is prepared server-side through the API/cache while rendering the form. Changing the selected tariff then updates the card in the browser without another AJAX request. The renderer reads the tariff_code key, then the scalar binding's value key, then the first map value. An explicit tariff_code key is recommended.

An empty code prompts the user to select a tariff; an unknown code displays a not-found message; invalid configuration displays an error. Layout: libraries.webtolk.cdekapi.fields.tariffinfo. Custom overrides must retain the .wt-cdek-tariffinfo-field container, $watchfield_attributes, render target and standard layout templates.

Joomla Form Fields

Overview and getting started

WT CDEK 1.4.0 source code on GitHub

WebTolk Joomla Extensions

113 Extensions
12 Categories
587 Versions released
920737 Downloads