---- dataentry ---- type : integration # do not change this line system : MODx name : PHx raw url encode description : Clean up your "add to cart" links with a custom PHx modifier tags_tags : validation date_dt : version : developer_url : ---- ====== PHx Raw URL Encode ====== This is a very simple PHx snippet to allow you to [[http://www.php.net/rawurlencode|raw URL encode]] values that might be in your "add to cart links" ===== Why you'd want this ===== This is really handy in making sure your links are valid HTML/XHTML, and in making sure that undesirable characters (like ? or &) that your clients might enter into TVs or Document Objects aren't sent to FoxyCart (which could break things). ===== The Code ===== Create a new snippet called ''phx:rawurlencode'' and paste the following into it. ===== Usage ===== Pretty simple. First, make sure you have [[http://wiki.modxcms.com/index.php/PHx|PHx]] installed and set up correctly. Then create the snippet as noted above. Then, you simply call the customer PHx modifier where necessary. If you were planning on making a link (in a chunk or template or whatever) like this: Add to Cart You'd do this instead: Add to Cart