textex MemberComments: 12 Received thanks: 1 Member since: January 4

Hallo!

In der Vorberechnung im Warenkorb werden alle Länder angezeigt, die aktiv sind, auch wenn sie in den Einstellungen nicht als Lieferland angehakt sind.
Ich würde das gerne ändern und nur die Länder anzeigen, in die wir liefern.

1 Answer

  • vanwittlaervanwittlaer MemberComments: 341 Received thanks: 84 Member since: September 2015

    Eine einfache Lösung wäre über ein Template in deinem custom theme, `frontend/checkout/shipping_costs.tpl`
     

    {extends file='parent:frontend/checkout/shipping_costs.tpl'}
    
    {block name='frontend_checkout_shipping_costs_country_selection'}
        <div class="select-field">
            <select id="basket_country_list" name="sCountry" data-auto-submit="true">
                {foreach $sCountryList as $country}
                    {if $country.allow_shipping === "1"}
                        <option value="{$country.id}"{if $country.id eq $sCountry.id} selected="selected"{/if}>
                            {$country.countryname}
                        </option>
                    {/if}
                {/foreach}
            </select>
        </div>
    {/block}

    Viel Erfolg,

    Geert

    Quote
    Accepted Answer
    Thanked by 1tex
  • Accepted Answer

Answers

  • vanwittlaervanwittlaer MemberComments: 341 Received thanks: 84 Member since: September 2015

    Eine einfache Lösung wäre über ein Template in deinem custom theme, `frontend/checkout/shipping_costs.tpl`
     

    {extends file='parent:frontend/checkout/shipping_costs.tpl'}
    
    {block name='frontend_checkout_shipping_costs_country_selection'}
        <div class="select-field">
            <select id="basket_country_list" name="sCountry" data-auto-submit="true">
                {foreach $sCountryList as $country}
                    {if $country.allow_shipping === "1"}
                        <option value="{$country.id}"{if $country.id eq $sCountry.id} selected="selected"{/if}>
                            {$country.countryname}
                        </option>
                    {/if}
                {/foreach}
            </select>
        </div>
    {/block}

    Viel Erfolg,

    Geert

    Quote
    Accepted Answer
    Thanked by 1tex
  • textex MemberComments: 12 Received thanks: 1 Member since: January 4

    Hallo Geert,

    Vielen Dank! Läuft.

    Grüße
    Götz

     

  • textex MemberComments: 12 Received thanks: 1 Member since: January 4

    Nach Update auf 5.6.x kamen keine Länder mehr im Dropdown.
    nach entfernen des === "1" läufts wieder

    {extends file='parent:frontend/checkout/shipping_costs.tpl'}
    
    {block name='frontend_checkout_shipping_costs_country_selection'}
        <div class="select-field">
            <select id="basket_country_list" name="sCountry" data-auto-submit="true">
                {foreach $sCountryList as $country}
                    {if $country.allow_shipping}
                        <option value="{$country.id}"{if $country.id eq $sCountry.id} selected="selected"{/if}>
                            {$country.countryname}
                        </option>
                    {/if}
                {/foreach}
            </select>
        </div>
    {/block}

     

    Thanked by 1vanwittlaer
Sign In or Register to comment.