Merge branch 'master' of git://github.com/woothemes/woocommerce
This commit is contained in:
commit
8514661ade
|
@ -176,7 +176,7 @@ if ( ! function_exists( 'woocommerce_settings' ) ) {
|
|||
}
|
||||
?>
|
||||
<div class="wrap woocommerce">
|
||||
<form method="post" id="mainform" action="">
|
||||
<form method="post" id="mainform" action="" enctype="multipart/form-data">
|
||||
<div class="icon32 icon32-woocommerce-settings" id="icon-woocommerce"><br /></div><h2 class="nav-tab-wrapper woo-nav-tab-wrapper">
|
||||
<?php
|
||||
$tabs = array(
|
||||
|
|
|
@ -1 +1,80 @@
|
|||
.woocommerce-message{position:relative;z-index:100;border:1px solid #b76ca9!important;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 0 15px rgba(0,0,0,0.04);-moz-box-shadow:inset 0 0 15px rgba(0,0,0,0.04);box-shadow:inset 0 0 15px rgba(0,0,0,0.04);overflow:hidden;padding:10px 0 10px!important;background:#cc99c2 url(../images/message.png) no-repeat right bottom!important}.woocommerce-message .squeezer{max-width:960px;margin:0;padding:0 10px;text-align:left;overflow:hidden}.woocommerce-message h4{margin:0 10px 0 0;font-size:18px;line-height:36px;font-family:"Helvetica Neue",Helvetica,Arial,"Lucida Grande",Verdana,"Bitstream Vera Sans",sans-serif;font-weight:normal;color:#fff;text-shadow:0 1px 1px #b574a8;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;float:left;vertical-align:middle}.woocommerce-message p{margin:0!important;padding:2px 0!important;float:left!important;line-height:32px;vertical-align:middle}.woocommerce-message p a.button-primary{font-size:16px!important;line-height:16px!important;margin:0 5px 0 0;padding:6px 15px;vertical-align:middle;color:#fff;text-align:center;text-decoration:none;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;border:1px solid #88537e;background:#a46497;-moz-box-shadow:inset 0 0 2px #fff,0 1px 1px rgba(0,0,0,0.1);-webkit-box-shadow:inset 0 0 2px #fff,0 1px 1px rgba(0,0,0,0.1);box-shadow:inset 0 0 2px #fff,0 1px 1px rgba(0,0,0,0.1);text-shadow:0 -1px 0 rgba(0,0,0,0.3);-webkit-transition-duration:.3s;-moz-transition-duration:.3s;cursor:pointer;font-family:"Helvetica Neue",Helvetica,Arial,"Lucida Grande",Verdana,"Bitstream Vera Sans",sans-serif}.woocommerce-message p a.button-primary:hover,.woocommerce-message p a.button-primary:active{background-color:#f0a000;border-color:#c87800;-webkit-transition-duration:.3s;outline:0;opacity:1}.woocommerce-message p a.skip,.woocommerce-message p a.docs{opacity:.5}.woocommerce-message .twitter-share-button{vertical-align:middle}
|
||||
.woocommerce-message {
|
||||
position: relative;
|
||||
z-index: 100;
|
||||
border: 1px solid #b76ca9 !important;
|
||||
-moz-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
-webkit-box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.04);
|
||||
-moz-box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.04);
|
||||
box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.04);
|
||||
overflow: hidden;
|
||||
padding: 10px 0 10px !important;
|
||||
background: #cc99c2 url(../images/message.png) no-repeat right bottom !important;
|
||||
}
|
||||
.woocommerce-message .squeezer {
|
||||
max-width: 960px;
|
||||
margin: 0;
|
||||
padding: 0 10px;
|
||||
text-align: left;
|
||||
overflow: hidden;
|
||||
}
|
||||
.woocommerce-message h4 {
|
||||
margin: 0 10px 0 0;
|
||||
font-size: 18px;
|
||||
line-height: 36px;
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, "Lucida Grande", Verdana, "Bitstream Vera Sans", sans-serif;
|
||||
font-weight: normal;
|
||||
color: #fff;
|
||||
text-shadow: 0px 1px 1px #b574a8;
|
||||
-moz-border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
float: left;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.woocommerce-message p {
|
||||
margin: 0 !important;
|
||||
padding: 2px 0 !important;
|
||||
float: left !important;
|
||||
line-height: 32px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.woocommerce-message p a.button-primary {
|
||||
font-size: 16px !important;
|
||||
line-height: 16px !important;
|
||||
margin: 0 5px 0 0;
|
||||
padding: 6px 15px;
|
||||
vertical-align: middle;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
-moz-border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
border: 1px solid #88537e;
|
||||
background: #a46497;
|
||||
-moz-box-shadow: inset 0 0 2px #ffffff, 0 1px 1px rgba(0, 0, 0, 0.1);
|
||||
-webkit-box-shadow: inset 0 0 2px #ffffff, 0 1px 1px rgba(0, 0, 0, 0.1);
|
||||
box-shadow: inset 0 0 2px #ffffff, 0 1px 1px rgba(0, 0, 0, 0.1);
|
||||
text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.3);
|
||||
-webkit-transition-duration: .3s;
|
||||
-moz-transition-duration: .3s;
|
||||
cursor: pointer;
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, "Lucida Grande", Verdana, "Bitstream Vera Sans", sans-serif;
|
||||
}
|
||||
.woocommerce-message p a.button-primary:hover,
|
||||
.woocommerce-message p a.button-primary:active {
|
||||
background-color: #f0a000;
|
||||
border-color: #c87800;
|
||||
-webkit-transition-duration: .3s;
|
||||
outline: none;
|
||||
opacity: 1;
|
||||
}
|
||||
.woocommerce-message p a.skip,
|
||||
.woocommerce-message p a.docs {
|
||||
opacity: 0.5;
|
||||
}
|
||||
.woocommerce-message .twitter-share-button {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@ class WC_Product_Variation extends WC_Product {
|
|||
var $variation_has_stock;
|
||||
var $variation_has_sku;
|
||||
var $variation_shipping_class;
|
||||
var $variation_shipping_class_id;
|
||||
var $variation_has_tax_class;
|
||||
|
||||
/**
|
||||
|
@ -280,6 +281,21 @@ class WC_Product_Variation extends WC_Product {
|
|||
endif;
|
||||
return $this->variation_shipping_class;
|
||||
}
|
||||
|
||||
/** Returns the product shipping class ID */
|
||||
function get_shipping_class_id() {
|
||||
if ( ! $this->variation_shipping_class_id ) {
|
||||
|
||||
$classes = get_the_terms( $this->variation_id, 'product_shipping_class' );
|
||||
|
||||
if ( $classes && ! is_wp_error( $classes ) )
|
||||
$this->variation_shipping_class_id = current( $classes )->term_id;
|
||||
else
|
||||
$this->variation_shipping_class_id = parent::get_shipping_class_id();
|
||||
|
||||
}
|
||||
return (int) $this->variation_shipping_class_id;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -150,6 +150,10 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
|
|||
|
||||
== Changelog ==
|
||||
|
||||
* Fix - Widget init function conflict with widget logic
|
||||
* Fix - PLN currency code
|
||||
* Fix - Variation get shipping class ID
|
||||
|
||||
= 1.5.8 - 21/06/2012 =
|
||||
* Tweak - Textarea for notes and enabled HTML
|
||||
* Tweak - Added checkout processing triggers for gateways (in particular stripe) to use
|
||||
|
|
|
@ -6,44 +6,49 @@
|
|||
* @category Widgets
|
||||
* @author WooThemes
|
||||
*/
|
||||
if (is_active_widget( false, false, 'woocommerce_layered_nav', 'true' ) && !is_admin()) :
|
||||
add_action('init', 'woocommerce_layered_nav_init', 1);
|
||||
add_filter('loop_shop_post_in', 'woocommerce_layered_nav_query');
|
||||
endif;
|
||||
|
||||
|
||||
/**
|
||||
* Layered Nav Init
|
||||
*/
|
||||
add_action( 'init', 'woocommerce_layered_nav_init', 1 );
|
||||
|
||||
function woocommerce_layered_nav_init( ) {
|
||||
global $_chosen_attributes, $woocommerce, $_attributes_array;
|
||||
|
||||
$_chosen_attributes = array();
|
||||
$_attributes_array = array();
|
||||
if ( is_active_widget( false, false, 'woocommerce_layered_nav', true ) && ! is_admin() ) {
|
||||
|
||||
$attribute_taxonomies = $woocommerce->attribute_taxonomies;
|
||||
if ( $attribute_taxonomies ) :
|
||||
foreach ($attribute_taxonomies as $tax) :
|
||||
|
||||
$attribute = strtolower(sanitize_title($tax->attribute_name));
|
||||
$taxonomy = $woocommerce->attribute_taxonomy_name($attribute);
|
||||
|
||||
// create an array of product attribute taxonomies
|
||||
$_attributes_array[] = $taxonomy;
|
||||
|
||||
$name = 'filter_' . $attribute;
|
||||
$query_type_name = 'query_type_' . $attribute;
|
||||
|
||||
if (isset($_GET[$name]) && $_GET[$name] && taxonomy_exists($taxonomy)) :
|
||||
$_chosen_attributes[$taxonomy]['terms'] = explode(',', $_GET[$name] );
|
||||
if (isset($_GET[$query_type_name]) && $_GET[$query_type_name]=='or') :
|
||||
$_chosen_attributes[$taxonomy]['query_type'] = 'or';
|
||||
else :
|
||||
$_chosen_attributes[$taxonomy]['query_type'] = 'and';
|
||||
endif;
|
||||
endif;
|
||||
endforeach;
|
||||
endif;
|
||||
global $_chosen_attributes, $woocommerce, $_attributes_array;
|
||||
|
||||
$_chosen_attributes = array();
|
||||
$_attributes_array = array();
|
||||
|
||||
$attribute_taxonomies = $woocommerce->attribute_taxonomies;
|
||||
if ( $attribute_taxonomies ) {
|
||||
foreach ( $attribute_taxonomies as $tax ) {
|
||||
|
||||
$attribute = strtolower(sanitize_title($tax->attribute_name));
|
||||
$taxonomy = $woocommerce->attribute_taxonomy_name($attribute);
|
||||
|
||||
// create an array of product attribute taxonomies
|
||||
$_attributes_array[] = $taxonomy;
|
||||
|
||||
$name = 'filter_' . $attribute;
|
||||
$query_type_name = 'query_type_' . $attribute;
|
||||
|
||||
if ( ! empty( $_GET[$name] ) && taxonomy_exists( $taxonomy ) ) {
|
||||
|
||||
$_chosen_attributes[$taxonomy]['terms'] = explode( ',', $_GET[ $name ] );
|
||||
|
||||
if ( ! empty( $_GET[$query_type_name] ) && $_GET[ $query_type_name ] == 'or' )
|
||||
$_chosen_attributes[$taxonomy]['query_type'] = 'or';
|
||||
else
|
||||
$_chosen_attributes[$taxonomy]['query_type'] = 'and';
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
add_filter('loop_shop_post_in', 'woocommerce_layered_nav_query');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -9,26 +9,26 @@
|
|||
* @author WooThemes
|
||||
*/
|
||||
|
||||
if (is_active_widget( false, false, 'price_filter', 'true' ) && !is_admin()) :
|
||||
add_action('init', 'woocommerce_price_filter_init');
|
||||
add_filter('loop_shop_post_in', 'woocommerce_price_filter');
|
||||
endif;
|
||||
|
||||
/**
|
||||
* Price filter Init
|
||||
*/
|
||||
add_action( 'init', 'woocommerce_price_filter_init' );
|
||||
|
||||
function woocommerce_price_filter_init() {
|
||||
|
||||
unset($_SESSION['min_price']);
|
||||
unset($_SESSION['max_price']);
|
||||
|
||||
if (isset($_GET['min_price'])) :
|
||||
$_SESSION['min_price'] = $_GET['min_price'];
|
||||
endif;
|
||||
if (isset($_GET['max_price'])) :
|
||||
$_SESSION['max_price'] = $_GET['max_price'];
|
||||
endif;
|
||||
if ( is_active_widget( false, false, 'price_filter', true ) && ! is_admin() ) {
|
||||
|
||||
unset( $_SESSION['min_price'] );
|
||||
unset( $_SESSION['max_price'] );
|
||||
|
||||
if ( isset( $_GET['min_price'] ) )
|
||||
$_SESSION['min_price'] = $_GET['min_price'];
|
||||
|
||||
if ( isset( $_GET['max_price'] ) )
|
||||
$_SESSION['max_price'] = $_GET['max_price'];
|
||||
|
||||
add_filter( 'loop_shop_post_in', 'woocommerce_price_filter' );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -343,7 +343,7 @@ function get_woocommerce_currency_symbol( $currency = '' ) {
|
|||
case 'HUF' : $currency_symbol = 'Ft'; break;
|
||||
case 'ILS' : $currency_symbol = '₪'; break;
|
||||
case 'PHP' : $currency_symbol = '₱'; break;
|
||||
case 'PLN' : $currency_symbol = 'łz'; break;
|
||||
case 'PLN' : $currency_symbol = 'zł'; break;
|
||||
case 'SEK' : $currency_symbol = 'kr'; break;
|
||||
case 'CHF' : $currency_symbol = 'CHF'; break;
|
||||
case 'TWD' : $currency_symbol = 'NT$'; break;
|
||||
|
|
Loading…
Reference in New Issue