Skip to content
Browse files

Various Bugfixes

Added compatibility for latest version of Jigoshop.
  • Loading branch information...
1 parent 74681e4 commit fc99fb558ec7f22f0a27e159ef452e8b1d8dc8db @simplethemes simplethemes committed Mar 8, 2012
View
4 .gitignore
@@ -0,0 +1,4 @@
+
+.DS_Store
+
+skeleton/error_log
View
45 skeleton/checkout/form.php
@@ -1,25 +1,44 @@
-<?php do_action('before_checkout_form'); ?>
+<?php
+/**
+ * Checkout form template
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add directly to this file if you wish to upgrade Jigoshop to newer
+ * versions in the future. If you wish to customise Jigoshop core for your needs,
+ * please use our GitHub repository to publish essential changes for consideration.
+ *
+ * @package Jigoshop
+ * @category Checkout
+ * @author Jigowatt
+ * @copyright Copyright (c) 2011-2012 Jigowatt Ltd.
+ * @license http://jigoshop.com/license/commercial-edition
+ */
+?>
+
+<?php do_action('before_checkout_form');
+// filter hook for include new pages inside the payment method
+$get_checkout_url = apply_filters( 'jigoshop_get_checkout_url', jigoshop_cart::get_checkout_url() ); ?>
+
+<form name="checkout" method="post" class="checkout" action="<?php echo esc_url( $get_checkout_url ); ?>">
-<form name="checkout" method="post" class="checkout" action="<?php echo jigoshop_cart::get_checkout_url(); ?>">
-
<div class="col2-set" id="customer_details">
- <div class="one_half">
+ <div class="col-1">
<?php do_action('jigoshop_checkout_billing'); ?>
-
+
</div>
- <div class="one_half last">
-
+ <div class="col-2">
+
<?php do_action('jigoshop_checkout_shipping'); ?>
-
+
</div>
</div>
-
- <div class="clear"></div>
+
<h3 id="order_review_heading"><?php _e('Your order', 'jigoshop'); ?></h3>
-
- <?php jigoshop_get_template('checkout/review_order.php'); ?>
-
+
+ <?php do_action('jigoshop_checkout_order_review'); ?>
+
</form>
<?php do_action('after_checkout_form'); ?>
View
0 skeleton/checkout/index.php
No changes.
View
234 skeleton/checkout/pay_for_order.php
@@ -1,90 +1,160 @@
+<?php
+/**
+ * Pay for order form template
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add directly to this file if you wish to upgrade Jigoshop to newer
+ * versions in the future. If you wish to customise Jigoshop core for your needs,
+ * please use our GitHub repository to publish essential changes for consideration.
+ *
+ * @package Jigoshop
+ * @category Checkout
+ * @author Jigowatt
+ * @copyright Copyright (c) 2011-2012 Jigowatt Ltd.
+ * @license http://jigoshop.com/license/commercial-edition
+ */
+?>
+
<?php global $order; ?>
<form id="order_review" method="post">
-
- <table class="shop_table">
- <thead>
- <tr>
- <th><?php _e('Product', 'jigoshop'); ?></th>
- <th><?php _e('Qty', 'jigoshop'); ?></th>
- <th><?php _e('Totals', 'jigoshop'); ?></th>
- </tr>
- </thead>
- <tfoot>
- <tr>
- <td colspan="2"><?php _e('Subtotal', 'jigoshop'); ?></td>
- <td><?php echo $order->get_subtotal_to_display(); ?></td>
- </tr>
- <?php if ($order->order_shipping>0) : ?><tr>
- <td colspan="2"><?php _e('Shipping', 'jigoshop'); ?></td>
- <td><?php echo $order->get_shipping_to_display(); ?></small></td>
- </tr><?php endif; ?>
- <?php if ($order->get_total_tax()>0) : ?><tr>
- <td colspan="2"><?php _e('Tax', 'jigoshop'); ?></td>
- <td><?php echo jigoshop_price($order->get_total_tax()); ?></td>
- </tr><?php endif; ?>
- <?php if ($order->order_discount>0) : ?><tr class="discount">
- <td colspan="2"><?php _e('Discount', 'jigoshop'); ?></td>
- <td>-<?php echo jigoshop_price($order->order_discount); ?></td>
- </tr><?php endif; ?>
- <tr>
- <td colspan="2"><strong><?php _e('Grand Total', 'jigoshop'); ?></strong></td>
- <td><strong><?php echo jigoshop_price($order->order_total); ?></strong></td>
- </tr>
- </tfoot>
- <tbody>
- <?php
- if (sizeof($order->items)>0) :
- foreach ($order->items as $item) :
- echo '
+
+ <table class="shop_table">
+ <thead>
+ <tr>
+ <th><?php _e('Product', 'jigoshop'); ?></th>
+ <th><?php _e('Qty', 'jigoshop'); ?></th>
+ <th><?php _e('Totals', 'jigoshop'); ?></th>
+ </tr>
+ </thead>
+ <tfoot>
+ <tr>
+ <?php if (get_option('jigoshop_calc_taxes') == 'yes' && $order->order_subtotal_inc_tax) : ?>
+ <td colspan="2"><?php _e('Retail Price', 'jigoshop'); ?></td>
+ <?php else : ?>
+ <td colspan="2"><?php _e('Subtotal', 'jigoshop'); ?></td>
+ <?php endif; ?>
+ <td><?php echo $order->get_subtotal_to_display(); ?></td>
+ </tr>
+ <?php
+ if (get_option('jigoshop_calc_taxes') == 'yes' && $order->order_subtotal_inc_tax) :
+ if ($order->order_shipping > 0) :
+ ?><tr>
+ <td colspan="2"><?php _e('Shipping', 'jigoshop'); ?></td>
+ <td><?php echo $order->get_shipping_to_display(); ?></small></td>
+ </tr><?php
+ endif;
+ foreach ($order->get_tax_classes() as $tax_class) :
+ if ($order->tax_class_is_not_compound($tax_class)) :
+ ?>
+ <tr>
+ <td colspan="2"><?php echo $order->get_tax_class_for_display($tax_class) . ' (' . (float) $order->get_tax_rate($tax_class) . '%):'; ?></td>
+ <td><?php echo $order->get_tax_amount($tax_class) ?></td>
+ </tr>
+ <?php
+ endif;
+ endforeach;
+ ?><tr>
+ <td colspan="2"><?php _e('Subtotal', 'jigoshop'); ?></td>
+ <td><?php echo jigoshop_price($order->order_subtotal_inc_tax); ?></td>
+ </tr>
+ <?php
+ else :
+ if ($order->order_shipping > 0) :
+ ?><tr>
+ <td colspan="2"><?php _e('Shipping', 'jigoshop'); ?></td>
+ <td><?php echo $order->get_shipping_to_display(); ?></small></td>
+ </tr><?php
+ endif;
+ endif;
+ if (get_option('jigoshop_calc_taxes') == 'yes') :
+ if ($order->order_subtotal_inc_tax) :
+ foreach ($order->get_tax_classes() as $tax_class) :
+ if (!$order->tax_class_is_not_compound($tax_class)) :
+ ?>
+
+ <tr>
+ <td colspan="2"><?php echo $order->get_tax_class_for_display($tax_class) . ' (' . (float) $order->get_tax_rate($tax_class) . '%):'; ?></td>
+ <td><?php echo $order->get_tax_amount($tax_class) ?></td>
+ </tr>
+ <?php
+ endif;
+ endforeach;
+ else :
+ foreach ($order->get_tax_classes() as $tax_class) :
+ ?>
+ <tr>
+ <td colspan="2"><?php echo $order->get_tax_class_for_display($tax_class) . ' (' . (float) $order->get_tax_rate($tax_class) . '%):'; ?></td>
+ <td><?php echo $order->get_tax_amount($tax_class) ?></td>
+ </tr>
+ <?php endforeach;
+ endif;
+ endif;
+ if ($order->order_discount > 0) : ?><tr class="discount">
+ <td colspan="2"><?php _e('Discount', 'jigoshop'); ?></td>
+ <td>-<?php echo jigoshop_price($order->order_discount); ?></td>
+ </tr><?php endif; ?>
+ <tr>
+ <td colspan="2"><strong><?php _e('Grand Total', 'jigoshop'); ?></strong></td>
+ <td><strong><?php echo jigoshop_price($order->order_total); ?></strong></td>
+ </tr>
+ </tfoot>
+ <tbody>
+ <?php
+ if (sizeof($order->items) > 0) :
+ foreach ($order->items as $item) :
+ echo '
<tr>
- <td>'.$item['name'].'</td>
- <td>'.$item['qty'].'</td>
- <td>'.jigoshop_price( $item['cost']*$item['qty'] ).'</td>
+ <td>' . $item['name'] . '</td>
+ <td>' . $item['qty'] . '</td>
+ <td>' . jigoshop_price($item['cost'] * $item['qty']) . '</td>
</tr>';
- endforeach;
- endif;
- ?>
- </tbody>
- </table>
-
- <div id="payment">
- <?php if ($order->order_total > 0) : ?>
- <ul class="payment_methods methods">
- <?php
- $available_gateways = jigoshop_payment_gateways::get_available_payment_gateways();
- if ($available_gateways) :
- // Chosen Method
- if (sizeof($available_gateways)) current($available_gateways)->set_current();
- foreach ($available_gateways as $gateway ) :
- ?>
- <li>
- <input type="radio" id="payment_method_<?php echo $gateway->id; ?>" class="input-radio" name="payment_method" value="<?php echo $gateway->id; ?>" <?php if ($gateway->chosen) echo 'checked="checked"'; ?> />
- <label for="payment_method_<?php echo $gateway->id; ?>"><?php echo $gateway->title; ?> <?php echo $gateway->icon(); ?></label>
- <?php
- if ($gateway->has_fields || $gateway->description) :
- echo '<div class="payment_box payment_method_'.$gateway->id.'" style="display:none;">';
- $gateway->payment_fields();
- echo '</div>';
- endif;
- ?>
- </li>
- <?php
- endforeach;
- else :
-
- echo '<p>'.__('Sorry, it seems that there are no available payment methods for your location. Please contact us if you require assistance or wish to make alternate arrangements.', 'jigoshop').'</p>';
-
- endif;
- ?>
- </ul>
- <?php endif; ?>
+ endforeach;
+ endif;
+ ?>
+ </tbody>
+ </table>
+
+ <div id="payment">
+ <?php if ($order->order_total > 0) : ?>
+ <ul class="payment_methods methods">
+ <?php
+ $available_gateways = jigoshop_payment_gateways::get_available_payment_gateways();
+ if ($available_gateways) :
+ // Chosen Method
+ if (sizeof($available_gateways))
+ current($available_gateways)->set_current();
+ foreach ($available_gateways as $gateway) :
+ ?>
+ <li>
+ <input type="radio" id="payment_method_<?php echo $gateway->id; ?>" class="input-radio" name="payment_method" value="<?php echo esc_attr( $gateway->id ); ?>" <?php if ($gateway->chosen)
+ echo 'checked="checked"'; ?> />
+ <label for="payment_method_<?php echo $gateway->id; ?>"><?php echo $gateway->title; ?> <?php echo $gateway->icon(); ?></label>
+ <?php
+ if ($gateway->has_fields || $gateway->description) :
+ echo '<div class="payment_box payment_method_' . esc_attr( $gateway->id ) . '" style="display:none;">';
+ $gateway->payment_fields();
+ echo '</div>';
+ endif;
+ ?>
+ </li>
+ <?php
+ endforeach;
+ else :
+
+ echo '<p>' . __('Sorry, it seems that there are no available payment methods for your location. Please contact us if you require assistance or wish to make alternate arrangements.', 'jigoshop') . '</p>';
+
+ endif;
+ ?>
+ </ul>
+ <?php endif; ?>
+
+ <div class="form-row">
+ <?php jigoshop::nonce_field('pay') ?>
+ <input type="submit" class="button-alt" name="pay" id="place_order" value="<?php _e('Pay for order', 'jigoshop'); ?>" />
- <div class="form-row">
- <?php jigoshop::nonce_field('pay')?>
- <input type="submit" class="button" name="pay" id="place_order" value="<?php _e('Pay for order', 'jigoshop'); ?>" />
+ </div>
- </div>
+ </div>
- </div>
-
</form>
View
274 skeleton/checkout/review_order.php
@@ -1,148 +1,142 @@
<?php
- if (!defined('JIGOSHOP_CHECKOUT')) define('JIGOSHOP_CHECKOUT', true);
-
- if (!defined('ABSPATH')) :
- define('DOING_AJAX', true);
-
-
- $wp_include = "../wp-load.php";
- $i = 0;
- while (!file_exists($wp_include) && $i++ < 10) {
- $wp_include = "../$wp_include";
- }
- // let's load WordPress
- require($wp_include);
-
- endif;
-
- if (sizeof(jigoshop_cart::$cart_contents)==0) :
- echo '<p class="error">'.__('Sorry, your session has expired.', 'jigoshop').' <a href="'.home_url().'">'.__('Return to homepage &rarr;', 'jigoshop').'</a></p>';
- exit;
- endif;
-
- if (isset($_POST['shipping_method'])) $_SESSION['_chosen_method_id'] = $_POST['shipping_method'];
-
- if (isset($_POST['country'])) jigoshop_customer::set_country( $_POST['country'] );
- if (isset($_POST['state'])) jigoshop_customer::set_state( $_POST['state'] );
- if (isset($_POST['postcode'])) jigoshop_customer::set_postcode( $_POST['postcode'] );
-
- if (isset($_POST['s_country'])) jigoshop_customer::set_shipping_country( $_POST['s_country'] );
- if (isset($_POST['s_state'])) jigoshop_customer::set_shipping_state( $_POST['s_state'] );
- if (isset($_POST['s_postcode'])) jigoshop_customer::set_shipping_postcode( $_POST['s_postcode'] );
-
- jigoshop_cart::calculate_totals();
+/**
+ * Review order form template
+ *
+ * DISCLAIMER
+ *
+ * Do not edit or add directly to this file if you wish to upgrade Jigoshop to newer
+ * versions in the future. If you wish to customise Jigoshop core for your needs,
+ * please use our GitHub repository to publish essential changes for consideration.
+ *
+ * @package Jigoshop
+ * @category Checkout
+ * @author Jigowatt
+ * @copyright Copyright (c) 2011-2012 Jigowatt Ltd.
+ * @license http://jigoshop.com/license/commercial-edition
+ */
?>
<div id="order_review">
-
- <table class="shop_table">
- <thead>
- <tr>
- <th><?php _e('Product', 'jigoshop'); ?></th>
- <th><?php _e('Qty', 'jigoshop'); ?></th>
- <th><?php _e('Totals', 'jigoshop'); ?></th>
- </tr>
- </thead>
- <tfoot>
- <tr>
- <td colspan="2"><?php _e('Subtotal', 'jigoshop'); ?></td>
- <td><?php echo jigoshop_cart::get_cart_subtotal(); ?></td>
- </tr>
-
- <?php if (jigoshop_cart::needs_shipping()) : ?>
- <td colspan="2"><?php _e('Shipping', 'jigoshop'); ?></td>
- <td>
- <?php
-
- $available_methods = jigoshop_shipping::get_available_shipping_methods();
-
- if (sizeof($available_methods)>0) :
-
- echo '<select name="shipping_method" id="shipping_method">';
-
- foreach ($available_methods as $method ) :
-
- echo '<option value="'.$method->id.'" ';
-
- if ($method->chosen) echo 'selected="selected"';
-
- echo '>'.$method->title.' &ndash; ';
-
- if ($method->shipping_total>0) :
- echo jigoshop_price($method->shipping_total);
- if ($method->shipping_tax>0) : __(' (ex. tax)', 'jigoshop'); endif;
- else :
- echo __('Free', 'jigoshop');
- endif;
-
- echo '</option>';
-
- endforeach;
-
- echo '</select>';
-
- else :
-
- if ( !jigoshop_customer::get_country() ) :
- echo '<p>'.__('Please fill in your details above to see available shipping methods.', 'jigoshop').'</p>';
- else :
- echo '<p>'.__('Sorry, it seems that there are no available shipping methods for your state. Please contact us if you require assistance or wish to make alternate arrangements.', 'jigoshop').'</p>';
- endif;
-
- endif;
-
- ?></td>
- <?php endif; ?>
-
- <?php if (jigoshop_cart::get_cart_tax()) : ?><tr>
- <td colspan="2"><?php _e('Tax', 'jigoshop'); ?></td>
- <td><?php echo jigoshop_cart::get_cart_tax(); ?></td>
- </tr><?php endif; ?>
-
- <?php if (jigoshop_cart::get_total_discount()) : ?><tr class="discount">
- <td colspan="2"><?php _e('Discount', 'jigoshop'); ?></td>
- <td>-<?php echo jigoshop_cart::get_total_discount(); ?></td>
- </tr><?php endif; ?>
- <tr>
- <td colspan="2"><strong><?php _e('Grand Total', 'jigoshop'); ?></strong></td>
- <td><strong><?php echo jigoshop_cart::get_total(); ?></strong></td>
- </tr>
- </tfoot>
- <tbody>
- <?php
- if (sizeof(jigoshop_cart::$cart_contents)>0) :
- foreach (jigoshop_cart::$cart_contents as $item_id => $values) :
- $_product = $values['data'];
- if ($_product->exists() && $values['quantity']>0) :
- echo '
- <tr>
- <td>'.$_product->get_title().'</td>
- <td>'.$values['quantity'].'</td>
- <td>'.jigoshop_price($_product->get_price_excluding_tax()*$values['quantity'], array('ex_tax_label' => 1)).'</td>
+ <table class="shop_table">
+ <thead>
+ <tr>
+ <th><?php _e('Product', 'jigoshop'); ?></th>
+ <th><?php _e('Qty', 'jigoshop'); ?></th>
+ <th><?php _e('Totals', 'jigoshop'); ?></th>
+ </tr>
+ </thead>
+ <tfoot>
+ <tr>
+ <?php if (get_option('jigoshop_calc_taxes') == 'yes' && jigoshop_cart::get_subtotal_inc_tax()) : ?>
+ <td colspan="2"><?php _e('Retail Price', 'jigoshop'); ?></td>
+ <?php else : ?>
+ <td colspan="2"><?php _e('Subtotal', 'jigoshop'); ?></td>
+ <?php endif; ?>
+ <td><?php echo jigoshop_cart::get_cart_subtotal(); ?></td>
+ </tr>
+
+ <?php
+ if (get_option('jigoshop_calc_taxes') == 'yes' && jigoshop_cart::get_subtotal_inc_tax()) :
+ jigoshop_checkout::get_shipping_dropdown();
+ foreach (jigoshop_cart::get_applied_tax_classes() as $tax_class) :
+ if (jigoshop_cart::is_not_compounded_tax($tax_class)) :
+ ?>
+ <tr>
+ <td colspan="2"><?php echo jigoshop_cart::get_tax_for_display($tax_class); ?></td>
+ <td><?php echo jigoshop_cart::get_tax_amount($tax_class) ?></td>
+ </tr>
+ <?php
+ endif;
+ endforeach;
+ ?><tr>
+ <td colspan="2"><?php _e('Subtotal', 'jigoshop'); ?></td>
+ <td><?php echo jigoshop_cart::get_subtotal_inc_tax(); ?></td>
+ </tr>
+ <?php
+ else :
+ jigoshop_checkout::get_shipping_dropdown();
+ endif;
+ if (get_option('jigoshop_calc_taxes') == 'yes') :
+ if (jigoshop_cart::get_subtotal_inc_tax()) :
+ foreach (jigoshop_cart::get_applied_tax_classes() as $tax_class) :
+ if (!jigoshop_cart::is_not_compounded_tax($tax_class)) :
+ ?>
+
+ <tr>
+ <td colspan="2"><?php echo jigoshop_cart::get_tax_for_display($tax_class); ?></th>
+ <td><?php echo jigoshop_cart::get_tax_amount($tax_class) ?></td>
+ </tr>
+ <?php
+ endif;
+ endforeach;
+ else :
+ foreach (jigoshop_cart::get_applied_tax_classes() as $tax_class) :
+ ?>
+ <tr>
+ <td colspan="2"><?php echo jigoshop_cart::get_tax_for_display($tax_class); ?></td>
+ <td><?php echo jigoshop_cart::get_tax_amount($tax_class) ?></td>
+ </tr>
+ <?php
+ endforeach;
+ endif;
+ endif;
+ ?>
+
+ <?php do_action('jigoshop_after_review_order_items'); ?>
+ <?php if (jigoshop_cart::get_total_discount()) : ?><tr class="discount">
+ <td colspan="2"><?php _e('Discount', 'jigoshop'); ?></td>
+ <td>-<?php echo jigoshop_cart::get_total_discount(); ?></td>
+ </tr><?php endif; ?>
+ <tr>
+ <td colspan="2"><strong><?php _e('Grand Total', 'jigoshop'); ?></strong></td>
+ <td><strong><?php echo jigoshop_cart::get_total(); ?></strong></td>
+ </tr>
+ </tfoot>
+ <tbody>
+ <?php
+ if (sizeof(jigoshop_cart::$cart_contents) > 0) :
+ foreach (jigoshop_cart::$cart_contents as $item_id => $values) :
+ $_product = $values['data'];
+ if ($_product->exists() && $values['quantity'] > 0) :
+ $variation = '';
+ if ($_product instanceof jigoshop_product_variation && is_array($values['variation'])) {
+ $variation = jigoshop_get_formatted_variation($values['variation']);
+ }
+ echo '
+ <tr>
+ <td class="product-name">' . $_product->get_title() . $variation . '</td>
+ <td>' . $values['quantity'] . '</td>
+ <td>' . jigoshop_price($_product->get_price_excluding_tax() * $values['quantity'], array('ex_tax_label' => 1)) . '</td>
</tr>';
endif;
- endforeach;
+ endforeach;
endif;
?>
</tbody>
</table>
-
+
<div id="payment">
<?php if (jigoshop_cart::needs_payment()) : ?>
<ul class="payment_methods methods">
- <?php
+ <?php
$available_gateways = jigoshop_payment_gateways::get_available_payment_gateways();
- if ($available_gateways) :
+ if ($available_gateways) :
// Chosen Method
- if (sizeof($available_gateways)) current($available_gateways)->set_current();
+ if (sizeof($available_gateways)) {
+ if( isset( $_POST[ 'payment_method' ] ) && isset( $available_gateways[ $_POST['payment_method'] ] ) ) {
+ $available_gateways[ $_POST[ 'payment_method' ] ]->set_current();
+ } else {
+ current($available_gateways)->set_current();
+ }
+ }
foreach ($available_gateways as $gateway ) :
?>
<li>
- <input type="radio" id="payment_method_<?php echo $gateway->id; ?>" class="input-radio" name="payment_method" value="<?php echo $gateway->id; ?>" <?php if ($gateway->chosen) echo 'checked="checked"'; ?> />
- <label for="payment_method_<?php echo $gateway->id; ?>"><?php echo $gateway->title; ?> <?php echo apply_filters('gateway_icon', $gateway->icon(), $gateway->id); ?></label>
+ <input type="radio" id="payment_method_<?php echo $gateway->id; ?>" class="input-radio" name="payment_method" value="<?php echo esc_attr( $gateway->id ); ?>" <?php if ($gateway->chosen) echo 'checked="checked"'; ?> />
+ <label for="payment_method_<?php echo $gateway->id; ?>"><?php echo $gateway->title; ?> <?php echo apply_filters('gateway_icon', $gateway->icon(), $gateway->id); ?></label>
<?php
- if ($gateway->has_fields || $gateway->description) :
- echo '<div class="payment_box payment_method_'.$gateway->id.'" style="display:none;">';
+ if ($gateway->has_fields || $gateway->description) :
+ echo '<div class="payment_box payment_method_' . esc_attr( $gateway->id ) . '" style="display:none;">';
$gateway->payment_fields();
echo '</div>';
endif;
@@ -151,34 +145,42 @@
<?php
endforeach;
else :
-
+
if ( !jigoshop_customer::get_country() ) :
echo '<p>'.__('Please fill in your details above to see available payment methods.', 'jigoshop').'</p>';
else :
echo '<p>'.__('Sorry, it seems that there are no available payment methods for your state. Please contact us if you require assistance or wish to make alternate arrangements.', 'jigoshop').'</p>';
endif;
-
+
endif;
?>
</ul>
<?php endif; ?>
<div class="form-row">
-
- <noscript><?php _e('Since your browser does not support JavaScript, or it is disabled, please ensure you click the <em>Update Totals</em> button before placing your order. You may be charged more than the amount stated above if you fail to do so.', 'jigoshop'); ?><br/><input type="submit" class="button" name="update_totals" value="<?php _e('Update totals', 'jigoshop'); ?>" /></noscript>
-
+
+ <noscript><?php _e('Since your browser does not support JavaScript, or it is disabled, please ensure you click the <em>Update Totals</em> button before placing your order. You may be charged more than the amount stated above if you fail to do so.', 'jigoshop'); ?><br/><input type="submit" class="button-alt" name="update_totals" value="<?php _e('Update totals', 'jigoshop'); ?>" /></noscript>
+
<?php jigoshop::nonce_field('process_checkout')?>
- <input type="submit" class="button" name="place_order" id="place_order" value="<?php _e('Place order', 'jigoshop'); ?>" />
-
- <?php if (get_option('jigoshop_terms_page_id')>0) : ?>
+
+ <?php do_action( 'jigoshop_review_order_before_submit' ); ?>
+
+ <?php if (jigoshop_get_page_id('terms')>0) : ?>
<p class="form-row terms">
- <label for="terms" class="checkbox"><?php _e('I accept the', 'jigoshop'); ?> <a href="<?php echo get_permalink(get_option('jigoshop_terms_page_id')); ?>" target="_blank"><?php _e('terms &amp; conditions', 'jigoshop'); ?></a></label>
+ <label for="terms" class="checkbox"><?php _e('I accept the', 'jigoshop'); ?> <a href="<?php echo esc_url( get_permalink(jigoshop_get_page_id('terms')) ); ?>" target="_blank"><?php _e('terms &amp; conditions', 'jigoshop'); ?></a></label>
<input type="checkbox" class="input-checkbox" name="terms" <?php if (isset($_POST['terms'])) echo 'checked="checked"'; ?> id="terms" />
</p>
<?php endif; ?>
+ <a href="<?php echo home_url(); ?>" class="button cancel"><?php echo apply_filters( 'jigoshop_order_cancel_button_text', __( 'Cancel', 'jigoshop') ) ?></a>
+
+ <?php $order_button_text = apply_filters( 'jigoshop_order_button_text', __( 'Place order', 'jigoshop') ); ?>
+ <input type="submit" class="button-alt" name="place_order" id="place_order" value="<?php echo esc_attr( $order_button_text ); ?>" />
+
+ <?php do_action( 'jigoshop_review_order_after_submit' ); ?>
+
</div>
</div>
-
+
</div>
View
13 skeleton/jigoshop.css
@@ -444,15 +444,6 @@ p.buttons a.button:hover {
}
.button-alt {
- color: #fff !important;
- padding: 4px 16px;
- width: auto !important;
- text-decoration: none;
- cursor: pointer;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
- line-height: 1.6em;
position: relative;
top: -1px;
}
@@ -552,7 +543,6 @@ p.buttons a.button:hover {
}
#review_form label {
- display: inline;
}
#review_form #respond p {
@@ -802,7 +792,7 @@ td.quantity {
}
.cart-collaterals .cart_totals {
float: right;
- width: 225px;
+ width: 100%;
text-align: right;
}
@@ -943,6 +933,7 @@ form.login {
#payment #place_order {
float: right;
margin: 0;
+ font-size: 18px;
}
#payment .terms {
padding: 0 1em 0 !important;
View
2 skeleton/jigoshop_functions.php
@@ -477,7 +477,7 @@ function jigoshop_related_products( $posts_per_page = 4, $post_columns = 4, $ord
**/
if (!function_exists('jigoshop_shipping_calculator')) {
function jigoshop_shipping_calculator() {
- if (jigoshop_shipping::$enabled && get_option('jigoshop_enable_shipping_calc')=='yes' && jigoshop_cart::needs_shipping()) :
+ if (jigoshop_cart::needs_shipping()) :
?>
<form class="shipping_calculator" action="<?php echo jigoshop_cart::get_cart_url(); ?>" method="post">
<h4><a href="#" class="shipping-calculator-button"><?php _e('Calculate Shipping', 'jigoshop'); ?> <span>&darr;</span></a></h4>
View
54 skeleton/loop-shop.php
@@ -0,0 +1,54 @@
+<?php
+
+global $columns, $post, $per_page, $wp_query;
+
+do_action('jigoshop_before_shop_loop');
+
+$loop = 0;
+
+if (!isset($columns) || !$columns) $columns = apply_filters('loop_shop_columns', 3);
+if (!isset($per_page) || !$per_page) $per_page = apply_filters('loop_shop_per_page', get_option('posts_per_page'));
+
+if ($per_page > get_option('posts_per_page')) query_posts( array_merge( $wp_query->query, array( 'posts_per_page' => $per_page ) ) );
+
+ob_start();
+
+if (have_posts()) : while (have_posts()) : the_post(); $_product = &new jigoshop_product( $post->ID ); $loop++;
+
+ ?>
+ <li class="product <?php if ($loop%$columns==0) echo 'last'; if (($loop-1)%$columns==0) echo 'first'; ?>">
+
+ <?php do_action('jigoshop_before_shop_loop_item'); ?>
+
+ <a href="<?php the_permalink(); ?>">
+
+ <strong><?php the_title(); ?></strong>
+
+ <?php do_action('jigoshop_before_shop_loop_item_title', $post, $_product); ?>
+
+
+ <?php do_action('jigoshop_after_shop_loop_item_title', $post, $_product); ?>
+
+ </a>
+
+ <?php do_action('jigoshop_after_shop_loop_item', $post, $_product); ?>
+
+ </li><?php
+
+ if ($loop==$per_page) break;
+
+endwhile; endif;
+
+if ($loop==0) :
+
+ echo '<p class="info">'.__('No products found which match your selection.', 'jigoshop').'</p>';
+
+else :
+
+ $found_posts = ob_get_clean();
+
+ echo '<ul class="products">' . $found_posts . '</ul><div class="clear"></div>';
+
+endif;
+
+do_action('jigoshop_after_shop_loop');
View
6 skeleton/style.css
@@ -405,7 +405,7 @@ a.themeauthor {
-moz-box-shadow:1px 1px 6px #ddd;
box-shadow:1px 1px 6px #ddd;
position: relative;
- behavior: url('../wp-content/themes/presstige/css/PIE.php');
+ behavior: url('../wp-content/themes/skeleton/css/PIE.php');
}
.wp-caption img {
@@ -1842,12 +1842,10 @@ img.scale-with-grid {
/* #Forms (see formalize.css)
================================================== */
- label,legend { font-weight: bold;font-size: 13px;font-weight: bold;font-size: 13px;
- display: block;}
label,legend {
font-weight: bold;font-size: 13px;
- display: block;
+ display: inline-block;
}
input[type="checkbox"] {display: inline; }

0 comments on commit fc99fb5

Please sign in to comment.
Something went wrong with that request. Please try again.