diff --git a/assets/css/admin-styles.css b/assets/css/admin-styles.css
index d1b603f..d0cf708 100755
--- a/assets/css/admin-styles.css
+++ b/assets/css/admin-styles.css
@@ -137,7 +137,7 @@ span.wpbo_product_values {
}
/* --------- wpbo company notice ---------- */
-#wpbo-company-notice .inside {
+#wpqu-company-notice .inside {
text-align: center;
}
diff --git a/assets/img/rapid-order-logo.png b/assets/img/rapid-order-logo.png
new file mode 100644
index 0000000..1f5d3b0
Binary files /dev/null and b/assets/img/rapid-order-logo.png differ
diff --git a/assets/img/wpbo-logo.png b/assets/img/wpbo-logo.png
deleted file mode 100755
index b773aba..0000000
Binary files a/assets/img/wpbo-logo.png and /dev/null differ
diff --git a/assets/js/ipq_input_value_validation.js b/assets/js/ipq_input_value_validation.js
index 785adf9..31bcd19 100755
--- a/assets/js/ipq_input_value_validation.js
+++ b/assets/js/ipq_input_value_validation.js
@@ -62,7 +62,7 @@ jQuery(document).ready( function($) {
new_qty = +new_qty + (+step - +rem);
// Max Value Validation
- if ( +new_qty > +max ) {
+ if ( max > 0 && +new_qty > +max ) {
new_qty = +new_qty - +step;
}
}
diff --git a/includes/class-wcqu-filters.php b/includes/class-wcqu-filters.php
index 4f8dff3..00d237a 100755
--- a/includes/class-wcqu-filters.php
+++ b/includes/class-wcqu-filters.php
@@ -77,7 +77,6 @@ public function input_min_value( $default, $product ) {
// Get Value from Rule
$min = wcqu_get_value_from_rule( 'min', $product, $rule );
-
// Return Value
if ( $min == '' or $min == null or (isset($min['min']) and $min['min'] == "")) {
return $default;
diff --git a/includes/class-wcqu-post-type.php b/includes/class-wcqu-post-type.php
index 2f75269..5156680 100755
--- a/includes/class-wcqu-post-type.php
+++ b/includes/class-wcqu-post-type.php
@@ -1,20 +1,20 @@
- __('Quantity Rules','qau'),
'singular_name' => __('Quantity Rule','qau'),
@@ -49,7 +49,7 @@ public function quantity_rule_init() {
'parent_item_colon' => '',
'menu_name' => __('Quantity Rules','qau'),
);
-
+
$args = array(
'labels' => $labels,
'public' => false,
@@ -65,21 +65,21 @@ public function quantity_rule_init() {
'supports' => array( 'title' ),
'taxonomies' => array(),
);
-
+
register_post_type( 'quantity-rule', $args );
}
-
+
/*
* Register Custom Columns for List View
- */
+ */
public function quantity_rule_columns( $column ) {
-
+
unset( $column['date'] );
-
+
$new_columns['priority'] = __('Priority');
$new_columns['min'] = __('Minimum');
$new_columns['max'] = __('Maximum');
- $new_columns['step'] = __('Step Value');
+ $new_columns['step'] = __('Step Value');
$new_columns['cats'] = __('Categories');
$new_columns['product_tags'] = __('Tags');
$new_columns['roles'] = __('Roles');
@@ -87,101 +87,101 @@ public function quantity_rule_columns( $column ) {
return array_merge( $column, $new_columns );
}
-
+
/*
* Get Custom Columns Values for List View
- */
+ */
public function manage_quantity_rule_columns($column_name, $id) {
-
+
switch ($column_name) {
-
+
case 'priority':
echo get_post_meta( $id, '_priority', true );
break;
-
+
case 'min':
echo get_post_meta( $id, '_min', true );
break;
-
+
case 'max':
echo get_post_meta( $id, '_max', true );
break;
-
+
case 'step':
- echo get_post_meta( $id, '_step', true );
+ echo get_post_meta( $id, '_step', true );
break;
-
+
case 'cats':
$cats = get_post_meta( $id, '_cats', false);
- if ( $cats != false and count( $cats[0] ) > 0 ) {
+ if ( $cats != false and count( $cats[0] ) > 0 ) {
foreach ( $cats[0] as $cat ){
-
- $taxonomy = 'product_cat';
+
+ $taxonomy = 'product_cat';
$term = get_term_by( 'id', $cat, $taxonomy );
- $link = get_term_link( $term );
-
- echo "" . $term->name . "
";
+ $link = get_term_link( $term );
+
+ echo "" . $term->name . "
";
}
- }
- break;
-
+ }
+ break;
+
case 'product_tags':
$tags = get_post_meta( $id, '_tags', false);
- if ( $tags != null and count( $tags[0] ) > 0) {
+ if ( $tags != null and count( $tags[0] ) > 0) {
foreach ( $tags[0] as $tag ){
-
- $taxonomy = 'product_tag';
+
+ $taxonomy = 'product_tag';
$term = get_term_by( 'id', $tag, $taxonomy );
- $link = get_term_link( $term );
-
- echo "" . $term->name . "
";
+ $link = get_term_link( $term );
+
+ echo "" . $term->name . "
";
}
- }
+ }
break;
-
+
case 'roles':
$roles = get_post_meta( $id, '_roles', false);
- if ( $roles != null and count( $roles[0] ) > 0) {
+ if ( $roles != null and count( $roles[0] ) > 0) {
foreach ( $roles[0] as $role ){
- echo ucfirst( $role ) . "
";
+ echo ucfirst( $role ) . "
";
}
- }
+ }
break;
-
+
default:
break;
- }
- }
-
+ }
+ }
+
/*
* Make Custom Columns Sortable
- */
- public function sortable_quantity_rule_columns( $columns ) {
-
+ */
+ public function sortable_quantity_rule_columns( $columns ) {
+
$columns['priority'] = __('Priority');
$columns['min'] = __('Minimum');
$columns['max'] = __('Maximum');
$columns['step'] = __('Step Value');
-
- return $columns;
- }
-
+
+ return $columns;
+ }
+
/*
* Register and Create Rule Options Meta Box for Quantity Rules
- */
+ */
public function quantity_rule_meta_init() {
add_meta_box(
- 'wpbo-quantity-rule-meta',
- 'Set Quantity Rule Options',
- array( $this, 'quantity_rule_meta' ),
- 'quantity-rule',
- 'normal',
+ 'wpbo-quantity-rule-meta',
+ 'Set Quantity Rule Options',
+ array( $this, 'quantity_rule_meta' ),
+ 'quantity-rule',
+ 'normal',
'high'
);
}
-
+
public function quantity_rule_meta( $post ) {
-
+
$min = get_post_meta( $post->ID, '_min', true);
$max = get_post_meta( $post->ID, '_max', true);
$min_oos = get_post_meta( $post->ID, '_min_oos', true );
@@ -190,10 +190,10 @@ public function quantity_rule_meta( $post ) {
$max_sale = get_post_meta( $post->ID, '_max_sale', true );
$step = get_post_meta( $post->ID, '_step', true);
$priority = get_post_meta( $post->ID, '_priority', true);
-
+
// Create Nonce Field
wp_nonce_field( plugin_basename( __FILE__ ), '_wpbo_rule_value_nonce' );
-
+
?>