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

To display the extra field added on the customer address form in the address block #12033

Merged
merged 2 commits into from Aug 26, 2019

Conversation

@PeeyushAgrawalWebkul
Copy link
Contributor

commented Jan 5, 2019

Questions Answers
Branch? develop
Description? This PR ie related to already merged PR - #9132.
In PR 9132 we have added a hook on customer address form to add extra address fields. To display these fields record in the address block on address front controller we need to add a hook in block-address.tpl file, which will help to display the extra added fields values.
Type? new feature
Category? FO
BC breaks? no
Deprecations? no
How to test? By using the hook (as in commit) we can display the value of the field. This PR is related to #9132, please check.

This change is Reviewable

Syncing from original
This hook will helpful to display the content added as an extra field in the address block.
@Quetzacoalt91

This comment has been minimized.

Copy link
Member

commented Jan 9, 2019

In the PR you linked, these fields are returned as an array. This hook could actually be reused by the theme to display them as it feels.

@PeeyushAgrawalWebkul

This comment has been minimized.

Copy link
Contributor Author

commented Jan 10, 2019

Hello @Quetzacoalt91 ,

Yes, in the linked PR we have added a hook to add the fields on the customer address form which returns an array of fields.

But right now there is no way to display those field values in the address block of the addreses page.
This PR is the solution for this problem.
By using this hook (added in this PR) we can display those fields value in the address block of the addresses page. This hook will return the html with the values of the fields which was added through the extra field hook(linked PR hook).

Thanks

@Quetzacoalt91

This comment has been minimized.

Copy link
Member

commented Jan 10, 2019

I understand your point, but adding one more hook would mean for the module developers to register to it, then implement a new method to prepare the data to display.

On the other hand, reusing the same hook means we reuse directly the same data, and we let the theme handle it by itself. The only change would be adding a template for displaying this data.

@PeeyushAgrawalWebkul

This comment has been minimized.

Copy link
Contributor Author

commented Jan 14, 2019

Hello @Quetzacoalt91

Please do not relate this #9132 PR for this hook requirement directly, you can ignore #9132 PR for now. My requirement is to display more data on address details card by some module by this hook 'displayAdditionalCustomerAddressFields'. Please see the screenshot. I think if PrestaShop adds this standard hook here, the other theme would also use this hook by default.
addresses

@mickaelandrieu mickaelandrieu requested a review from Quetzacoalt91 Jan 17, 2019
@PeeyushAgrawalWebkul

This comment has been minimized.

Copy link
Contributor Author

commented Feb 2, 2019

Hello @Quetzacoalt91 ,

Is there any update for my last reply? As I understand this hook should be there in PrestaShop core.

Thanks,

@PeeyushAgrawalWebkul

This comment has been minimized.

Copy link
Contributor Author

commented Mar 18, 2019

Hello @Quetzacoalt91

Please check this and if anything is remaining from my end then please let me know.

Thanks

@PeeyushAgrawalWebkul

This comment has been minimized.

Copy link
Contributor Author

commented Aug 20, 2019

Hello @Quetzacoalt91

There is no way to display the extra address details in the address block.
By adding this hook,
the module developer can display the address extra details which are added by using "additionalCustomerAddressFields" hook.

Thanks.

@PeeyushAgrawalWebkul

This comment has been minimized.

Copy link
Contributor Author

commented Aug 21, 2019

Hello @Quetzacoalt91
@PierreRambaud
Please merge this PR.

Thanks.

@PierreRambaud

This comment has been minimized.

Copy link
Contributor

commented Aug 21, 2019

@PeeyushAgrawalWebkul We are waiting for QA feedback, to be sure everything is working as expected :)

@sarahdib sarahdib self-assigned this Aug 22, 2019
@matthieu-rolland matthieu-rolland merged commit 5db59e8 into PrestaShop:develop Aug 26, 2019
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.