Minor fixes and update variation message

This commit is contained in:
Mike Jolley 2012-02-29 22:13:27 +00:00
parent 064685064e
commit bd82c9b8be
7 changed files with 179 additions and 86 deletions

View File

@ -44,7 +44,15 @@ function variable_product_type_options() {
<div id="variable_product_options" class="panel wc-metaboxes-wrapper"> <div id="variable_product_options" class="panel wc-metaboxes-wrapper">
<?php if (!$variation_attribute_found) : ?> <?php if (!$variation_attribute_found) : ?>
<div class="inline updated"><p><?php _e('Before you can start adding variations you must set up and save some variable attributes via the <strong>Attributes</strong> tab.', 'woocommerce'); ?></p></div>
<div id="message" class="inline woocommerce-message">
<div class="squeezer">
<h4><?php _e( 'Before adding variations, add and save some attributes on the <strong>Attributes</strong> tab.', 'woocommerce' ); ?></h4>
<p class="submit"><a class="button-primary" href="http://www.woothemes.com/woocommerce-docs/user-guide/product-variations/" target="_blank"><?php _e('Learn more', 'woocommerce'); ?></a></p>
</div>
</div>
<?php else : ?> <?php else : ?>
<p class="toolbar"> <p class="toolbar">

View File

@ -71,8 +71,6 @@ function woocommerce_admin_notices_styles() {
// Installed notices // Installed notices
if ( get_option('woocommerce_installed')==1 ) { if ( get_option('woocommerce_installed')==1 ) {
wp_enqueue_style( 'woocommerce-activation', plugins_url( '/assets/css/activation.css', dirname( __FILE__ ) ) );
if (get_option('skip_install_woocommerce_pages')!=1 && woocommerce_get_page_id('shop')<1 && !isset($_GET['install_woocommerce_pages']) && !isset($_GET['skip_install_woocommerce_pages'])) { if (get_option('skip_install_woocommerce_pages')!=1 && woocommerce_get_page_id('shop')<1 && !isset($_GET['install_woocommerce_pages']) && !isset($_GET['skip_install_woocommerce_pages'])) {
add_action( 'admin_notices', 'woocommerce_admin_install_notice' ); add_action( 'admin_notices', 'woocommerce_admin_install_notice' );
} elseif ( !isset($_GET['page']) || $_GET['page']!='woocommerce' ) { } elseif ( !isset($_GET['page']) || $_GET['page']!='woocommerce' ) {

View File

@ -912,12 +912,12 @@ function woocommerce_top_sellers() {
$product = get_post($product_id); $product = get_post($product_id);
if ($product) : if ($product) :
$product_name = '<a href="'.get_permalink($product->ID).'">'.$product->post_title.'</a>'; $product_name = '<a href="'.get_permalink($product->ID).'">'.$product->post_title.'</a>';
$orders_link = admin_url('edit.php?s&post_status=all&post_type=shop_order&action=-1&s=' . urlencode($product->post_title) . '&shop_order_status=completed,processing,on-hold');
else : else :
$product_name = __('Product does not exist', 'woocommerce'); $product_name = __('Product does not exist', 'woocommerce');
$orders_link = admin_url('edit.php?s&post_status=all&post_type=shop_order&action=-1&s=&shop_order_status=completed,processing,on-hold');
endif; endif;
$orders_link = admin_url('edit.php?s&post_status=all&post_type=shop_order&action=-1&s=' . urlencode($product->post_title) . '&shop_order_status=completed,processing,on-hold');
echo '<tr><th>'.$product_name.'</th><td width="1%"><span>'.$sales.'</span></td><td class="bars"><a href="'.$orders_link.'" style="width:'.$width.'%">&nbsp;</a></td></tr>'; echo '<tr><th>'.$product_name.'</th><td width="1%"><span>'.$sales.'</span></td><td class="bars"><a href="'.$orders_link.'" style="width:'.$width.'%">&nbsp;</a></td></tr>';
endforeach; endforeach;
?> ?>
@ -1009,12 +1009,12 @@ function woocommerce_top_earners() {
$product = get_post($product_id); $product = get_post($product_id);
if ($product) : if ($product) :
$product_name = '<a href="'.get_permalink($product->ID).'">'.$product->post_title.'</a>'; $product_name = '<a href="'.get_permalink($product->ID).'">'.$product->post_title.'</a>';
$orders_link = admin_url('edit.php?s&post_status=all&post_type=shop_order&action=-1&s=' . urlencode($product->post_title) . '&shop_order_status=completed,processing,on-hold');
else : else :
$product_name = __('Product no longer exists', 'woocommerce'); $product_name = __('Product no longer exists', 'woocommerce');
$orders_link = admin_url('edit.php?s&post_status=all&post_type=shop_order&action=-1&s=&shop_order_status=completed,processing,on-hold');
endif; endif;
$orders_link = admin_url('edit.php?s&post_status=all&post_type=shop_order&action=-1&s=' . urlencode($product->post_title) . '&shop_order_status=completed,processing,on-hold');
echo '<tr><th>'.$product_name.'</th><td width="1%"><span>'.woocommerce_price($sales).'</span></td><td class="bars"><a href="'.$orders_link.'" style="width:'.$width.'%">&nbsp;</a></td></tr>'; echo '<tr><th>'.$product_name.'</th><td width="1%"><span>'.woocommerce_price($sales).'</span></td><td class="bars"><a href="'.$orders_link.'" style="width:'.$width.'%">&nbsp;</a></td></tr>';
endforeach; endforeach;
?> ?>

View File

@ -1,78 +0,0 @@
.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;
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 rgba( 255,255,255,1), 0 1px 1px rgba( 0,0,0,0.1 );
-webkit-box-shadow: inset 0 0 2px rgba( 255,255,255,1), 0 1px 1px rgba( 0,0,0,0.1 );
box-shadow: inset 0 0 2px rgba( 255,255,255,1), 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;
}

View File

@ -1,3 +1,86 @@
.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;
}
#variable_product_options #message {
margin: 10px;
}
#woocommerce_extensions { #woocommerce_extensions {
background: #f1f1f1 url(../images/icons/wc_icon.png) no-repeat 4px 4px; background: #f1f1f1 url(../images/icons/wc_icon.png) no-repeat 4px 4px;
padding: 4px 18px 4px 28px; padding: 4px 18px 4px 28px;

View File

@ -1,3 +1,85 @@
.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;
.squeezer {
max-width: 960px;
margin: 0;
padding: 0 10px;
text-align: left;
overflow: hidden;
}
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;
}
p {
margin: 0 !important;
padding: 2px 0 !important;
float: left !important;
line-height: 32px;
vertical-align: middle;
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 rgba( 255,255,255,1), 0 1px 1px rgba( 0,0,0,0.1 );
-webkit-box-shadow: inset 0 0 2px rgba( 255,255,255,1), 0 1px 1px rgba( 0,0,0,0.1 );
box-shadow: inset 0 0 2px rgba( 255,255,255,1), 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;
}
a.button-primary:hover, a.button-primary:active {
background-color: #f0a000;
border-color: #c87800;
-webkit-transition-duration: .3s;
outline: none;
opacity: 1;
}
a.skip, a.docs {
opacity: 0.5;
}
}
.twitter-share-button {
vertical-align: middle;
}
}
#variable_product_options #message {
margin: 10px;
}
#woocommerce_extensions { #woocommerce_extensions {
background: #f1f1f1 url(../images/icons/wc_icon.png) no-repeat 4px 4px; background: #f1f1f1 url(../images/icons/wc_icon.png) no-repeat 4px 4px;
padding: 4px 18px 4px 28px; padding: 4px 18px 4px 28px;

View File

@ -125,7 +125,7 @@ class WC_Flat_Rate extends WC_Shipping_Method {
'options' => array( 'options' => array(
'title' => __( 'Shipping Options', 'woocommerce' ), 'title' => __( 'Shipping Options', 'woocommerce' ),
'type' => 'textarea', 'type' => 'textarea',
'description' => __('Optional extra shipping options with additional costs (one per line). Format: <code>Option Name|Cost|Cost is per-order (yes or no)</code>. Example: <code>Priority Mail|6.95|yes</code>. If per-order is set to no, it will use "Calculation Type" setting.', 'woocommerce'), 'description' => __('Optional extra shipping options with additional costs (one per line). Example: <code>Option Name|Cost|Per-order (yes or no)</code>. Example: <code>Priority Mail|6.95|yes</code>. If per-order is set to no, it will use the "Calculation Type" setting.', 'woocommerce'),
'default' => '' 'default' => ''
), ),
); );