Shipment tracking tokens are needed to communicate with the customer information easily they frequently request.

I created a module to add tokens for Shipment Carrier, Shipment Tracking Number and Package Tracking Number. The module is in Sandbox here: https://drupal.org/sandbox/drcord/2138485

I have created a patch for UberCart in addition to a module so that it can be integrated into the core, at another user's request, as tracking info is frequently needed to communicate with the customer.

Comments

DrCord’s picture

StatusFileSize
new2.38 KB

Tokens made available by patch:

  • [order:shipment-carrier]
  • [order:tracking-package]
  • [order:tracking-shipment]
longwave’s picture

Status: Active » Needs work

Thanks for this, although are you duplicating work that has already been done - uc_shipping.tokens.inc already provides a tracking-number token? This patch should at least be moved into that file, because it depends on uc_shipping to be enabled for any of these tokens to work.

tr’s picture

Version: 7.x-3.5 » 7.x-3.x-dev
Priority: Major » Normal

Patch needs to be against HEAD for the testbot to work.

Also, the markup should be removed from the text in the token. If you want to style the text in your email or any other context the token is used then it can be marked up at that point.

DrCord’s picture

Not sure what you mean against HEAD if I didn't do it, I thought I was generating the patch against the HEAD...
I will look at moving the code into uc_shipping.tokens.inc

DrCord’s picture

Issue summary: View changes
StatusFileSize
new2.54 KB
tr’s picture

Status: Needs work » Needs review

HEAD refers to the most recent development version.

When you post a patch, change the status to "Needs review" so the testbot will look at it.

Status: Needs review » Needs work

The last submitted patch, 1: tokens-tracking-2139337-1.patch, failed testing.

tr’s picture

There appears to be a problem with the testbot. The test passed, but the system message in #7 reports the wrong thing.

Issue opened at #2140329: Testbot autofollowups should only change status for the last patch in an issue.

tr’s picture

Status: Needs work » Needs review
tr’s picture

DrCord’s picture

This has been re-queued for awhile do I need to do something?

philsward’s picture

Bump

Would love to see this committed. Tested against 3.8 and appears to work ok.

tr’s picture

@philsward: You're the first to test this.

philsward’s picture

@TR thx for re-queuing it, but after some more extensive testing, It seems this is only partially working. I spoke too soon :-/ a million apologies.

The following is a list of my findings. I do not have the knowledge to fix and suggest a patch, so if @DrCord or someone else can provide a fix, I am willing to test.

On a side note, I have only tested this against "Manual Shipment". As stated before, tested against D7 UC 3.8

---

[order:shipment-carrier] only works for the very last shipment. In a drop ship environment or multi-shipment environment, there is usually more than one carrier. Each carrier should be separated with the respective tracking numbers below them.

[order:tracking-number] Listing all tracking numbers (good; needs to be separated by carrier though)

[order:tracking-package] Only works for the very last shipment.

[order:tracking-shipment] Only works for the very last shipment. (by design?)

Output Example for 6 separate "shipments"
Order Shipping:
Carrier6: 1-12345, 2-12345, 3-12345, 4-12345, 5-12345, 6-12345
Carrier6: 6-12345P
Carrier6: 6-12345

Tested Token Format

Order Shipping:
[order:shipment-carrier]: [order:tracking-number]
[order:shipment-carrier]: [order:tracking-package]
[order:shipment-carrier]: [order:tracking-shipment]

DrCord’s picture

I no longer have an installation of Ubercart to test this against.

tr’s picture

Assigned: DrCord » Unassigned
Issue tags: -CCK-Token, -commerce shipping
philsward’s picture

I might have my programmer look at this and issue an updated patch. Not sure if I'll end up with this direction or not, but I do like where it was going. We'll see. I'll post back if I come up with anything in the next few weeks.

tr’s picture

Thanks. It would be useful.

philsward’s picture

Attached an updated version that should have some of the bugs worked out from #5

Status: Needs review » Needs work

The last submitted patch, 20: uc_shipment-tracking_number_list_token-2139337-20.patch, failed testing.

tr’s picture

Status: Needs work » Needs review
StatusFileSize
new3.25 KB

The patch in #20 failed for the same reason as your patch in the other issue - you used DOS line endings instead of Unix. I converted this one to the correct format for you.

philsward’s picture

Thanks @TR

Sorry for making you do that, but glad it passed.

tr’s picture

Component: Code » Shipping (Fulfillment)
tr’s picture

Component: Shipping (Fulfillment) » Fulfillment