Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make module compatible with OneStepCheckout #47

Open
tramov opened this issue Apr 13, 2020 · 2 comments
Open

Make module compatible with OneStepCheckout #47

tramov opened this issue Apr 13, 2020 · 2 comments

Comments

@tramov
Copy link

tramov commented Apr 13, 2020

Below are the changes / hacks I needed to make to make the plugin work with the onestepcheckout.com module:

Add a custom field at position #6 in the OneStepCheckout configuration:

image

Modify Block/Checkout/LayoutProcessor.php to add the fields at sortOrder position #6:

image

Small change to the CSS, remove the following from Experius/Postcode/view/frontend/web/css/source/module/_checkout-fields.less

image

Result:

image

@speedupmate
Copy link

to get it to work with OneStepCheckout you would need to:

  1. add a field-set component experius_postcode_fieldset to Stores > Configuration > Sales > OneStepCheckout > Shipping address fields and settings and drag before street field

  2. open up

    public function getPostcodeFields($scope, $addressType)
    and in method getPostcodeFields comment out all the sortOrder nodes in their uiComponents inside a fieldset

    //'sortOrder' => (string)($this->getStartSortOrder() + 50),

@JeroenGerth
Copy link

JeroenGerth commented Mar 29, 2023

to get it to work with OneStepCheckout you would need to:

  1. add a field-set component experius_postcode_fieldset to Stores > Configuration > Sales > OneStepCheckout > Shipping address fields and settings and drag before street field
  2. open up
    public function getPostcodeFields($scope, $addressType)

    and in method getPostcodeFields comment out all the sortOrder nodes in their uiComponents inside a fieldset
    //'sortOrder' => (string)($this->getStartSortOrder() + 50),

This is how we implemented this postcode check in OSC. Still i'm facing an issue.

Usually, when navigating to the checkout while the customer is logged in, the user can select an address form his addressbook. The default address is always preselected. But somehow when using this postcode check, the default address gets deselected while loading the checkout. The user tries to order and gets an error about "no address selected" and gets confused, thinking "what you mean.. there is an address right?" (especially when there is only 1 address shown)... and leaving the checkout potentially.

In Luma the module works fine, but in OSC i am facing this problem. Any ideas how to fix it?

How the checkout is loaded.
Scherm­afbeelding 2023-03-29 om 13 48 36

How it is suppose to be loaded. With default address selected. This makes it clear that the user can choose an address from the list.
Scherm­afbeelding 2023-03-29 om 13 43 53

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants