PAYONE-GmbH / shopware-5

PAYONE Payment Plugin for shopware 5
MIT License
10 stars 24 forks source link

Payone Klarna no birthyear above 1999 available #358

Closed mfritsche-dotsource closed 4 years ago

mfritsche-dotsource commented 4 years ago

Hello, when using Payone Klarna as payment mean you have to submit your birthdate. Unfortunately it isn't possible to choose a year greater than 1999. In Germany the legal age for making contracts is 18 so it should be at least possible to choose the year 2002.

The corresponding code part can be found in views/frontend/plugins/payment/mopt_paymentmean_klarna.tpl:

                {section name="birthyear" loop=2000 max=100 step=-1}
                    {$isSelected = $smarty.section.birthyear.index == $moptCreditCardCheckEnvironment.mopt_payone__klarna_birthyear}
                    <option value="{$smarty.section.birthyear.index}" {if $isSelected}selected{/if}>
                        {$smarty.section.birthyear.index}
                    </option>
                {/section}

There the loop for the year is always started at 2000 and decreased by 1 until a maximum of 100 is reached. Therefor building numbers from 1999 to 1900. It may be better to start the loop with the current year and increase the max to 120. The actual oldest living person is 112.

We are using the Shopware 5 plugin in version 3.13.0. But this is also true for the newest available version 4.2.1 in the Shopware store.

fjbender commented 4 years ago

I proposed a fix and will move it to QA