This is the API docs for LemonStand V1, which has been discontinued. LemonStand is now a cloud based platform, available at lemonstand.com.

LemonStand API

root_url function

Defined in /init/custom_helpers.php, lines 219-222
Author LemonStand eCommerce Inc.
string function root_url(string $value='/', string $add_host_name_and_protocol=false, string $protocol=NULL)
$value string specifies the URL to process.
$add_host_name_and_protocol string indicates whether the URL should contain the host name and protocol.
$protocol string optional HTTP protocol name to override the actual protocol name.
{return} string returns an URL of a specified resource relative to the LemonStand domain root.
Returns file URL relative to the LemonStand root. The function makes links independent of the actual LemonStand installation directory name, whenever it is installed into a subdirectory or to a domain root directory. It is highly recommended to use this function for creating links, because it can save you lots of time if you decide to move your LemonStand installation from a subdirectory to the domain root directory. Using this function is required in LemonStand Marketplace themes. For example, if you installed LemonStand into the shop subdirectory of http://my_host.com domain, the following call will return /shop/cart URL:
root_url('/cart')
If you move LemonStand installation to the domain root directory the same function call will return /cart URL, so that you do not need to update your links manually.

See Also