Current File : /home/pacjaorg/public_html/km/components/com_djclassifieds/views/checkout/view.html.php
<?php
/**
 * @package DJ-Classifieds
 * @copyright Copyright (C) DJ-Extensions.com, All rights reserved.
 * @license http://www.gnu.org/licenses GNU/GPL
 * @author url: http://dj-extensions.com
 * @author email contact@dj-extensions.com
 */

defined ('_JEXEC') or die('Restricted access');

class DJClassifiedsViewCheckout extends JViewLegacy
{
	private static $_viewname = 'checkout';

	public function __construct($config = array())
	{
		parent::__construct($config);
		$par = JFactory::getApplication()->getParams('com_djclassifieds');
		
		$this->_addPath('template', JPATH_ROOT.'/components/com_djclassifieds/themes/'.$par->get('theme','default').'/views/'.self::$_viewname);
	}

	function display($tpl = null)
	{
		$app = JFactory::getApplication();			
		$par = $app->getParams('com_djclassifieds');
		$model = $this->getModel();		 	

		$id = $app->input->getInt('item_id', 0);
		$quantity = $app->input->getInt('quantity', 1);

		$item = $model->getItemById($id);
		if(!$item){
			DJClassifiedsSEO::redirectWrongItem();
		}else if($quantity > $item->quantity){
			DJClassifiedsSEO::redirectWrongItem($item->item_uri, 'COM_DJCLASSIFIEDS_NUMBER_OF_PRODUCTS_IS_LESS_THEN_SELECTED', 'warning');
		}

		$extra_payments = $app->triggerEvent('onPrepareCheckouPaymentList', array(&$item, &$par, $quantity));
		$extra_form = $app->triggerEvent('onPrepareCheckouPaymentForm', array(&$item, &$par, $quantity));

		DJClassifiedsSEO::setSiteNameInPageTitle();
		
		$this->item = $item;
		$this->item_options = null; // view backward compatibility
		$this->extra_payments = $extra_payments;
		$this->extra_form = $extra_form;
		$this->quantity = $quantity;
		$this->par = $par;

		parent::display();
	}
}
Site is undergoing maintenance

PACJA Events

Maintenance mode is on

Site will be available soon. Thank you for your patience!