.. ================================================== .. FOR YOUR INFORMATION .. -------------------------------------------------- .. -*- coding: utf-8 -*- with BOM. .. include:: ../../../../../../Includes.txt .. _administrators_setup_caddy_calculating_servicecosts_basedonweight: Based on Weight =============== With this rule you can calculate one of your service costs depending on the total weight of all products. The quantity will be multiplied by the price you set for each product. Constants --------- .. code:: php plugin.caddy { db { service_attribute_1 = weight } symbol { service_attribute_1_symbol = Kg } } Setup ----- .. code:: php plugin.tx_caddy_pi1 { api { options { ... shipping { options { 1 > 1 = Produkt: DHL Paket, versichert bis 500 EUR, in Deutschland, \ Maximale Groesse: 120x60x60 cm \ Stand: 20.07.2017 \ URL: http://www.portokalkulator.de/portokalkulator/std ) 1 { title = DHL Paket (nur Deutschland) extra = by_service_attribute_1_sum extra { 1 { value = 0 extra = 6.99 } 2 { value = 5 extra = 8.99 } 3 { value = 10 extra = 16.99 } 4 { value = 31.5 extra = 999.999 } } tax = normal } } } } } } In the example above we configure a special shipping rule for each product. There is one shipping method called “Standard”, the normal tax will be applied. - The shipping costs will be 6.99 for a weight from 0 of all products - The shipping costs will be 8.99 for a weight from 5 of all products - The shipping costs will be 16.99 for a weight from 10 of all products - The shipping costs will be 999.999 for a weight from 31.5 of all products Last point means: It should not be possible to order more than products until a weight of 31.5. by_service_attribute_1_sum ^^^^^^^^^^^^^^^^^^^^^^^^^^^ by_service_attribute_1_sum means: * Field for the weight will taken from the constants at plugin.caddy.db.service_attribute_1 * Weight will be calculated by sum Quick Shop ---------- The Quick Shop has a ready-to-use template for the calculation of the shipping costs on weight. See: https://docs.typo3.org/typo3cms/extensions/quick_shop/ Look for: Integrators > Setup