Пример #1
0
$ps_product_category = new ps_product_category();
$ps_product = new ps_product();
// Show only top level categories and categories that are
// being published
$tpl = new $GLOBALS['VM_THEMECLASS']();
$category_childs = $ps_product_category->get_child_list(0);
$tpl->set('categories', $category_childs);
//echo $vendor_store_desc;
$categories = $tpl->fetch('common/categoryChildlist.tpl.php');
$tpl->set('vendor_store_desc', $vendor_store_desc);
$tpl->set('categories', $categories);
$tpl->set('ps_product', $ps_product);
$tpl->set('recent_products', $ps_product->recentProducts(null, $tpl->get_cfg('showRecent', 5)));
if (file_exists(CLASSPATH . 'payment/ps_paypal_api.php')) {
    require_once CLASSPATH . 'payment/ps_paypal_api.php';
    if (ps_paypal_api::getPaymentMethodId() && ps_paypal_api::isActive()) {
        // Paypal API / Express
        $lang = jfactory::getLanguage();
        $lang_iso = str_replace('-', '_', $lang->gettag());
        $paypal_buttonurls = array('en_US' => 'https://www.paypal.com/en_US/i/logo/PayPal_mark_60x38.gif', 'en_GB' => 'https://www.paypal.com/en_GB/i/bnr/horizontal_solution_PP.gif', 'de_DE' => 'https://www.paypal.com/de_DE/DE/i/logo/lockbox_150x47.gif', 'es_ES' => 'https://www.paypalobjects.com/WEBSCR-600-20100105-1/en_US/FR/i/bnr/bnr_horizontal_solution_PP_327wx80h.gif', 'pl_PL' => 'https://www.paypalobjects.com/WEBSCR-600-20100105-1/en_US/FR/i/bnr/bnr_horizontal_solution_PP_327wx80h.gif', 'nl_NL' => 'https://www.paypalobjects.com/WEBSCR-600-20100105-1/en_US/FR/i/bnr/bnr_horizontal_solution_PP_327wx80h.gif', 'fr_FR' => 'https://www.paypalobjects.com/WEBSCR-600-20100105-1/en_US/FR/i/bnr/bnr_horizontal_solution_PP_327wx80h.gif', 'it_IT' => 'https://www.paypalobjects.com/WEBSCR-600-20100105-1/it_IT/IT/i/bnr/bnr_horizontal_solution_PP_178wx80h.gif', 'zn_CN' => 'https://www.paypalobjects.com/WEBSCR-600-20100105-1/en_US/FR/i/bnr/bnr_horizontal_solution_PP_327wx80h.gif');
        $paypal_infolink = array('en_US' => 'https://www.paypal.com/us/cgi-bin/webscr?cmd=xpt/Marketing/popup/OLCWhatIsPayPal-outside', 'en_GB' => 'https://www.paypal.com/uk/cgi-bin/webscr?cmd=xpt/Marketing/popup/OLCWhatIsPayPal-outside', 'de_DE' => 'https://www.paypal.com/de/cgi-bin/webscr?cmd=xpt/Marketing/popup/OLCWhatIsPayPal-outside', 'es_ES' => 'https://www.paypal.com/es/cgi-bin/webscr?cmd=xpt/Marketing/popup/OLCWhatIsPayPal-outside', 'pl_PL' => 'https://www.paypal.com/pl/cgi-bin/webscr?cmd=xpt/Marketing/popup/OLCWhatIsPayPal-outside', 'nl_NL' => 'https://www.paypal.com/nl/cgi-bin/webscr?cmd=xpt/Marketing/popup/OLCWhatIsPayPal-outside', 'fr_FR' => 'https://www.paypal.com/fr/cgi-bin/webscr?cmd=xpt/Marketing/popup/OLCWhatIsPayPal-outside', 'it_IT' => 'https://www.paypal.com/it/cgi-bin/webscr?cmd=xpt/Marketing/popup/OLCWhatIsPayPal-outside', 'zn_CN' => 'https://www.paypal.com/cn/cgi-bin/webscr?cmd=xpt/Marketing/popup/OLCWhatIsPayPal-outside');
        if (!isset($paypal_buttonurls[$lang_iso])) {
            $lang_iso = 'en_US';
        }
        $html = '<img id="paypalLogo" src="' . $paypal_buttonurls[$lang_iso] . '" alt="PayPal Checkout Available" border="0" style="cursor:pointer;" /></a>';
        $html .= '<script type="text/javascript">window.addEvent("domready", function() {
			$("paypalLogo").addEvent("click", function() {
				window.open(\'' . $paypal_infolink[$lang_iso] . '\',\'olcwhatispaypal\',\'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=400, height=500\');
				});
			});
			</script>';
Пример #2
0
require_once CLASSPATH . "ps_checkout.php";
global $mainframe, $vmLogger, $vars;
// PayPal API / Express
if (file_exists(CLASSPATH . 'payment/ps_paypal_api.php')) {
    $lang = jfactory::getLanguage();
    $name = $lang->getBackwardLang();
    if (file_exists(CLASSPATH . "payment/paypal_api/languages/lang." . $name . ".php")) {
        include CLASSPATH . "payment/paypal_api/languages/lang." . $name . ".php";
    } else {
        include CLASSPATH . "payment/paypal_api/languages/lang.english.php";
    }
    if (file_exists(CLASSPATH . "payment/ps_paypal_api.cfg.php")) {
        include_once CLASSPATH . "payment/ps_paypal_api.cfg.php";
    }
    require_once CLASSPATH . 'payment/ps_paypal_api.php';
    $paypalActive = ps_paypal_api::isActive();
    $ppex_checkout_details = ps_paypal_api::ppex_getCheckoutDetails();
} else {
    $paypalActive = false;
}
$paypal_express_checkout = vmGet($_REQUEST, 'ppex', null);
$paypal_express_checkout_payment = vmGet($_REQUEST, 'payment_method_ppex', null);
$paypal_express_checkout_cancel = vmGet($_REQUEST, 'ppex_cancel', null);
if ($paypal_express_checkout_cancel) {
    //$GLOBALS['vmLogger']->warning( 'PayPal Zahlung abgebrochen!' );
    require_once CLASSPATH . 'payment/ps_paypal_api.php';
    ps_paypal_api::destroyPaypalSession();
    $payment_method_id = $_GET['payment_method_id'] = $_REQUEST['payment_method_id'] = 0;
    if (!empty($_GET['ship_to_info_id']) && !empty($_GET['shipping_rate_id'])) {
        $_POST['checkout_this_step'][] = 'CHECK_OUT_GET_SHIPPING_ADDR';
        $_REQUEST['checkout_last_step'] = 2;