Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Usingadmin_name for custom shipment handler resolving (or introducingpresentation attribute) #12272

Open
@mbajur

Description

@mbajur

Hey! I can see that in order tocustomize shipping method handling, one have to define aSpree::ShipmentHandler::<constantized shipping method NAME> class. Wouldn't that make sense to either use something else thanname attribute in here (likeadmin_name for example) or addpresentation attribute to be used on the frontend?

I'm rising that as the current state of that enforces shop to use one-word and non-space-separated names of the shipping methods which seems a bit weird. Let's say you have a digital cards shipping method - in order to make that work, you have to use a single word name (DigitalCard orDigitalcard) which looks weird for the end user as it's gonna be displayed this way on the checkout. If we usedadmin_name instead, we could not bother about what end users sees. However, i think addingpresentation attribute seems more reasonable so neither admins nor customers are being presented with a weird shipping method names.

I'm also not sure about support for, say, polish letters in the class names. Which is another example of weirdness :)

If you think that should be changed, i'm happy to open a PR with that.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp