Jump to content

How can I remove "Create an account (Optional)


Recommended Posts

This block can be found here: /themes/classic/templates/_partials/form-fields.tpl

The code:

        {block name='form_field_item_password'}
          <div class="input-group js-parent-focus">
            <input
              class="form-control js-child-focus js-visible-password"
              name="{$field.name}"
              type="password"
              value=""
              pattern=".{literal}{{/literal}5,{literal}}{/literal}"
              {if $field.required}required{/if}
            >
            <span class="input-group-btn">
              <button
                class="btn"
                type="button"
                data-action="show-password"
                data-text-show="{l s='Show' d='Shop.Theme.Actions'}"
                data-text-hide="{l s='Hide' d='Shop.Theme.Actions'}"
              >
                {l s='Show' d='Shop.Theme.Actions'}
              </button>
            </span>
          </div>
        {/block}

Dont forget to mark your topic as solved and to hit the like button for the people who help you 😉

Kind regards,

Crezzur

  • Like 1
Link to comment
Share on other sites

3 minutes ago, Lekkende anus said:

Why do we only see you on the forum when you need clients crezzur? Are you starving right now, I see there is a lot of activity?

Hey Anus. I'm not really getting your question?

Do you mind writing it in a simpler way. 

Tnx

 

33 minutes ago, Crezzur said:

This block can be found here: /themes/classic/templates/_partials/form-fields.tpl

The code:


        {block name='form_field_item_password'}
          <div class="input-group js-parent-focus">
            <input
              class="form-control js-child-focus js-visible-password"
              name="{$field.name}"
              type="password"
              value=""
              pattern=".{literal}{{/literal}5,{literal}}{/literal}"
              {if $field.required}required{/if}
            >
            <span class="input-group-btn">
              <button
                class="btn"
                type="button"
                data-action="show-password"
                data-text-show="{l s='Show' d='Shop.Theme.Actions'}"
                data-text-hide="{l s='Hide' d='Shop.Theme.Actions'}"
              >
                {l s='Show' d='Shop.Theme.Actions'}
              </button>
            </span>
          </div>
        {/block}

Dont forget to mark your topic as solved and to hit the like button for the people who help you 😉

Kind regards,

Crezzur

Thank you so much for your help. I did not know about the like feature.

I know you are probably extremely busy and don't have time to help people from all over, but I do have a couple more questions for you.

I tried exactly what you said. I got the input field removed but "Password" and "Optional" are still there. Please see attached image.

My second question is, I went to the back office and removed the radio buttons for "Mr", "Mrs" and "Ms" but "Social title" is still there. Do you by any chance know how to get that removed.
image.png.442a48f493e8bead356b13add719100a.png
Thank you so much in advance.

Link to comment
Share on other sites

Okay, you gave me a hard time on this one. but i found the solutions 😄

First locate and open this file: "YourStore/classes/form/CustomerFormatter.php"

Disable "Password" part disable following code:

        if ($this->ask_for_password) {
            $format['password'] = (new FormField())
                ->setName('password')
                ->setType('password')
                ->setLabel(
                    $this->translator->trans(
                        'Password', [], 'Shop.Forms.Labels'
                    )
                )
                ->setRequired($this->password_is_required)
            ;
        }

To disable the "Social titel" part find in the same file following code and disable:

        $genders = Gender::getGenders($this->language->id);
        if ($genders->count() > 0) {
            $genderField = (new FormField())
                ->setName('id_gender')
                ->setType('radio-buttons')
                ->setLabel(
                    $this->translator->trans(
                        'Social title', [], 'Shop.Forms.Labels'
                    )
                )
            ;
            foreach ($genders as $gender) {
                $genderField->addAvailableValue($gender->id, $gender->name);
            }
            $format[$genderField->getName()] = $genderField;
        }

 

  • Thanks 1
Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...