Jump to content

Give products names instead of numbers in direct order link.


DerekFL

Recommended Posts

I don't like the idea of having product numbers in my direct order links, so I changed it to reflect the product name. For example instead of my product link being order.php?step=2&pid=4, I have it set to be order.php?plan=product_name. This is actually easy to accomplish by using the following in a .htaccess file under your main WHMCS folder:

 

RewriteEngine on
Options +FollowSymlinks
RewriteBase /

 

RewriteCond %{QUERY_STRING} ^plan=product_name$
RewriteRule ^order.php order.php?step=2&pid=1 [L]

 

In the above example you'd obviously have to replace pid=1 with the id of your product. To create more than one product, simply add the RewriteCond and RewriteRule for each product.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated