public function __construct() { parent::__construct(); $this->id = 'skrill'; $this->title = 'Skrill'; $this->has_fields = false; $this->enabled = Jigoshop_Base::get_options()->get_option('jigoshop_skrill_enabled'); $this->title = Jigoshop_Base::get_options()->get_option('jigoshop_skrill_title'); $this->email = Jigoshop_Base::get_options()->get_option('jigoshop_skrill_email'); $this->locale = $this->getLocale(); $skrillIcon = Jigoshop_Base::get_options()->get_option('jigoshop_skrill_icon'); if (!filter_var($skrillIcon, FILTER_VALIDATE_URL)) { $this->icon = jigoshop::assets_url() . '/assets/images/icons/skrill.png'; } else { $this->icon = $skrillIcon; } $pMeth = (array) Jigoshop_Base::get_options()->get_option('jigoshop_skrill_payment_methods_multicheck'); $cList = ''; foreach ($pMeth as $key => $value) { if ($value) { $cList = $cList . $key . ','; } } $cList = rtrim($cList, ","); $this->payment_methods = $cList; add_action('init', array($this, 'check_status_response')); if (isset($_GET['skrillPayment']) && $_GET['skrillPayment'] == true) { add_action('init', array($this, 'generate_skrill_form')); } add_action('valid-skrill-status-report', array($this, 'successful_request')); add_action('receipt_skrill', array($this, 'receipt_skrill')); }
function jigoshop_enqueue_product_quick_scripts() { global $pagenow, $typenow; if (empty($typenow) && !empty($_GET['post'])) { $post = get_post($_GET['post']); $typenow = $post->post_type; } if ($typenow == 'product') { wp_enqueue_script('jigoshop-admin-quickedit', jigoshop::assets_url() . '/assets/js/product_quick_edit.js', array('jquery', 'inline-edit-post'), '', true); $jigoshop_quick_edit_params = array('assets_url' => jigoshop::assets_url(), 'ajax_url' => !is_ssl() ? str_replace('https', 'http', admin_url('admin-ajax.php')) : admin_url('admin-ajax.php'), 'get_stock_price_nonce' => wp_create_nonce("get-product-stock-price"), 'update_stock_price_nonce' => wp_create_nonce("update-product-stock-price")); wp_localize_script('jigoshop-admin-quickedit', 'jigoshop_quick_edit_params', $jigoshop_quick_edit_params); } }
/** * Default Option settings for WordPress Settings API using the Jigoshop_Options class * * These will be installed on the Jigoshop_Options 'Payment Gateways' tab by the parent class 'jigoshop_payment_gateway' */ protected function get_default_options() { $defaults = array(); // Define the Section name for the Jigoshop_Options $defaults[] = array('name' => sprintf(__('FuturePay %s', 'jigoshop'), '<img style="vertical-align:middle;margin-top:-4px;margin-left:10px;" src="' . jigoshop::assets_url() . '/assets/images/icons/futurepay.png" alt="FuturePay">'), 'type' => 'title', 'desc' => sprintf(__('This module allows you to accept online payments via %s allowing customers to buy now and pay later without a credit card. FuturePay is a safe, convenient and secure way for US customers to buy online in one-step. %s', 'jigoshop'), '<a href="http://www.futurepay.com/" target="_blank">' . __('FuturePay', 'jigoshop') . '</a>', '<a href="https://www.futurepay.com/main/merchant-signup?platform=77_FPM495845-1" target="_blank">' . __('Signup for a Merchant Account', 'jigoshop') . '</a>')); // List each option in order of appearance with details $defaults[] = array('name' => __('Enable FuturePay', 'jigoshop'), 'desc' => '', 'tip' => '', 'id' => 'jigoshop_futurepay_enabled', 'std' => 'no', 'type' => 'checkbox', 'choices' => array('no' => __('No', 'jigoshop'), 'yes' => __('Yes', 'jigoshop'))); $defaults[] = array('name' => __('Method Title', 'jigoshop'), 'desc' => '', 'tip' => __('This controls the title which the user sees during checkout.', 'jigoshop'), 'id' => 'jigoshop_futurepay_title', 'std' => __('FuturePay', 'jigoshop'), 'type' => 'text'); $defaults[] = array('name' => __('Customer Message', 'jigoshop'), 'desc' => '', 'tip' => __('This controls the description which the user sees during checkout.', 'jigoshop'), 'id' => 'jigoshop_futurepay_description', 'std' => __('Pay with FuturePay. Buy now and pay later. No credit card needed. You will be asked to enter your FuturePay username and password, or create an account when you Place your Order.', 'jigoshop'), 'type' => 'longtext'); $defaults[] = array('name' => __('Merchant API Key', 'jigoshop'), 'desc' => '', 'tip' => __('Your unique FuturePay Merchant Identifier is provided to you when you create a Merchant Account with FuturePay.', 'jigoshop'), 'id' => 'jigoshop_futurepay_gmid', 'std' => '', 'type' => 'longtext'); $defaults[] = array('name' => __('Enable Sandbox', 'jigoshop'), 'desc' => __('Turn on to enable the FuturePay sandbox for testing.', 'jigoshop'), 'tip' => '', 'id' => 'jigoshop_futurepay_mode', 'std' => 'no', 'type' => 'checkbox', 'choices' => array('no' => __('No', 'jigoshop'), 'yes' => __('Yes', 'jigoshop'))); return $defaults; }
function jigoshop_custom_product_columns($column) { global $post; $jigoshop_options = Jigoshop_Base::get_options(); $product = new jigoshop_product($post->ID); switch ($column) { case "thumb": if ('trash' != $post->post_status) { echo '<a class="row-title" href="' . get_edit_post_link($post->ID) . '">'; echo jigoshop_get_product_thumbnail('admin_product_list'); echo '</a>'; } else { echo jigoshop_get_product_thumbnail('admin_product_list'); } break; case "price": echo $product->get_price_html(); break; case "featured": $url = wp_nonce_url(admin_url('admin-ajax.php?action=jigoshop-feature-product&product_id=' . $post->ID)); echo '<a href="' . esc_url($url) . '" title="' . __('Change', 'jigoshop') . '">'; if ($product->is_featured()) { echo '<a href="' . esc_url($url) . '"><img src="' . jigoshop::assets_url() . '/assets/images/head_featured_desc.png" alt="yes" />'; } else { echo '<img src="' . jigoshop::assets_url() . '/assets/images/head_featured.png" alt="no" />'; } echo '</a>'; break; case "stock": if (!$product->is_type('grouped') && $product->is_in_stock()) { if ($product->managing_stock()) { if ($product->is_type('variable') && $product->stock > 0) { echo $product->stock . ' ' . __('In Stock', 'jigoshop'); } else { if ($product->is_type('variable')) { $stock_total = 0; foreach ($product->get_children() as $child_ID) { $child = $product->get_child($child_ID); $stock_total += (int) $child->stock; } echo $stock_total . ' ' . __('In Stock', 'jigoshop'); } else { echo $product->stock . ' ' . __('In Stock', 'jigoshop'); } } } else { echo __('In Stock', 'jigoshop'); } } elseif ($product->is_type('grouped')) { echo __('Parent (no stock)', 'jigoshop'); } else { echo '<strong class="attention">' . __('Out of Stock', 'jigoshop') . '</strong>'; } break; case "product-type": echo __(ucwords($product->product_type), 'jigoshop'); echo '<br/>'; if ($jigoshop_options->get('jigoshop_enable_sku', true) == 'yes' && ($sku = get_post_meta($post->ID, 'sku', true))) { echo $sku; } else { echo $post->ID; } break; case "product-date": if ('0000-00-00 00:00:00' == $post->post_date) { $t_time = $h_time = __('Unpublished', 'jigoshop'); $time_diff = 0; } else { $t_time = get_the_time(__('Y/m/d g:i:s A', 'jigoshop')); $m_time = $post->post_date; $time = get_post_time('G', true, $post); $time_diff = time() - $time; if ($time_diff > 0 && $time_diff < 24 * 60 * 60) { $h_time = sprintf(__('%s ago', 'jigoshop'), human_time_diff($time)); } else { $h_time = mysql2date(__('Y/m/d', 'jigoshop'), $m_time); } } echo '<abbr title="' . esc_attr($t_time) . '">' . apply_filters('post_date_column_time', $h_time, $post) . '</abbr><br />'; if ('publish' == $post->post_status) { _e('Published', 'jigoshop'); } elseif ('future' == $post->post_status) { if ($time_diff > 0) { echo '<strong class="attention">' . __('Missed schedule', 'jigoshop') . '</strong>'; } else { _e('Scheduled', 'jigoshop'); } } else { _e('Draft', 'jigoshop'); } if ($product->visibility) { echo $product->visibility != 'visible' ? '<br /><strong class="attention">' . ucfirst($product->visibility) . '</strong>' : ''; } break; case "product-visibility": if ($product->visibility) { echo $product->visibility == 'Hidden' ? '<strong class="attention">' . ucfirst($product->visibility) . '</strong>' : ucfirst($product->visibility); } break; } }
/** * Default Option settings for WordPress Settings API using the Jigoshop_Options class * These will be installed on the Jigoshop_Options 'Payment Gateways' tab by the parent class 'jigoshop_payment_gateway' */ protected function get_default_options() { return array(array('name' => sprintf(__('WorldPay %s', 'jigoshop'), '<img style="vertical-align:middle;margin-top:-4px;margin-left:10px;" src="' . jigoshop::assets_url() . '/assets/images/icons/worldpay.png" alt="WorldPay">'), 'type' => 'title', 'desc' => sprintf(__("To ensure your <strong>Preferential Jigoshop Partner Rates</strong>, please complete your %s. Merchants who fail to register here will be put on WorldPay standard new business accounts which carry higher rates.<br/><br/>The WorldPay gateway uses a Dynamic Response URL. You <strong>must activate</strong> this in your %s with the following:<br/>1) Go to <strong>WorldPay Merchant Interface -> Installations -> Integration Setup (TEST / PRODUCTION)</strong><br/>2) Check the <strong>Payment Response enabled?</strong> checkbox. <br/>3) Copy and Paste the full tag in bold <strong><wpdisplay item=MC_callback></strong> to the <strong>Payment Response URL</strong> input field.<br/>4) Check the <strong>Enable the Shopper Response</strong> checkbox. <br/>5) Save Changes.", 'jigoshop'), '<a href="https://business.worldpay.com/partner/jigoshop" target="_blank">WorldPay Merchant registration here</a>', '<a href="https://secure.worldpay.com/sso/public/auth/login.html?serviceIdentifier=merchantadmin" target="_blank">WorldPay Merchant Account</a>')), array('name' => __('Enable WorldPay', 'jigoshop'), 'desc' => '', 'tip' => '', 'id' => 'jigoshop_worldpay_is_enabled', 'std' => 'no', 'type' => 'checkbox', 'choices' => array('no' => __('No', 'jigoshop'), 'yes' => __('Yes', 'jigoshop'))), array('name' => __('Method Title', 'jigoshop'), 'desc' => '', 'tip' => __('This controls the title which the user sees during checkout and also appears as the Payment Method on final Orders.', 'jigoshop'), 'id' => 'jigoshop_worldpay_method_title', 'std' => __('Credit Card via WorldPay', 'jigoshop'), 'type' => 'text'), array('name' => __('Description', 'jigoshop'), 'desc' => '', 'tip' => __('This controls the description which the user sees during checkout.', 'jigoshop'), 'id' => 'jigoshop_worldpay_checkout_description', 'std' => __("When you Place your Order, you will be directed to the secured WorldPay servers to enter your credit card information. (Your Billing Address above must match that used on your Credit Card)", 'jigoshop'), 'type' => 'textarea'), array('name' => __('Enable WorldPay Test Mode', 'jigoshop'), 'desc' => 'Enable to make test transactions.', 'tip' => '', 'id' => 'jigoshop_worldpay_test_mode', 'std' => 'no', 'type' => 'checkbox', 'choices' => array('no' => __('No', 'jigoshop'), 'yes' => __('Yes', 'jigoshop'))), array('name' => __('Installation ID', 'jigoshop'), 'desc' => '', 'tip' => __('Please enter your WorldPay Installation ID.', 'jigoshop'), 'id' => 'jigoshop_worldpay_install_id', 'std' => '', 'type' => 'text'), array('name' => __('Payment Response Password', 'jigoshop'), 'desc' => '', 'tip' => __("This option adds an additional security check to the Payment Response sent from WorldPay to Jigoshop, to help validate that the Payment has been sent from WorldPay<br/>1. Add a <strong>'Payment Response Password'</strong> here <br/>2. Add the password in <strong>Merchant Interface->Installations->Integration Setup (TEST or PRODUCTION)-><em>Payment Response Password</em></strong> field.<br/>Leave both empty to skip this check.", 'jigoshop'), 'id' => 'jigoshop_worldpay_response_password', 'std' => '', 'type' => 'text'), array('name' => __('Use MD5 SignatureFields', 'jigoshop'), 'desc' => 'The phrase to copy: <strong>instId:cartId:amount:currency</strong>', 'tip' => __("This option enables you to use a 'MD5 + secret word' encrypted signature before sending order details to WorldPay as a measure against unauthorized tampering.<br/>The signature will encrypt the mandatory parameters (Installation Id, Order Id, amount, currency).<br/>To enable:<br/>1) Copy the exact phrase (case sensitive, in bold) shown under the setting checkbox.<br>2) Paste into your <strong>WorldPay Merchant Interface -> Installations -> Integration Setup (TEST or PRODUCTION) -><em>SignatureFields</em></strong> input box and also enable this setting checkbox.<br>2) You must also enter a <strong>Secret Word</strong> in the next setting and save the settings.", 'jigoshop'), 'id' => 'jigoshop_worldpay_md5', 'std' => 'yes', 'type' => 'checkbox', 'choices' => array('no' => __('No', 'jigoshop'), 'yes' => __('Yes', 'jigoshop'))), array('name' => __('Secret Word', 'jigoshop'), 'desc' => '', 'tip' => __("<strong>(REQUIRED IF MD5 SIGNATURE IS ENABLED)</strong> Enter here the Secret Word you will use to hash the MD5 signature. The word needs to be up to 16 characters, known only to yourself and to WorldPay.<br/> This secret must also be entered into the <strong>WorldPay Merchant Interface -> Installations -> Integration Setup (TEST or PRODUCTION) -><em>MD5 secret for transactions</em></strong> field.", 'jigoshop'), 'id' => 'jigoshop_worldpay_md5_secret_word', 'std' => '', 'type' => 'text'), array('name' => __('Fixed Payment Currency', 'jigoshop'), 'desc' => '', 'tip' => __('This option hides the currency menu on the WorldPay page, which will fix the currency that the shopper must purchase in.<br/><b>The currency submitted is the main currency of your Shop.</b> With this option disabled, customers will be able to select their currency and see the corrected price for the Order.', 'jigoshop'), 'id' => 'jigoshop_worldpay_fixed_currency', 'std' => 'no', 'type' => 'checkbox', 'choices' => array('no' => __('No', 'jigoshop'), 'yes' => __('Yes', 'jigoshop'))), array('name' => __('Receive Error Logs', 'jigoshop'), 'desc' => '', 'tip' => __("Do you want to receive emails for the error logs from Jigoshop security/fraud checks.", 'jigoshop'), 'id' => 'jigoshop_worldpay_receive_security_logs', 'std' => 'yes', 'type' => 'checkbox', 'choices' => array('no' => __('No', 'jigoshop'), 'yes' => __('Yes', 'jigoshop'))), array('name' => __('Email error logs to', 'jigoshop'), 'desc' => '', 'tip' => __('Email address you want to receive all error logs to. If email field is empty, the Jigoshop email address will be used.', 'jigoshop'), 'id' => 'jigoshop_worldpay_security_logs_emailto', 'std' => '', 'type' => 'email')); }
function my_cart($atts) { $errors = array(); unset(jigoshop_session::instance()->selected_rate_id); // Process Discount Codes if (isset($_POST['apply_coupon']) && $_POST['apply_coupon'] && jigoshop::verify_nonce('cart')) { $coupon_code = stripslashes(trim($_POST['coupon_code'])); jigoshop_cart::add_discount($coupon_code); // Update Shipping } elseif (isset($_POST['calc_shipping']) && $_POST['calc_shipping'] && jigoshop::verify_nonce('cart')) { unset(jigoshop_session::instance()->chosen_shipping_method_id); $country = $_POST['calc_shipping_country']; $state = $_POST['calc_shipping_state']; $postcode = $_POST['calc_shipping_postcode']; if ($postcode && !jigoshop_validation::is_postcode($postcode, $country)) { jigoshop::add_error(__('Please enter a valid postcode/ZIP.', 'jigoshop')); $postcode = ''; } elseif ($postcode) { $postcode = jigoshop_validation::format_postcode($postcode, $country); } if ($country) { // Update customer location jigoshop_customer::set_location($country, $state, $postcode); jigoshop_customer::set_shipping_location($country, $state, $postcode); jigoshop::add_message(__('Shipping costs updated.', 'jigoshop')); } else { jigoshop_customer::set_shipping_location('', '', ''); jigoshop::add_message(__('Shipping costs updated.', 'jigoshop')); } } elseif (isset($_POST['shipping_rates'])) { $rates_params = explode(":", $_POST['shipping_rates']); $available_methods = jigoshop_shipping::get_available_shipping_methods(); $shipping_method = $available_methods[$rates_params[0]]; if ($rates_params[1] != NULL) { jigoshop_session::instance()->selected_rate_id = $rates_params[1]; } $shipping_method->choose(); // choses the method selected by user. } // Re-Calc prices. This needs to happen every time the cart page is loaded and after checking post results. It will happen twice for coupon. jigoshop_cart::calculate_totals(); $result = jigoshop_cart::check_cart_item_stock(); if (is_wp_error($result)) { jigoshop::add_error($result->get_error_message()); } jigoshop::show_messages(); if (sizeof(jigoshop_cart::$cart_contents) == 0) { echo '<p>' . __('Your cart is empty.', 'jigoshop') . '</p>'; ?> <p><a href="<?php echo esc_url(jigoshop_cart::get_shop_url()); ?> " class="button"><?php _e('← Return to Shop', 'jigoshop'); ?> </a></p><?php return; } ?> <form action="<?php echo esc_url(jigoshop_cart::get_cart_url()); ?> " method="post"> <table class="shop_table cart" cellspacing="0" id="shop-cart"> <thead> <tr> <th class="product-remove">Remove</th> <th class="product-thumbnail"></th> <th class="product-name"><span class="nobr"><?php _e('Product Name', 'jigoshop'); ?> </span></th> <th class="product-price"><span class="nobr"><?php _e('Unit Price', 'jigoshop'); ?> </span></th> <th class="product-quantity"><?php _e('Quantity', 'jigoshop'); ?> </th> <th class="product-subtotal"><?php _e('Price', 'jigoshop'); ?> </th> </tr> <?php do_action('jigoshop_shop_table_cart_head'); ?> </thead> <tbody> <?php if (sizeof(jigoshop_cart::$cart_contents) > 0) { foreach (jigoshop_cart::$cart_contents as $cart_item_key => $values) { $_product = $values['data']; if ($_product->exists() && $values['quantity'] > 0) { $additional_description = jigoshop_cart::get_item_data($values); ?> <tr> <td class="product-remove"><a href="<?php echo esc_url(jigoshop_cart::get_remove_url($cart_item_key)); ?> " class="remove" title="<?php echo esc_attr(__('Remove this item.', 'jigoshop')); ?> ">×</a></td> <td class="product-thumbnail"><a href="<?php echo esc_url(apply_filters('jigoshop_product_url_display_in_cart', get_permalink($values['product_id']), $cart_item_key)); ?> "> <?php if ($values['variation_id'] && has_post_thumbnail($values['variation_id'])) { echo get_the_post_thumbnail($values['variation_id'], 'shop_tiny'); } else { if (has_post_thumbnail($values['product_id'])) { echo get_the_post_thumbnail($values['product_id'], 'shop_tiny'); } else { echo '<img src="' . jigoshop::assets_url() . '/assets/images/placeholder.png" alt="Placeholder" width="' . jigoshop::get_var('shop_tiny_w') . '" height="' . jigoshop::get_var('shop_tiny_h') . '" />'; } } ?> </a> </td> <td class="product-name"> <a href="<?php echo esc_url(apply_filters('jigoshop_product_url_display_in_cart', get_permalink($values['product_id']), $cart_item_key)); ?> "><?php echo apply_filters('jigoshop_cart_product_title', $_product->get_title(), $_product); ?> </a> <?php echo $additional_description; ?> <?php if (!empty($values['variation_id'])) { $product_id = $values['variation_id']; } else { $product_id = $values['product_id']; } $custom_products = (array) jigoshop_session::instance()->customized_products; $custom = isset($custom_products[$product_id]) ? $custom_products[$product_id] : ''; if (!empty($custom_products[$product_id])) { ?> <dl class="customization"> <dt class="customized_product_label"><?php echo apply_filters('jigoshop_customized_product_label', __('Personal: ', 'jigoshop')); ?> </dt> <dd class="customized_product"><?php echo esc_textarea($custom); ?> </dd> </dl> <?php } ?> </td> <td class="product-price"><span class="m-label">Unit price:</span><?php echo jigoshop_price($_product->get_price()); ?> </td> <td class="product-quantity"> <span class="m-label">Quantity:</span> <div class="quantity"><input name="cart[<?php echo $cart_item_key; ?> ][qty]" value="<?php echo esc_attr($values['quantity']); ?> " size="4" title="Qty" class="input-text qty text" maxlength="12" /></div> </td> <td class="product-subtotal"><span class="m-label">Price:</span><?php echo jigoshop_price($_product->get_price() * $values['quantity']); ?> </td> </tr> <?php } } } do_action('jigoshop_shop_table_cart_body'); ?> </tbody> <tfoot> <tr> <td colspan="6" class="actions"> <?php $coupons = JS_Coupons::get_coupons(); if (!empty($coupons)) { ?> <div class="coupon"> <label for="coupon_code"><?php _e('Coupon', 'jigoshop'); ?> :</label> <input type="text" name="coupon_code" class="input-text" id="coupon_code" value="" /> <input type="submit" class="button" name="apply_coupon" value="<?php _e('Apply Coupon', 'jigoshop'); ?> " /> </div> <?php } ?> <?php jigoshop::nonce_field('cart'); ?> <input type="submit" class="button" name="update_cart" value="<?php _e('Update Shopping Cart', 'jigoshop'); ?> " /> <a href="<?php echo esc_url(jigoshop_cart::get_checkout_url()); ?> " class="checkout-button button-alt"><?php _e('Proceed to Checkout →', 'jigoshop'); ?> </a> </td> </tr> <?php if (count(jigoshop_cart::$applied_coupons)) { ?> <tr> <td colspan="6" class="applied-coupons"> <div> <span class="applied-coupons-label"><?php _e('Applied Coupons: ', 'jigoshop'); ?> </span> <?php foreach (jigoshop_cart::$applied_coupons as $code) { ?> <a href="?unset_coupon=<?php echo $code; ?> " id="<?php echo $code; ?> " class="applied-coupons-values"><?php echo $code; ?> <span class="close">×</span> </a> <?php } ?> </div> </td> </tr> <?php } do_action('jigoshop_shop_table_cart_foot'); ?> </tfoot> <?php do_action('jigoshop_shop_table_cart'); ?> </table> </form> <div class="cart-collaterals"> <?php do_action('cart-collaterals'); ?> <div class="cart_totals"> <?php // Hide totals if customer has set location and there are no methods going there $available_methods = jigoshop_shipping::get_available_shipping_methods(); $jigoshop_options = Jigoshop_Base::get_options(); if ($available_methods || !jigoshop_customer::get_shipping_country() || !jigoshop_shipping::is_enabled()) { ?> <h2><?php _e('Cart Totals', 'jigoshop'); ?> </h2> <div class="cart_totals_table"> <table cellspacing="0" cellpadding="0"> <tbody> <tr> <?php $price_label = jigoshop_cart::show_retail_price() ? __('Retail Price', 'jigoshop') : __('Subtotal', 'jigoshop'); ?> <th class="cart-row-subtotal-title"><?php echo $price_label; ?> </th> <td class="cart-row-subtotal"><?php echo jigoshop_cart::get_cart_subtotal(); ?> </td> </tr> <?php if (jigoshop_cart::get_cart_shipping_total()) { ?> <tr> <th class="cart-row-shipping-title"><?php _e('Shipping', 'jigoshop'); ?> <small><?php echo jigoshop_countries::shipping_to_prefix() . ' ' . __(jigoshop_countries::$countries[jigoshop_customer::get_shipping_country()], 'jigoshop'); ?> </small></th> <td class="cart-row-shipping"><?php echo jigoshop_cart::get_cart_shipping_total(); ?> <small><?php echo jigoshop_cart::get_cart_shipping_title(); ?> </small></td> </tr> <?php } ?> <?php if (jigoshop_cart::show_retail_price()) { ?> <tr> <th class="cart-row-subtotal-title"><?php _e('Subtotal', 'jigoshop'); ?> </th> <td class="cart-row-subtotal"><?php echo jigoshop_cart::get_cart_subtotal(true, true); ?> </td> </tr> <?php } ?> <?php if (jigoshop_cart::tax_after_coupon()) { ?> <tr class="discount"> <th class="cart-row-discount-title"><?php _e('Discount', 'jigoshop'); ?> </th> <td class="cart-row-discount">-<?php echo jigoshop_cart::get_total_discount(); ?> </td> </tr> <?php } ?> <?php if (Jigoshop_Base::get_options()->get_option('jigoshop_calc_taxes') == 'yes') { foreach (jigoshop_cart::get_applied_tax_classes() as $tax_class) { if (jigoshop_cart::get_tax_for_display($tax_class)) { ?> <tr> <th class="cart-row-tax-title"><?php echo jigoshop_cart::get_tax_for_display($tax_class); ?> </th> <td class="cart-row-tax"><?php echo jigoshop_cart::get_tax_amount($tax_class); ?> </td> </tr> <?php } } } ?> <?php if (!jigoshop_cart::tax_after_coupon() && jigoshop_cart::get_total_discount()) { ?> <tr class="discount"> <th class="cart-row-discount-title"><?php _e('Discount', 'jigoshop'); ?> </th> <td class="cart-row-discount">-<?php echo jigoshop_cart::get_total_discount(); ?> </td> </tr> <?php } ?> <tr> <th class="cart-row-total-title"><strong><?php _e('Total', 'jigoshop'); ?> </strong></th> <td class="cart-row-total"><strong><?php echo jigoshop_cart::get_total(); ?> </strong></td> </tr> </tbody> </table> </div> <?php } else { echo '<p>' . __(jigoshop_shipping::get_shipping_error_message(), 'jigoshop') . '</p>'; } ?> </div> <?php jigoshop_shipping_calculator(); ?> </div> <?php }
/** * Settings page * * Handles the display of the settings page in admin. * * @since 1.0 * @usedby jigoshop_admin_menu2() */ function jigoshop_settings() { global $jigoshop_options_settings; ?> <script type="text/javascript" src="<?php echo jigoshop::assets_url(); ?> /assets/js/bootstrap-tooltip.min.js"></script> <div class="wrap jigoshop"> <div class="icon32 icon32-jigoshop-settings" id="icon-jigoshop"><br/></div> <?php do_action('jigoshop_admin_settings_notices'); ?> <form method="post" id="mainform" action=""> <?php wp_nonce_field('jigoshop-update-settings', '_jigoshop_csrf'); ?> <?php jigoshop_admin_fields($jigoshop_options_settings); ?> <input name="submitted" type="hidden" value="yes" /> </form> </div> <?php }