本文整理汇总了PHP中Cart66Common::minifyMarkup方法的典型用法代码示例。如果您正苦于以下问题:PHP Cart66Common::minifyMarkup方法的具体用法?PHP Cart66Common::minifyMarkup怎么用?PHP Cart66Common::minifyMarkup使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cart66Common
的用法示例。
在下文中一共展示了Cart66Common::minifyMarkup方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: elseif
if ($gatewayName == 'Cart66Mijireh') {
$checkoutFormFile = CART66_PATH . '/views/mijireh/shipping_address.php';
} elseif ($gatewayName == 'Cart662Checkout') {
$checkoutFormFile = CART66_PATH . '/views/2checkout.php';
} else {
$userViewFile = get_stylesheet_directory() . '/cart66-templates/views/checkout-form.php';
if (file_exists($userViewFile) && filesize($userViewFile) > 10 && CART66_PRO && Cart66Common::isRegistered()) {
$checkoutFormFile = $userViewFile;
}
}
Cart66Common::log('[' . basename(__FILE__) . ' - line ' . __LINE__ . "] Using Checkout Form File :: {$checkoutFormFile}");
ob_start();
include $checkoutFormFile;
$checkoutFormFileContents = ob_get_contents();
ob_end_clean();
echo Cart66Common::minifyMarkup($checkoutFormFileContents);
// Include the client side javascript validation
$same_as_billing = false;
if ($_SERVER['REQUEST_METHOD'] == 'GET' && Cart66Setting::getValue('sameAsBillingOff') != 1) {
$same_as_billing = true;
} elseif (isset($_POST['sameAsBilling']) && $_POST['sameAsBilling'] == '1') {
$same_as_billing = true;
}
$shipping_address_display = !$same_as_billing || $gatewayName == 'Cart66Mijireh' || $gatewayName == 'Cart662Checkout' ? 'block' : 'none';
$billing_country = '';
if (isset($b['country']) && !empty($b['country'])) {
$billing_country = $b['country'];
$shipping_country = isset($s['country']) ? $s['country'] : $b['country'];
}
if (Cart66Session::get('Cart66ShippingCountryCode')) {
$billing_country = Cart66Session::get('Cart66ShippingCountryCode');
示例2: getView
public static function getView($filename, $data = null, $notices = true, $minify = false)
{
$notice = '';
if (strpos($filename, 'admin') !== false) {
$mijireh_notice = Cart66Setting::getValue('mijireh_notice');
if ($mijireh_notice != 1) {
if ($notices) {
$notice = '<div id="mijireh_notice" class="mijireh-info alert-message info" data-alert="alert">
<a href="#" id="mijireh_dismiss" class="close">×</a>
<div class="mijireh-logo"><img src="' . CART66_URL . '/images/mijireh-checkout-logo.png" alt="Mijireh Checkout Logo"></div>
<div class="mijireh-blurb">
<h2>Cart66 now supports Mijireh Checkout!</h2>
<p>Accept credit cards on a fully PCI compliant ecommerce platform</p>
<ul>
<li>No need for SSL certificates or a dedicated IP addresss</li>
<li>No need to pay for for quarterly security scans</li>
<li>No need to give up control of your design</li>
</ul>
<h1><a href="http://mijireh.com" target="_new">Start now for FREE!</a></h1>
</div>
</div>';
}
}
if (CART66_PRO && !self::isRegistered()) {
$hardCoded = '';
$settingsUrl = get_bloginfo('wpurl') . '/wp-admin/admin.php?page=cart66-settings';
if (CART66_ORDER_NUMBER !== false) {
$hardCoded = "<br/><br/><em>An invalid order number has be hard coded<br/> into the main cart66.php file.</em>";
}
if ($notices) {
$notice .= '
<div class="unregistered alert-message alert-error">
<p>This is not a registered copy of Cart66.<br/>
Please <a href="' . $settingsUrl . '">enter your order number</a> or
<a href="http://www.cart66.com/pricing">buy a license for your site.</a> ' . $hardCoded . '
</p>
</div>
';
}
}
}
$customView = false;
$themeDirectory = get_stylesheet_directory();
$approvedOverrideFiles = array("views/cart.php", "views/cart-button.php", "views/checkout.php", "views/account-login.php", "views/cart-sidebar.php", "views/cart-sidebar-advanced.php", "views/receipt.php", "views/receipt_print_version.php", "views/paypal-express.php", "pro/views/terms.php", "pro/views/emails/default-email-followup.php", "pro/views/emails/default-email-fulfillment.php", "pro/views/emails/default-email-receipt.php", "pro/views/emails/default-email-reminder.php", "pro/views/emails/default-email-status.php", "pro/views/emails/email-products.php", "pro/views/emails/email-receipt.php");
$overrideDirectory = $themeDirectory . "/cart66-templates";
$userViewFile = $overrideDirectory . "/{$filename}";
//Cart66Common::log('[' . basename(__FILE__) . ' - line ' . __LINE__ . "] Override: $overrideDirectory\nUser view file: $userViewFile");
if (file_exists($userViewFile) && in_array($filename, $approvedOverrideFiles)) {
// File exists, make sure it's not empty
if (filesize($userViewFile) > 10) {
// It's not empty
$customView = true;
$customViewPath = $userViewFile;
} else {
Cart66Common::log('[' . basename(__FILE__) . ' - line ' . __LINE__ . "] User file was empty: {$userViewFile}");
}
} else {
// Cart66Common::log('[' . basename(__FILE__) . ' - line ' . __LINE__ . "] File exists: ".var_export(file_exists($userViewFile),true)."\n");
// Cart66Common::log('[' . basename(__FILE__) . ' - line ' . __LINE__ . "] Approved Override: ".var_export(in_array($filename,$approvedOverrideFiles),true));
}
// Check for override and confirm we have a registered plugin
if ($customView && CART66_PRO && self::isRegistered()) {
// override is present
$filename = $customViewPath;
} else {
// no override, render standard view
$filename = CART66_PATH . "/{$filename}";
}
ob_start();
include $filename;
$contents = ob_get_contents();
ob_end_clean();
return $minify ? Cart66Common::minifyMarkup($notice . $contents) : $notice . $contents;
}