OnlineSnacks
OnlineSnacks

Reputation: 31

Add field in checkout prestashop 1.7

I need some help with my checkout in prestashop 1.7 In the first step I want to delete "social title" and the box the says "får erbjudanden från våra partners" in English -> (Receive offers from our partners). Se the attached picture step 1.

In the second step I want to change "Adresskomplement" in English -> (Address Complement) to Portkod (swedish) which means (gate access). And also the other field to Övrigt or meddelande till Onlinesnacks. There is also a little box at the end of step 2 which I want to delete. Se the attached picture step 2.

and my last issue is in step 4. I want to delete the marked box on the picture step 4.

STEP 1

STEP 2

STEP 4

Upvotes: 3

Views: 3039

Answers (2)

altermind
altermind

Reputation: 68

In order to remove Title, find and comment this block in /classes/form/CustomerFormatter.php

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

Upvotes: 3

Knowband Plugins
Knowband Plugins

Reputation: 1317

You can use the hookDisplayBeforeCarrier() to render some JavaScript code to perform the actions you want.

This hook is rendered before the carrier block on the checkout page so it can be used to add some additional functionality on checkout page as well.

Upvotes: 1

Related Questions