How to disable the timezone field on the frontend?

Created by Esther Nguyen, Modified on Tue, 4 Jan, 2022 at 11:19 AM by Esther Nguyen

QUESTION:

I would like to disable the timezone field in the frontend. It is totally unnecessary field because all customers are in the same timezone. How to disable it?



SOLUTION:

If your customers are in the same timezone, you can disable/remove the Select Timezone field by removing line from 120 to 136 in the file app/code/Bss/GiftCard/view/frontend/web/template/product/view/type/giftcard/send-info.html:

<div class="field bss-giftcard-timezone">

    <label data-bind="attr: {for: getType() + '_timezone'}" class="label">

        <span><!-- ko i18n: 'Select Timezone'--><!-- /ko --></span>

    </label>

    <div class="control">

        <select data-bind="

            value: timeZone,

            options: getTimezoneList(),

            optionsText: 'label',

            optionsValue: 'value',

            optionsCaption: $t('Choose an Timezone...'),

            attr: {

                id: getType() + '_timezone',

                name: getType() + '_timezone'

            }"></select>

    </div>

</div>


Meanwhile, if your customers have different timezones, you should consider whether you want to disable the Timezone field or not as it will limit the user experience and can create unexpected issues. 


If you need any further assistance, please feel free to contact us. We'd be happy to support you!


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article