Follow up from #2792091: Add unique URL copy link to the product node page
The unique URL for the product is in format :
http://yoursite.com/p/<username>/<product_node_id>
Change the format to:
http://yoursite.com/p/<userhash>/<product_node_id>
Proposed solution:
- Create a table
users_hashstoring a user_id and its hash. Populate the data onhook_install(). - On new user creation, save the hash using
hook_user_insert(). - Remove the data from the table on user deletion on
hook_user_delete(). - In
commerce_commission_set_referral_product()query for user id belonging to the hash instead of the username.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | have_a_hash_in_the-2792405-12.patch | 3.24 KB | prashant114606 |
| #12 | have_a_hash_in_the-2792405-12.patch | 3.24 KB | prashant114606 |
| #9 | have_a_hash_in_the-2792405-9.patch | 3.45 KB | prashant114606 |
| #7 | have_a_hash_in_the-2792405-7.patch | 3.45 KB | prashant114606 |
| #6 | have_a_hash_in_the-2792405-6.patch | 3.26 KB | prashant114606 |
Comments
Comment #2
ajitsComment #3
ajitsComment #4
prashant114606 commentedComment #5
prashant114606 commentedComment #6
prashant114606 commentedComment #7
prashant114606 commentedComment #8
ajitsThe patch is no longer applicable. Needs to be rerolled. Instructions : https://www.drupal.org/patch/reroll
Comment #9
prashant114606 commentedComment #10
rahul01 commentedHi Prashant,
The patch does not apply.
Comment #11
rahul01 commentedComment #12
prashant114606 commented