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_hash storing a user_id and its hash. Populate the data on hook_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.

Comments

AjitS created an issue. See original summary.

ajits’s picture

Issue summary: View changes
ajits’s picture

Issue summary: View changes
prashant114606’s picture

Assigned: Unassigned » prashant114606
prashant114606’s picture

Assigned: prashant114606 » Unassigned
Status: Active » Needs review
StatusFileSize
new3.22 KB
prashant114606’s picture

StatusFileSize
new3.26 KB
prashant114606’s picture

StatusFileSize
new3.45 KB
ajits’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll, +Novice

The patch is no longer applicable. Needs to be rerolled. Instructions : https://www.drupal.org/patch/reroll

prashant114606’s picture

Status: Needs work » Needs review
StatusFileSize
new3.45 KB
rahul01’s picture

Hi Prashant,

The patch does not apply.

rahul01’s picture

Status: Needs review » Needs work
prashant114606’s picture

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