0

im trying to get the quote shipping method by

$quote->getShippingAddress()->getShippingMethod();

but it always returns null. then i figured out the shipping_method is not part of the instance getShipping Address is returning. digging in the code, i cant seem to figure out why its not included in the instance. since i didnt see any weird code that would exclude it in the retrival.

enter image description here

enter image description here

enter image description here

NOTE: its not just the shipping method that is missing. the id is also renamed to quote_address_id and i think the instance is smaller than the number of rows present in the DB.

does anyone has an idea why its like this? i just find it weird to retrieved a whole instance of the quote address just to get the shipping method.

1 Answer 1

0

Turns out that i have the order instance and not the quote instance, so im getting the sales_order_address that really makes sence. my bad for this one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.