Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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']
Comment | File | Size | Author |
---|---|---|---|
cart-links-id-1.patch | 1.53 KB | amitaibu | |
Comments
Comment #1
TR CreditAttribution: TR commentedI'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.
Comment #2
arekanderu CreditAttribution: arekanderu commentedI am trying to get the cart link id in drupal 6.20 as well...
Comment #3
arekanderu CreditAttribution: arekanderu commentedhm, the patch fails with latest ubercart cart links module under Drupal 6.20. Any chance of making a quick fix?
Comment #4
TR CreditAttribution: TR commentedNew features need to go into 8.x-4.x first at this point, then be backported if there is sufficient interest.