Пример #1
0
        $msg = $LANG_PAYPAL_1['thanks_details'];
        $msg .= '<p>' . $LANG_PAYPAL_1['transaction'] . ' ' . $_POST['txn_id'] . '</p>';
        $msg .= '<p>' . $LANG_PAYPAL_1['name_label'] . ' ' . $_POST['first_name'] . ' ' . $_POST['last_name'] . ' | ' . $LANG_PAYPAL_1['email'] . ' ' . $_POST['payer_email'] . '</p><ul>';
        for ($i = 1; $i <= $_POST['num_cart_items']; $i++) {
            $msg .= '<li>' . $_POST["quantity{$i}"] . 'x ' . $_POST["item_name{$i}"] . '... ' . $_POST["mc_gross_{$i}"] . ' ' . $_POST['mc_currency'];
        }
        $msg .= '</ul><p>' . $LANG_PAYPAL_1['total'] . ' ' . $_POST['mc_gross'] . ' ' . $_POST['mc_currency'] . '</p>';
        $display .= COM_showMessageText($msg, $LANG_PAYPAL_1['thanks']);
        $display .= '<div id="cart">' . PAYPAL_displayCart() . '</div>';
        $display .= PAYPAL_siteFooter();
        break;
    case 'cancel':
        $msg = $LANG_PAYPAL_1['cancel_details'];
        $display .= COM_showMessageText($msg, $LANG_PAYPAL_1['cancel']);
        $display .= PAYPAL_displayProducts('', 0, $_REQUEST['category']);
        $display .= '<div id="cart">' . PAYPAL_displayCart() . '</div>';
        $display .= PAYPAL_siteFooter();
        break;
    default:
        if ($_PAY_CONF['paypal_main_header'] != '' && $_REQUEST['category'] == '') {
            $display .= '<div>' . PLG_replaceTags($_PAY_CONF['paypal_main_header']) . '</div>';
        }
        $display .= PAYPAL_displayProducts('', 0, $_REQUEST['category']);
        if ($_PAY_CONF['paypal_main_footer'] != '') {
            $display .= '<div>' . PLG_replaceTags($_PAY_CONF['paypal_main_footer']) . '</div>';
        }
        //Display cart
        $display .= '<div id="cart">' . PAYPAL_displayCart() . '</div>';
        $display .= PAYPAL_siteFooter();
}
COM_output($display);
Пример #2
0
// +---------------------------------------------------------------------------+
// | Based on JCART v1.1                                                       |
// |                                                                           |
// | Copyright (C) 2010 by the following authors:                              |
// | JCART v1.1  http://conceptlogic.com/jcart/                                |
// |                                                                           |
// +---------------------------------------------------------------------------+
// |                                                                           |
// | This program is free software; you can redistribute it and/or             |
// | modify it under the terms of the GNU General Public License               |
// | as published by the Free Software Foundation; either version 2            |
// | of the License, or (at your option) any later version.                    |
// |                                                                           |
// | This program is distributed in the hope that it will be useful,           |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of            |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             |
// | GNU General Public License for more details.                              |
// |                                                                           |
// | You should have received a copy of the GNU General Public License         |
// | along with this program; if not, write to the Free Software Foundation,   |
// | Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.           |
// |                                                                           |
// +---------------------------------------------------------------------------+
// THIS FILE TAKES INPUT FROM AJAX REQUESTS VIA JQUERY post AND get METHODS, THEN PASSES DATA TO JCART
// RETURNS UPDATED CART HTML BACK TO SUBMITTING PAGE
/**
 * require core geeklog code
 */
require_once '../../lib-common.php';
COM_output(PAYPAL_displayCart(0));