My client needs a very specifically formatted file that displays order details. I'm using Views Data Export for this, and everything seems to be going well except for when it comes to the shipping information. I'm trying to show the Shipping Service name field for the shipping method that was used, but there's one catch: The client needs to use their company's codes for this field, not the default ones that come with the shipping module.

For example, if a customer used FedEx Ground, the field would need to display "FDXGRDCOL" instead of the default "FedEx Ground" name listed on the commerce/config/shipping page. One solution I had hoped would work was by renaming the Shipping Service's rules name in the Settings fieldset (admin/config/workflow/rules/components/manage/commerce_shipping_service_fedex_ground), but it seems that because shipping methods are not entities, I can't access stuff like this. I have attached a photo of this:

Fedex Ground shipping service rule config screen

Any ideas?

1 Answer 1


Try configuring the shipping field with rewrite results, checking the "rewrite the output of this field and using a either a custom token or the machine name for the shipping type, and make the machine name the same as the client's code.

  • My data export view is full of rewrites (😀) but tokens aren't available for shipping services. The best that I can do now is use the token for line item label for the shipping service. I would have loved to simply change the machine name, but I think it's hard-coded in each shipping method/service module. And even if I could change the machine name, it wouldn't be available as a token. Is there something I might be missing regarding custom tokens?
    – McTwist
    Nov 19, 2016 at 3:31

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.