An international version is available for our store.
ACRIS E-Commerce GmbH

individuelle Versandkosten Berechnung mit TWIG Vorlagen

Bewertung: 5.0

Durchschnittliche Bewertung von 5 von 5 Sternen

(9 Bewertungen)
Downloads: 184

Beschreibung

Highlights

  • Versandkosten manuell berechnen lassen
  • Versandberechnung auf der Detailseite der Versandart manuell hinzufügen
  • LineItems selbst bestimmen
  • Vertriebkanäle selbst wählen

Features

  • Manuelle Versandkosten Berechnung
  • Für jede Versandart möglich
  • Indiviudelle Berechnung für einzelne Versandarten

Über die Erweiterung

Nutzung des Plugins

Das Plugin fügt die Möglichkeit hinzu, den Versand manuell zu berechnen. Mithilfe von lineitems vom Warenkorb können Sie diese zur Berechnung des Versands verwenden. Das Feld "Versandberechnung" basiert auf der Twig-Vorlage und die Twig-Funktionen sollten in Operationen mit Daten aufgerufen werden.
In "lineItems" sind alle Produkte aus dem Warenkorb. Und dort sind aktuelle "salesChannel" Daten hinzugefügt.

Ermöglicht somit komplexeste Versandkostenermittlung mit relativ einfachen Mitteln (TWIG) via Shopware Admin Oberfläche.


Funktionsweise

  • Es ist möglich, die Versandberechnung auf der Detailseite der Versandart manuell hinzuzufügen.
  • Standardwerte hinzugefügt:
    • Vertriebskanal
    • LineItems (lineItem funktioniert nur bei foreach-Schleife).
  • Wenn kein Float-Wert zurückgegeben werden kann, wird der nächste Matrixpreis (falls vorhanden) oder der Standardpreis verwendet.


Manuelle Berechnung der Versandkosten

Im Bereich Einstellungen -> Shop-> Versand -> Versandart anlegen oder bearbeiten

Hier ist es möglich über eine Preismatrix, den Versand manuell berechnen zu lassen.


Sie haben hier lineItems vom Warenkorb und können diese zur Berechnung des Versands verwenden.


Beispiel #1: (Versandkosten fix auf 10 ohne weiterer Regeln)

{% set shipping = 10 %}

{{ shipping }}


Beispiel #2: (Versandkosten erhöhen sich um einen Wert, abhängig davon ob ein Artikel mit dem CustomField im Warenkorb liegt)

{% set shipping = 10 %}
{% for lineItem in lineItems %}
    {% if lineItem.payload.customFields.custom_sw4_attributes_attr7 == "1" %}
        {% set shipping = shipping + 1 %}
    {% endif %}
{% endfor %}
{{ shipping }}


Beispiel #3: (Versandkosten je nachdem in welchen Kategorien sich die Produkte Warenkorb befinden)

{% set numberProductsInsideCategory1 = 0 %}
{% set numberProductsInsideCategory2 = 0 %}

{% for lineItem in lineItems %}
    {% if lineItem.payload.categoryIds %}
        {% for categoryId in lineItem.payload.categoryIds %}
            {# Is product inside category 1 - we check it by the UUID #}
            {% if categoryId == '21b199946c884aa294b409f135963880' %}
                {% set numberProductsInsideCategory1 = numberProductsInsideCategory1 + 1 %}
            {% endif %}

            {# Is product inside category 2 - we check it by the UUID? #}
            {% if categoryId == '0b5e8204e7034c2ca17a3899274874a4' %}
                {% set numberProductsInsideCategory2 = numberProductsInsideCategory2 + 1 %}
            {% endif %}
        {% endfor %}
    {% endif %}
{% endfor %}

{# Now we can do something with the variables numberProductsInsideCategory1 and numberProductsInsideCategory2 #}
{% if numberProductsInsideCategory1 > 0 and numberProductsInsideCategory2 > 0 %}
    19.90
{% elseif numberProductsInsideCategory1 > 0 %}
    14.90
{% elseif numberProductsInsideCategory2 > 0 %}
    12.90
{% else %}
    9.90
{% endif %}

Hinweis: Es sind im Warenkorb nur die UUIDs der Kategorien (einmalige ID in der Datenbank) verfügbar. Die UUID kannst du sehr einfach über das Plugin https://store.shopware.com/acris28622190382f/acris-kategorie-id-anzeigen.html auslesen und kopieren.


Beispiel #4: Mengen Ermittlung

{% set quantity = 0 %}
{% for lineItem in lineItems %}
    {% if lineItem.quantity %}
        {% set quantity = quantity + lineItem.quantity %}
    {% endif %}
{% endfor %}

{{ quantity }}


Beispiel #5: Kunden Freitextfeld Freihausgrenze

{% set customerShippingFreeLimit = false %}
{% if customer.customFields is not empty and customer.customFields.custom_customer_shipping_free_limit > 0 %}
    {% set customerShippingFreeLimit = customer.customFields.custom_customer_shipping_free_limit %}
{% endif %}

{% set shippingCosts = 9.95 %}
{% if customerShippingFreeLimit > 0 and cart.price.totalPrice >= customerShippingFreeLimit  %}
    {% set shippingCosts = 0 %}
{% endif %}

{{ shippingCosts }}


Beispiel #6: Hinzufügen der Mehrwertsteuer je nach Lieferland und Warenkorbinhalt zum Nettopreis der Versandkosten

{% set shippingNet = 100 %}

{% if context.taxState == 'gross' and matchingTaxRules and matchingTaxRules.highestRate() %}
    {% set shippingNet = shippingNet / 100 * matchingTaxRules.highestRate().getPercentage() %}
    {% set shipping = shippingNet * (1 + (matchingTaxRules.highestRate().getTaxRate() / 100)) %}
{% else %}
    {% set shipping = shippingNet %}
{% endif %}

{{ shipping }}


Beispiel #7: Berechnung der Versandkosten abhängig von Brutto / Netto im Warenkorb

{% if context.taxState == 'gross' %}
     {# do smth if tax state is gross #}
 {% else %}
     {# do smth if tax state is net #}
 {% endif %}


Beispiel #8: Wenn mindestens ein Produkt nicht lagernd ist, dann Versandkosten 10 €, ansonsten 5 €

{% set oneProductOutOfStock = false %}
{% for lineItem in lineItems %}
    {% if lineItem.deliveryInformation and lineItem.deliveryInformation.stock <= 0 %}
        {% set oneProductOutOfStock = true %}
    {% endif %}
{% endfor %}

{% if oneProductOutOfStock %}
    10
{% else %}
    5
{% endif %}


---


Folgende Variablen sind aktuell verfügbar - wenn sie weiter Variablen benötigen, dann bitte eine Supportanfrage über den Shopware Account an uns stellen.


Auflistung der möglichen Variablen

matchingTaxRules (Steuern, die für die Versandart relevant sind, ermittelt über Steuer-Typ - PHP-Klasse TaxRuleCollection)

  • matchingTaxRules.highestRate().getTaxRate()

currency

  • currency.isoCode
  • currency.factor
  • currency.symbol
  • currency.shortName
  • currency.name
  • currency.position
  • currency.translations
  • currency.orders
  • currency.salesChannels
  • currency.salesChannelDefaultAssignments
  • currency.salesChannelDomains
  • currency.shippingMethodPrices
  • currency.promotionDiscountPrices
  • currency.isSystemDefault
  • currency.productExports
  • currency.countryRoundings
  • currency.itemRounding
  • currency.totalRounding
  • currency.taxFreeFrom
  • currency.translated.customFields

context

  • context.languageIdChain
  • context.versionId
  • context.currencyId
  • context.currencyFactor
  • context.scope
  • context.ruleIds
  • context.source
  • context.considerInheritance
  • context.taxState
  • context.rounding

ruleIds - array with active rule ids

customer

  • customer.groupId
  • customer.defaultPaymentMethodId
  • customer.salesChannelId
  • customer.languageId
  • customer.lastPaymentMethodId
  • customer.defaultBillingAddressId
  • customer.defaultShippingAddressId
  • customer.customerNumber
  • customer.salutationId
  • customer.firstName
  • customer.lastName
  • customer.company
  • customer.password
  • customer.email
  • customer.title
  • customer.vatIds
  • customer.affiliateCode
  • customer.campaignCode
  • customer.active
  • customer.doubleOptInRegistration
  • customer.doubleOptInEmailSentDate
  • customer.doubleOptInConfirmDate
  • customer.hash
  • customer.guest
  • customer.firstLogin
  • customer.lastLogin
  • customer.newsletter
  • customer.birthday
  • customer.lastOrderDate
  • customer.orderCount
  • customer.orderTotalAmount
  • customer.createdAt
  • customer.updatedAt
  • customer.legacyEncoder
  • customer.legacyPassword
  • customer.group
  • customer.defaultPaymentMethod
  • customer.salesChannel
  • customer.language
  • customer.lastPaymentMethod
  • customer.salutation
  • customer.defaultBillingAddress
  • customer.defaultShippingAddress
  • customer.activeBillingAddress
  • customer.activeShippingAddress
  • customer.addresses
  • customer.orderCustomers
  • customer.autoIncrement
  • customer.tags
  • customer.tagIds
  • customer.promotions
  • customer.recoveryCustomer
  • customer.productReviews
  • customer.remoteAddress
  • customer.requestedGroupId
  • customer.requestedGroup
  • customer.boundSalesChannelId
  • customer.boundSalesChannel
  • customer.wishlists
  • customer.customFields

cart

  • cart.name
  • cart.token
  • cart.price.netPrice
  • cart.price.totalPrice
  • cart.price.calculatedTaxes
  • cart.price.taxRules
  • cart.price.positionPrice
  • cart.price.taxStatus
  • cart.price.rawTotal
  • cart.lineItems
  • cart.errors
  • cart.deliveries
  • cart.transactions
  • cart.modified
  • cart.customerComment
  • cart.affiliateCode
  • cart.campaignCode
  • cart.data
  • cart.ruleIds

lineItems - array with line item

lineItem

  • lineItem.id
  • lineItem.referencedId
  • lineItem.label
  • lineItem.quantity
  • lineItem.type
  • lineItem.priceDefinition
  • lineItem.price
  • lineItem.good
  • lineItem.description
  • lineItem.cover
  • lineItem.deliveryInformation
  • lineItem.deliveryInformation.stock
  • lineItem.deliveryInformation.weight
  • lineItem.deliveryInformation.freeDelivery
  • lineItem.deliveryInformation.restockTime
  • lineItem.deliveryInformation.deliveryTime
  • lineItem.deliveryInformation.height
  • lineItem.deliveryInformation.width
  • lineItem.deliveryInformation.length
  • lineItem.children
  • lineItem.requirement
  • lineItem.removable
  • lineItem.stackable
  • lineItem.quantityInformation
  • lineItem.modified
  • lineItem.dataTimestamp
  • lineItem.dataContextHash
  • lineItem.payload
  • lineItem.payload.isCloseout
  • lineItem.payload.customFields
  • lineItem.payload.createdAt
  • lineItem.payload.releaseDate
  • lineItem.payload.isNew
  • lineItem.payload.markAsTopseller
  • lineItem.payload.purchasePrices
  • lineItem.payload.productNumber
  • lineItem.payload.manufacturerId
  • lineItem.payload.taxId
  • lineItem.payload.tagIds
  • lineItem.payload.categoryIds
  • lineItem.payload.propertyIds
  • lineItem.payload.optionIds
  • lineItem.payload.options
  • lineItem.payload.length
  • lineItem.payload.height
  • lineItem.payload.width
  • lineItem.payload.deliveryTime
  • lineItem.payload.features
  • lineItem.deliveryInformation.weight

salesChannel

  • salesChannel.typeId
  • salesChannel.languageId
  • salesChannel.currencyId
  • salesChannel.paymentMethodId
  • salesChannel.shippingMethodId
  • salesChannel.countryId
  • salesChannel.navigationCategoryId
  • salesChannel.navigationCategoryDepth
  • salesChannel.homeSlotConfig
  • salesChannel.homeCmsPageId
  • salesChannel.homeCmsPage
  • salesChannel.homeEnabled
  • salesChannel.homeName
  • salesChannel.homeMetaTitle
  • salesChannel.homeMetaDescription
  • salesChannel.homeKeywords
  • salesChannel.footerCategoryId
  • salesChannel.serviceCategoryId
  • salesChannel.name
  • salesChannel.shortName
  • salesChannel.accessKey
  • salesChannel.currencies
  • salesChannel.languages
  • salesChannel.configuration
  • salesChannel.active
  • salesChannel.maintenance
  • salesChannel.maintenanceIpWhitelist
  • salesChannel.taxCalculationType
  • salesChannel.type
  • salesChannel.currency
  • salesChannel.language
  • salesChannel.paymentMethod
  • salesChannel.shippingMethod
  • salesChannel.country
  • salesChannel.orders
  • salesChannel.customers
  • salesChannel.countries
  • salesChannel.paymentMethods
  • salesChannel.shippingMethods
  • salesChannel.translations
  • salesChannel.domains
  • salesChannel.systemConfigs
  • salesChannel.navigationCategory
  • salesChannel.footerCategory
  • salesChannel.serviceCategory
  • salesChannel.productVisibilities
  • salesChannel.mailHeaderFooterId
  • salesChannel.numberRangeSalesChannels
  • salesChannel.mailHeaderFooter
  • salesChannel.customerGroupId
  • salesChannel.customerGroup
  • salesChannel.newsletterRecipients
  • salesChannel.promotionSalesChannels
  • salesChannel.documentBaseConfigSalesChannels
  • salesChannel.productReviews
  • salesChannel.seoUrls
  • salesChannel.seoUrlTemplates
  • salesChannel.mainCategories
  • salesChannel.paymentMethodIds
  • salesChannel.productExports
  • salesChannel.hreflangActive
  • salesChannel.hreflangDefaultDomainId
  • salesChannel.hreflangDefaultDomain
  • salesChannel.analyticsId
  • salesChannel.analytics
  • salesChannel.customerGroupsRegistrations
  • salesChannel.eventActions
  • salesChannel.boundCustomers
  • salesChannel.wishlists
  • salesChannel.landingPages
  • salesChannel.translated.customFields

shippingMethod

  • shippingMethod.translated.name
  • shippingMethod.active
  • shippingMethod.description
  • shippingMethod.trackingUrl
  • shippingMethod.deliveryTimeId
  • shippingMethod.deliveryTime
  • shippingMethod.translations
  • shippingMethod.orderDeliveries
  • shippingMethod.salesChannelDefaultAssignments
  • shippingMethod.salesChannels
  • shippingMethod.availabilityRule
  • shippingMethod.availabilityRuleId
  • shippingMethod.prices
  • shippingMethod.mediaId
  • shippingMethod.taxId
  • shippingMethod.media
  • shippingMethod.tags
  • shippingMethod.taxType
  • shippingMethod.tax
  • shippingMethod.translated.customFields

paymentMethod

  • paymentMethod.pluginId
  • paymentMethod.handlerIdentifier
  • paymentMethod.translated.name
  • paymentMethod.distinguishableName
  • paymentMethod.description
  • paymentMethod.position
  • paymentMethod.active
  • paymentMethod.afterOrderEnabled
  • paymentMethod.plugin
  • paymentMethod.translations
  • paymentMethod.orderTransactions
  • paymentMethod.customers
  • paymentMethod.salesChannelDefaultAssignments
  • paymentMethod.salesChannels
  • paymentMethod.availabilityRule
  • paymentMethod.availabilityRuleId
  • paymentMethod.mediaId
  • paymentMethod.media
  • paymentMethod.formattedHandlerIdentifier
  • paymentMethod.shortName
  • paymentMethod.appPaymentMethod
  • paymentMethod.translated.customFields

customerGroup

  • customerGroup.name
  • customerGroup.translated.name
  • customerGroup.displayGross
  • customerGroup.translations
  • customerGroup.customers
  • customerGroup.salesChannels
  • customerGroup.registrationActive
  • customerGroup.registrationTitle
  • customerGroup.registrationIntroduction
  • customerGroup.registrationOnlyCompanyRegistration
  • customerGroup.registrationSeoMetaDescription
  • customerGroup.registrationSalesChannels
  • customerGroup.translated.customFields

taxRules (Auflistung der im Shop verfügbaren Steuern - PHP-Klasse TaxCollection)

  • taxRules.ids
  • taxRules.elements

Erweiterung ab Pluginversion 2.2.0 - Ermittlung des Steuersatzes

Der für die Versandart relevante Steuersatz wird in Shopware über den "Steuer-Typ" (Auto, Höchster Satz oder Fester Satz) ermittelt. Das Ergebnis daraus speichern wir ab sofort in der Variablen "matchingTaxRules", diese entspricht der PHP-Klasse https://github.com/shopware/platform/blob/trunk/src/Core/Checkout/Cart/Tax/Struct/TaxRuleCollection.php. Sie können somit den aktuell höchsten Steuersatz im Warenkorb über die folgende Twig-Variable auslesen:
{{ matchingTaxRules.highestRate().getTaxRate() }} Mit diesem Steuersatz können Sie nun rechnen.

Details

  • Verfügbar in: Englisch, Deutsch
  • Zuletzt aktualisiert: 3. Juli 2024
  • Veröffentlicht: 19. März 2021
  • Version: 4.0.2
  • Kategorie: Checkout / Bestellprozess

Ressourcen

Bewertungen (9)

Durchschnittliche Bewertung
5.0

Durchschnittliche Bewertung von 5 von 5 Sternen

Basiert auf 9 Bewertungen
5.0 Funktionalität
5.0 Bedienung
4.9 Dokumentation
5.0 Support

100 %
0 %
0 %
0 %
0 %

Bewertung schreiben

Wenn du diese Erweiterung heruntergeladen hast, kannst du diese im Shopware Account bewerten.

Bewertung schreiben
Exemplary support
5.0

Durchschnittliche Bewertung von 5 von 5 Sternen

von Sebastian Cis
24. Mai 2024 17:20
Due to Shopware being quite basic in terms of shipping, we looked for a plugin to meet our needs and this one was the only one that accepted complex rules. Of course we had no idea how to create the code for the rules, but we asked for help from the plugin developers to create the script for us based on our request. Julian was a massive help and replied all day long to our requests, thank you for this!
5.0 Funktionalität
5.0 Bedienung
5.0 Dokumentation
5.0 Support
Essenzielle Erweiterung
5.0

Durchschnittliche Bewertung von 5 von 5 Sternen

von Fabian Schmitz
29. November 2021 10:30
Wahrscheinlich unser wichtigstes Plugin, um auch komplexere Versandkostenstrukturen abzubilden, die nicht nach Gewicht oder Anzahl gehen. Extrem simpel zu bedienen, Zusatzvariablen wurden vom Support innerhalb von Tagen eingebaut.
5.0 Funktionalität
5.0 Bedienung
5.0 Dokumentation
5.0 Support
Mächtiges, gut funktionierendes Werkzeug
5.0

Durchschnittliche Bewertung von 5 von 5 Sternen

von Andreas Kremser
4. März 2024 10:10
Die Erweiterung stellt ein mächtiges Werkzeug zur Darstellung auch komplexerer Versandkostenanforderungen zur Verfügung. Der Acris-Support, wenn man ihn mal benötigt, ist schnell und kompetent und hilft ersichtlich gerne. Leider ist die Erweiterung überhaupt erst nötig, weil Shopware in SW6 keine Auf- und Abschlagsversandarten mehr bietet und eigene Regeln und Bedingungen ebenfalls nicht mehr möglich sind. In SW5 konnte man unsere Anforderungen noch mit Hausmittel darstellen!
5.0 Funktionalität
5.0 Bedienung
5.0 Dokumentation
5.0 Support
Tut was es soll
5.0

Durchschnittliche Bewertung von 5 von 5 Sternen

von Quadro GmbH
31. Mai 2021 09:20
Top Plugin, Top Entwickler mit schnellem Support. Hatte einige Probleme und Fragen zum Versand, die alle schnell und erfolgreich gelöst werden konnten.
5.0 Funktionalität
5.0 Bedienung
5.0 Dokumentation
5.0 Support
Produkt und Service sind erstklassig
5.0

Durchschnittliche Bewertung von 5 von 5 Sternen

von Axel G.
8. Juni 2022 14:01
Das Plugin löst das Problem individuell berechneter Versandkosten auf denkbar einfache Weise. Unser Wunsch auch eigene Twig-Funktionen verwenden zu können wurde in Rekordtempo umgesetzt. Dieser Support ist sowohl in Sachen Reaktionsgeschwindigkeit als auch Zielorientierung spitze. Danke!
5.0 Funktionalität
5.0 Bedienung
5.0 Dokumentation
5.0 Support
Endlich die Erweiterung nach der man sucht wenn man komplexen Versand berechnen will.
5.0

Durchschnittliche Bewertung von 5 von 5 Sternen

von Nikolaus Pluta
9. Dezember 2021 12:01
Es ist möglich alle Parameter die von Interesse sind mit TWIG Programmiertechnisch abzubilden und individuell zu errechnen. Beauftragen Sie mich wenn Sie Hilfe benötigen. Mein Name in Google reicht.
5.0 Funktionalität
5.0 Bedienung
5.0 Dokumentation
5.0 Support
Acris = Erweiterung und Support 1+
5.0

Durchschnittliche Bewertung von 5 von 5 Sternen

von Henning Vielitz
13. März 2023 16:05
Wir nutzen einige Erweiterungen von Acris und sind IMMER und durchgehend damit gut gefahren. Der Support ist Weltklasse, antwortet schnell und präzise und hilft auch darüber hinaus, wo sie können.
5.0 Funktionalität
5.0 Bedienung
5.0 Dokumentation
5.0 Support
Ein muss für jeden Shop mit komplexeren Versandlogiken. Top!
5.0

Durchschnittliche Bewertung von 5 von 5 Sternen

von Jonas
24. Juni 2024 11:56
Wir nutzen das Plugin zur komplexeren Versandkalkulation (Volumengewicht, Bandmaße, verschiedene Logiken) und es tut genau das, was man eigentlich von Bord vermisst. Der Support hat mir innerhalb kürzester Zeit geholfen, sehr lobenswert!
5.0 Funktionalität
5.0 Bedienung
5.0 Dokumentation
5.0 Support
Endlich wieder individuelle Berechnungen
5.0

Durchschnittliche Bewertung von 5 von 5 Sternen

von Markus
27. März 2023 16:02
Leider ist es, aus mir unerklärlichen Gründen, nicht möglich, im Standard von SW6 individuelle Versandkostenberechnungen vorzunehmen. Mit diesem Plugin lassen sich eigentlich simple Berechnungen auch wieder simpel durchführen. Beispielsweise Versandgewicht bis 5 kg = Preis x Für jedes hinzu kommende KG zahlt der Kunde y, addieert auf x. Kein Problem mit diesem Plugin. P.S.: Schade, dass derartig nötige Funktionen nicht Standard sind.
5.0 Funktionalität
5.0 Bedienung
4.0 Dokumentation
5.0 Support

Über den Extension Partner

ACRIS E-Commerce GmbH

ACRIS E-Commerce GmbH

Alle Erweiterungen anzeigen:

Partner Status

Shopware Gold Partner
Shopware
Gold Partner
Shopware Premium Extension Partner
Shopware
Premium Extension Partner

Details

  • Bewertung: 4.9

    Durchschnittliche Bewertung von 4.9 von 5 Sternen

  • Partner seit: 20. März 2015
  • Erweiterungen: 119
  • Land: Austria

Support

  • Support Sprachen: Deutsch, Englisch
  • Support Reaktionszeit: Sehr schnell