Пример #1
0
 function cart_content($content)
 {
     $cart_preview = new CartPreview();
     if (get_the_ID() == get_option('cart_page_id') and is_singular() and in_the_loop()) {
         $content = $cart_preview->get_cart();
     }
     return $content;
 }
Пример #2
0
<?php

/**Shopping Cart System Olive-Cart.
 * @link http://www.wp-olivecart.com/
 * @copyright 2008-2012 Olive-Design, Corp.
 * @package Olive-Cart
 */
/* $Id: cart.php  2009-02-12 15:10:03 $ */
require_once dirname(__FILE__) . '/../../../wp-config.php';
require_once dirname(__FILE__) . '/cart/cart.php';
if ($_POST['step'] != 1) {
    $page_id = get_option('cart_page_id');
    $url = get_option('siteurl') . "?page_id={$page_id}";
    header("Location: " . $url . "");
    exit;
} else {
    $cart_preview = new CartPreview();
    $cart_preview->get_cart();
}