This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 219
Update shipping/cart endpoints #1833
Merged
senadir
merged 6 commits into
add/put-method-on-shipping
from
update/select-shipping-rates
Mar 2, 2020
Merged
Update shipping/cart endpoints #1833
senadir
merged 6 commits into
add/put-method-on-shipping
from
update/select-shipping-rates
Mar 2, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
senadir
previously requested changes
Feb 28, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, this is not returning the correct packages when you submit an address (it still give back the default address of Locations not covered by your other zones
senadir
reviewed
Feb 28, 2020
Yeah we need to update the hooks to use the new endpoint
…Sent from my iPhone
On Feb 28, 2020, at 4:26 PM, Mike Jolley ***@***.***> wrote:
@mikejolley commented on this pull request.
In src/RestApi/StoreApi/Controllers/CartShippingRates.php:
> return rest_ensure_response( [] );
}
- $packages = $this->get_shipping_packages( $request );
+ $packages = $controller->get_shipping_packages();
Why is it passed? I removed the address passing from this endpoint so it just uses session. The cart/update-shipping endpoint does accept address data.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
@mikejolley based from this PR |
@senadir By us though right? There may be use cases outside of cart - you could say the same about coupons and items right now. |
senadir
pushed a commit
that referenced
this pull request
Mar 3, 2020
* Items should not have keys in API response * Include package ID in response (this is just a basic index) * /cart/select-shipping-rate/package_id * Add package_id to package array * Update responses and add shipping-rates to main cart endpoint * update-shipping endpoint
senadir
pushed a commit
that referenced
this pull request
Mar 4, 2020
* Items should not have keys in API response * Include package ID in response (this is just a basic index) * /cart/select-shipping-rate/package_id * Add package_id to package array * Update responses and add shipping-rates to main cart endpoint * update-shipping endpoint
senadir
pushed a commit
that referenced
this pull request
Mar 5, 2020
* Items should not have keys in API response * Include package ID in response (this is just a basic index) * /cart/select-shipping-rate/package_id * Add package_id to package array * Update responses and add shipping-rates to main cart endpoint * update-shipping endpoint
senadir
pushed a commit
that referenced
this pull request
Mar 5, 2020
* Items should not have keys in API response * Include package ID in response (this is just a basic index) * /cart/select-shipping-rate/package_id * Add package_id to package array * Update responses and add shipping-rates to main cart endpoint * update-shipping endpoint
senadir
pushed a commit
that referenced
this pull request
Mar 5, 2020
* Items should not have keys in API response * Include package ID in response (this is just a basic index) * /cart/select-shipping-rate/package_id * Add package_id to package array * Update responses and add shipping-rates to main cart endpoint * update-shipping endpoint
senadir
added a commit
that referenced
this pull request
Mar 5, 2020
* add select shipping endpoint to router * add select shipping method * add selected rates to cart * better select rates * move schema function to seperate function * move validation to Cart Controller * fix wrong session key * Update shipping/cart endpoints (#1833) * Items should not have keys in API response * Include package ID in response (this is just a basic index) * /cart/select-shipping-rate/package_id * Add package_id to package array * Update responses and add shipping-rates to main cart endpoint * update-shipping endpoint * Add querying selected shipping rate to the store (#1829) * add selecting shipping to store * directly call useSelectShippingRate * refactor cart keys transformation to reducer * remove selecting first result and accept selecting * move update shipping to new endpoint * pass selected rates down * select shipping right directly and fix editor issues * fix some broken prop types * key -> package id * Update and fix cart/shipping-rate tests * fix case for when rates are set * Update useShippingRates test * add args to rest endpoint * move selecting shipping rate logic to hook * fix some naming issues * update propTypes * update action call * fully watch cart state * address review issues * fix prop type issues * fix issue with rates not loading in checkout * remove extra package for shipping * move ShippingCalculatorOptions to outside Co-authored-by: Mike Jolley <[email protected]> Co-authored-by: Albert Juhé Lluveras <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@senadir Will be some more work to do here such as updating tests, testing, and checking each response/request works for our use case, but this PR implements some of what we chatted about.
selected
property much like you did originally (sorry)