cart links data isn't very expendable but this patch manages to pass the ID back to the order.

1) Apply patch.
2) Instead of /cart/add/e-p1_q5-imonday_special?destination=cart you should pass cart/add/e-imonday_special-p30_q1?destination=cart -- the cart link ID (imonday_special) is now before the product ID (p30).
3) Find your cart links ID in $order->products[0]->data['cart_links_id']

CommentFileSizeAuthor
cart-links-id-1.patch1.53 KBamitaibu
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

TR’s picture

Version: 6.x-2.x-dev » 7.x-3.x-dev
Status: Needs review » Needs work

I've been working on the cart links code recently, so I'm bumping this and moving it to 7.x-3.x for consideration. I don't like having to mandate the order of the cart links actions for this to work.

arekanderu’s picture

I am trying to get the cart link id in drupal 6.20 as well...

arekanderu’s picture

hm, the patch fails with latest ubercart cart links module under Drupal 6.20. Any chance of making a quick fix?

TR’s picture

Version: 7.x-3.x-dev » 8.x-4.x-dev
Issue summary: View changes

New features need to go into 8.x-4.x first at this point, then be backported if there is sufficient interest.