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

estimatedShippingAddress not returned when using commerce/cart/update-cart (JSON) #2703

Closed
andrewhawkes opened this issue Feb 14, 2022 · 6 comments

Comments

@andrewhawkes
Copy link

Description

See #1084

This appears to have disappeared again?

Additional info

  • Craft CMS version: 3.7.30.1
  • Craft Commerce version: 3.4.10.1
@pdaleramirez
Copy link
Contributor

@andrewhawkes The estimatedShippingAddress is still there when you use the carArray function

        $order = Order::findOne(1);
        $json = Plugin::getInstance()->getOrders()->cartArray($order);

If the cart has the estimatedShippingAddressId value, the estimatedShippingAddress attribute should appear.

@andrewhawkes
Copy link
Author

@pdaleramirez sorry, this is specifically when you update via AJAX to commerce/cart/update-cart it's not returned in the response.

@pdaleramirez
Copy link
Contributor

@andrewhawkes the update-cart response is missing many attributes on latest version. This will be added on Commerce 4. To add the estimatedShippingAddressId attribute you can use the EVENT_MODIFY_CART_INFO

$this->trigger(self::EVENT_MODIFY_CART_INFO, $event);

@andrewhawkes
Copy link
Author

@andrewhawkes the update-cart response is missing many attributes on latest version. This will be added on Commerce 4. To add the estimatedShippingAddressId attribute you can use the EVENT_MODIFY_CART_INFO

$this->trigger(self::EVENT_MODIFY_CART_INFO, $event);

Is there any ETA on commerce 4 because the estimatedShippingAddress was supposed to be returned. It's useful to have that info returned so you can validate what the details are for estimating shipping etc.

@pdaleramirez
Copy link
Contributor

@andrewhawkes Most likely 2nd quarter of this year.

@andrewhawkes
Copy link
Author

@pdaleramirez thanks for getting back to me

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

No branches or pull requests

2 participants