Ejemplo n.º 1
0
	function noShippingMethodNecessary() {
		global $cart, $only_downloadable_products;
		if( NO_SHIPPING == '1') {
			return true;
		}

		if( !isset( $cart)) $cart = ps_cart::initCart();

		//////////////////////////////////////////////////////////////////////////
		// OSE  added
		//////////////////////////////////////////////////////////////////////////
		//////////////Joomla Database Class//////////////
		$jdb = &JFactory::getDBO();
		require_once( CLASSPATH .'ps_product.php');
		for($i = 0; $i < $cart["idx"]; $i++) {
			$jquery = "SELECT * FROM `#__osemsc_ext` WHERE `type` = 'vm'";
			$jdb->setQuery($jquery);
			$jdb->query();
			$rows = $jdb->loadObjectList();
			foreach ($rows as $row)
			{
				$msc_data = oseJson::decode($row->params);
				if ($cart[$i]['product_id']  == $msc_data->product_id)
				{
					return true;
					break 2;
				}
			}
		}
		// OSE Ends;

		if( ENABLE_DOWNLOADS == '1') {
			$not_downloadable = false;
			require_once( CLASSPATH .'ps_product.php');
			for($i = 0; $i < $cart["idx"]; $i++) {
				if( !ps_product::is_downloadable($cart[$i]['product_id']) ) {
					$not_downloadable = true;
					break;
				}
			}
			return !$not_downloadable;
		}
		return false;
	}
Ejemplo n.º 2
0
 function noShippingMethodNecessary()
 {
     global $cart, $only_downloadable_products;
     if (NO_SHIPPING == '1') {
         return true;
     }
     if (!isset($cart)) {
         $cart = ps_cart::initCart();
     }
     if (ENABLE_DOWNLOADS == '1') {
         $not_downloadable = false;
         require_once CLASSPATH . 'ps_product.php';
         for ($i = 0; $i < $cart["idx"]; $i++) {
             if (!ps_product::is_downloadable($cart[$i]['product_id'])) {
                 $not_downloadable = true;
                 break;
             }
         }
         return !$not_downloadable;
     }
     return false;
 }
Ejemplo n.º 3
0
// Instantiate the DB class
$db = new ps_DB();
// Instantiate the permission class
$perm = new ps_perm();
// Instantiate the HTML helper class
$ps_html = new ps_html();
// Constructor initializes the session!
$sess = new ps_session();
// Instantiate the ps_shopper_group class
$ps_shopper_group = new ps_shopper_group();
// Get default and this users's Shopper Group
$shopper_group = $ps_shopper_group->get_shoppergroup_by_id($my->id);
// User authentication
$auth = $perm->doAuthentication($shopper_group);
// Initialize the cart
$cart = ps_cart::initCart();
// Initialise Recent Products
$recentproducts = ps_session::initRecentProducts();
// Instantiate the module class
$ps_module = new ps_module();
// Instantiate the function class
$ps_function = new ps_function();
// Set the mosConfig_live_site to its' SSL equivalent
$GLOBALS['real_mosConfig_live_site'] = $GLOBALS['mosConfig_live_site'];
if ($_SERVER['SERVER_PORT'] == 443 || @$_SERVER['HTTPS'] == 'on' || @strstr($page, "checkout.")) {
    // Change the global Live Site Value to HTTPS
    $GLOBALS['mosConfig_live_site'] = ereg_replace('/$', '', SECUREURL);
    $mm_action_url = SECUREURL;
} else {
    $mm_action_url = URL;
}