title: Get the Site Path of a Component by Name - Joomla 2.5
body: <p>I have a Joomla 2.5 site. I have <code>JShopping</code> installed in that site. What I am doing that I have to create a CronJob for that site which is placed like <code>www.site.com/cron.php</code></p>
  
  <pre><code>define('JPATH_BASE', '../');
  define('DS', DIRECTORY_SEPARATOR);
  // Path of Joomshopping site folder
  define('JPATH_SITE_JOOMSHOPPING', __DIR__."TODO");
  // Date Varibale
  /* Required Files */
  require_once ( JPATH_BASE . DS . 'includes' . DS . 'defines.php' );
  require_once ( JPATH_BASE . DS . 'includes' . DS . 'framework.php' );
  /* To use Joomla's Database Class */
  require_once ( JPATH_BASE . DS . 'libraries' . DS . 'joomla' . DS . 'factory.php' );
  require_once ( JPATH_BASE . DS . 'libraries' . DS . 'joomla' . DS . 'database' . DS . 'table.php' );
  </code></pre>
  
  <p>How to get the Site Path of that JoomShopping Component.(As I said its a CronJob, so in this file I am not executing any component though so <code>JPATH_COMPONENT_SITE</code> wont work for me).</p>
  
  <p><strong>So how can I get path of a component by specifying its name only?</strong></p>