diff --git a/component/admin/language/en-GB/en-GB.com_redshop.ini b/component/admin/language/en-GB/en-GB.com_redshop.ini
index 9fe1caf836f..2d7705e9129 100644
--- a/component/admin/language/en-GB/en-GB.com_redshop.ini
+++ b/component/admin/language/en-GB/en-GB.com_redshop.ini
@@ -1695,6 +1695,9 @@ COM_REDSHOP_TOOLTIP_PRODUCT_EXPIRED_LBL="Product Expired"
COM_REDSHOP_PRODUCT_NOT_FOR_SALE="Product not for sell"
COM_REDSHOP_TOOLTIP_PRODUCT_NOT_FOR_SALE="Product Not For Sell"
COM_REDSHOP_TOOLTIP_PRODUCT_NOT_FOR_SALE_LBL="Product Not For Sell"
+COM_REDSHOP_PRODUCT_NOT_FOR_SALE_SHOWPRICE="Product not for sell will show price?"
+COM_REDSHOP_TOOLTIP_PRODUCT_NOT_FOR_SALE_SHOWPRICE="Product not for sell will show price?"
+COM_REDSHOP_TOOLTIP_PRODUCT_NOT_FOR_SALE_SHOWPRICE_LBL="Product not for sell will show price?"
COM_REDSHOP_PRODUCT_PREORDER="Product Pre-Order"
COM_REDSHOP_TOOLTIP_PRODUCT_PREORDER="Select 'Yes' if you want your customers to be able to pre-order products."
COM_REDSHOP_TOOLTIP_PRODUCT_PRICE="Enter product price."
diff --git a/component/admin/models/product.php b/component/admin/models/product.php
index c3ad3e4f094..7e103e7a016 100644
--- a/component/admin/models/product.php
+++ b/component/admin/models/product.php
@@ -173,7 +173,7 @@ public function _buildQuery()
}
elseif ($product_sort == 'p.not_for_sale')
{
- $and = 'AND p.not_for_sale=1 ';
+ $and = 'AND p.not_for_sale > 0 ';
}
elseif ($product_sort == 'p.product_not_on_sale')
{
diff --git a/component/admin/models/product_detail.php b/component/admin/models/product_detail.php
index 587c13c8f2f..60930136a4a 100644
--- a/component/admin/models/product_detail.php
+++ b/component/admin/models/product_detail.php
@@ -457,6 +457,12 @@ public function store($data)
JFile::upload($src, $dest);
}
+ // Product not for sell - Show price or not
+ if ($row->not_for_sale && $data['not_for_sale_showprice'])
+ {
+ $row->not_for_sale = 2;
+ }
+
$isNew = ($row->product_id > 0) ? false : true;
JPluginHelper::importPlugin('redshop_product');
diff --git a/component/admin/views/product_detail/tmpl/default_general_data.php b/component/admin/views/product_detail/tmpl/default_general_data.php
index 5c91d78e410..1f513063107 100644
--- a/component/admin/views/product_detail/tmpl/default_general_data.php
+++ b/component/admin/views/product_detail/tmpl/default_general_data.php
@@ -31,6 +31,26 @@ function (response) {
document.formvalidator.setHandler("productNumber", function (value) {
return !productNumber.contains(value);
});
+
+ if ($('input[name=not_for_sale]:checked').val() == 1)
+ {
+ $('#not_for_sale_showprice').show();
+ }
+ else
+ {
+ $('#not_for_sale_showprice').hide();
+ }
+
+ $('input[name=not_for_sale]').change(function () {
+ if ($(this).val() == 1)
+ {
+ $('#not_for_sale_showprice').show(500);
+ }
+ else
+ {
+ $('#not_for_sale_showprice').hide(500);
+ }
+ })
});
})(jQuery);
@@ -59,7 +79,8 @@ function (response) {
lists['categories']; ?>
+
+
+ lists['product_type']; ?>
+
+
-
-
- lists['product_type']; ?>
-
-
+
+
+ lists['not_for_sale_showprice']; ?>
+
+