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

Fix bug shipping number is empty in {followup} #10117

Merged
merged 1 commit into from Aug 30, 2018

Conversation

Projects
None yet
5 participants
@jf-viguier
Contributor

jf-viguier commented Aug 24, 2018

When you call update OrderCarrier with Prestashop WebService, the Shipping number is empty in the {followup} URL in the "In Transit" email to customer.

When the web service is called, $order->shipping_number is empty in sendInTransitEmail().
The shipping number has to be retrieved in OrderCarrier, not in Order : that's my fix.

Questions Answers
Branch? develop
Description? Shipping number is empty in {followup} if In transit email is launched with the WebService
Type? bug fix
Category? WS
Deprecations? no
Fixed ticket? Fixes #10115
How to test? Call OrderCarrier->update via rest WebService

This change is Reviewable

@prestonBot

This comment has been minimized.

Show comment
Hide comment
@prestonBot

prestonBot Aug 24, 2018

Collaborator

Hello @jf-viguier!

This is your first pull request on the PrestaShop project. Thank you, and welcome to this Open Source community!

Collaborator

prestonBot commented Aug 24, 2018

Hello @jf-viguier!

This is your first pull request on the PrestaShop project. Thank you, and welcome to this Open Source community!

@matks

This comment has been minimized.

Show comment
Hide comment
@matks

matks Aug 28, 2018

Contributor

@Quetzacoalt91 Do you know the difference between the usage of Order shipping_number field and OrderCarrier tracking_number field ?

Contributor

matks commented Aug 28, 2018

@Quetzacoalt91 Do you know the difference between the usage of Order shipping_number field and OrderCarrier tracking_number field ?

@jf-viguier

This comment has been minimized.

Show comment
Hide comment
@jf-viguier

jf-viguier Aug 28, 2018

Contributor

Let's see Order class :
Shipping number : deprecated since 1.5.0.4, see OrderCarrier->tracking_number
An order can have multiple shipping : OrderCarrier i here for that.

Order shipping_number is here for retro compatibility.

When you call OrderCarrier/save with the webservice, the Order shipping_number is empty.

Contributor

jf-viguier commented Aug 28, 2018

Let's see Order class :
Shipping number : deprecated since 1.5.0.4, see OrderCarrier->tracking_number
An order can have multiple shipping : OrderCarrier i here for that.

Order shipping_number is here for retro compatibility.

When you call OrderCarrier/save with the webservice, the Order shipping_number is empty.

Fix bug shipping number is empty in {followup}
When you call update OrderCarrier with Prestashop WebService, the Shipping number is empty in the {followup} URL in the In Transit email to customer.
When the web service is called, $order->shipping_number is empty in sendInTransitEmail.
The shipping number has to be retreive in OrderCarrier, not in Order : that's my fix.
@matks

matks approved these changes Aug 28, 2018

@matks

This comment has been minimized.

Show comment
Hide comment
@matks

matks Aug 28, 2018

Contributor

@jf-viguier Yes indeed :) I have approved your changes and rebased your branch in order for the Travis build to pass. QA will also review your PR and if they validate, I'll merge.

Thank your for your contribution 👍 .

Just curious: how did you learn to use PrestaShop Webservice ? From documentation ? From code examples ?

Contributor

matks commented Aug 28, 2018

@jf-viguier Yes indeed :) I have approved your changes and rebased your branch in order for the Travis build to pass. QA will also review your PR and if they validate, I'll merge.

Thank your for your contribution 👍 .

Just curious: how did you learn to use PrestaShop Webservice ? From documentation ? From code examples ?

@matks matks added this to the 1.7.5.0 milestone Aug 28, 2018

@jf-viguier

This comment has been minimized.

Show comment
Hide comment
@jf-viguier

jf-viguier Aug 29, 2018

Contributor

How did I learn to use PrestaShop Webservice ? I use from several years now. I've started with the documentation, now I directly read the code to learn how it works.

I suggest that the use of shipping_number from Order class should totally be remove from code, it's depreciated and confusing. What do you thing ?

Contributor

jf-viguier commented Aug 29, 2018

How did I learn to use PrestaShop Webservice ? I use from several years now. I've started with the documentation, now I directly read the code to learn how it works.

I suggest that the use of shipping_number from Order class should totally be remove from code, it's depreciated and confusing. What do you thing ?

@matks

This comment has been minimized.

Show comment
Hide comment
@matks

matks Aug 29, 2018

Contributor

Thank your for sharing :)

We cannot remove a field in the next minor versions (1.7.5, 1.7.6 ...) because a new minor release of Prestashop has to be compatible with previous versions. However in the next major version of Prestashop which will be 1.8.0, it will be dropped.

Contributor

matks commented Aug 29, 2018

Thank your for sharing :)

We cannot remove a field in the next minor versions (1.7.5, 1.7.6 ...) because a new minor release of Prestashop has to be compatible with previous versions. However in the next major version of Prestashop which will be 1.8.0, it will be dropped.

@marionf marionf assigned marionf and unassigned marionf Aug 29, 2018

@marionf marionf added QA ✔️ and removed waiting for QA labels Aug 29, 2018

@PierreRambaud PierreRambaud merged commit 02480db into PrestaShop:develop Aug 30, 2018

2 checks passed

Codacy/PR Quality Review Up to standards. A positive pull request.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@PierreRambaud

This comment has been minimized.

Show comment
Hide comment
@PierreRambaud

PierreRambaud Aug 30, 2018

Contributor

Thanks @jf-viguier ;)

Contributor

PierreRambaud commented Aug 30, 2018

Thanks @jf-viguier ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment