Добрый день, в фильтре ЦЕНЫ не отображается слайдер выбора диапазона:
https://prnt.sc/ko5aqs - скриншот
Вторая проблема, не корректно ведут себя CSS-стили для демо шаблона:
tmpl_phoca_duka_v1.0.0.zip, хотя в демо: https://www.phoca.cz/phocacartdemo/ - все отображается корректно. Где взять полностью данные с демо данными как в шаблоне: https://www.phoca.cz/phocacartdemo/?
Bug in filter
-
- Phoca Member
- Posts: 45
- Joined: 26 Aug 2018, 17:23
Re: Bug in filter
And How to add icon NEW on Product VIEW:
https://prnt.sc/ko6zxu
https://prnt.sc/ko6zxu
-
- Phoca Member
- Posts: 45
- Joined: 26 Aug 2018, 17:23
Re: Bug in filter
Dont REMOVE class .navbar-fixed-top in top navigation menu:
https://d.radikal.ru/d25/1808/17/d7da58064de5.jpg
https://d.radikal.ru/d25/1808/17/d7da58064de5.jpg
-
- Phoca Member
- Posts: 45
- Joined: 26 Aug 2018, 17:23
Re: Bug in filter
Ok, for menu:
jQuery(document).ready(function () {
var menu = jQuery('#phnav');
var origOffsetY = menu.offset().top; - not correct calculation OffSET - in Firefox - alweys zero 0
function scroll() {
if (jQuery(window).scrollTop() >= origOffsetY) {
jQuery('#phnav').addClass('navbar-fixed-top');
jQuery('.phoca-nav-bottom').addClass('ph-menu-padding');
} else {
jQuery('#phnav').removeClass('navbar-fixed-top');
jQuery('.phoca-nav-bottom').removeClass('ph-menu-padding');
}
}
document.onscroll = scroll;
});
var origOffsetY = menu.offset().top+10; is solved problem
jQuery(document).ready(function () {
var menu = jQuery('#phnav');
var origOffsetY = menu.offset().top; - not correct calculation OffSET - in Firefox - alweys zero 0
function scroll() {
if (jQuery(window).scrollTop() >= origOffsetY) {
jQuery('#phnav').addClass('navbar-fixed-top');
jQuery('.phoca-nav-bottom').addClass('ph-menu-padding');
} else {
jQuery('#phnav').removeClass('navbar-fixed-top');
jQuery('.phoca-nav-bottom').removeClass('ph-menu-padding');
}
}
document.onscroll = scroll;
});
var origOffsetY = menu.offset().top+10; is solved problem
- Jan
- Phoca Hero
- Posts: 48550
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Bug in filter
Hi,
new and hot icons can be set in Options
https://www.phoca.cz/documents/116-phoc ... 80-options
Display New Icon - Set the number of days. During these days NEW icon/tag will be displayed for the product, use zero for not displaying the icon/tag
Display Hot Icon Set the number of sales - After reaching this number of sales HOT icon/tag will be displayed for the product, use zero for not displaying the icon/tag
Display Featured Text - Set the text for featured products. It can be set as raw label or as language string (If language string is included in language file, such will be translated to site language). If you leave this field empty, featured products will be not marked. If you set a text then all featured products will be marked with this text/tag.
Since version 3.1.2 you can display own tags as labels:
https://www.phoca.cz/news/985-phoca-car ... 2-released
Price filter - in case there is no range, only one point is displayed (I don't know if I see it correctly but seems you don't have any price range but only one price
)
Demo data:
you can download demo data here:
https://www.phoca.cz/download/category/ ... -component
see:
https://www.phoca.cz/documents/116-phoc ... phoca-cart
I hope, I will prepare bundle pack with demo data soon.
Jan
new and hot icons can be set in Options
https://www.phoca.cz/documents/116-phoc ... 80-options
Display New Icon - Set the number of days. During these days NEW icon/tag will be displayed for the product, use zero for not displaying the icon/tag
Display Hot Icon Set the number of sales - After reaching this number of sales HOT icon/tag will be displayed for the product, use zero for not displaying the icon/tag
Display Featured Text - Set the text for featured products. It can be set as raw label or as language string (If language string is included in language file, such will be translated to site language). If you leave this field empty, featured products will be not marked. If you set a text then all featured products will be marked with this text/tag.
Since version 3.1.2 you can display own tags as labels:
https://www.phoca.cz/news/985-phoca-car ... 2-released
Sorry, I don't understand what you exactly mean?Dont REMOVE class .navbar-fixed-top in top navigation menu:
Ok, thank you for the info, I will take a look at it for next version of templates.var origOffsetY = menu.offset().top+10; is solved problem
Price filter - in case there is no range, only one point is displayed (I don't know if I see it correctly but seems you don't have any price range but only one price

Demo data:
you can download demo data here:
https://www.phoca.cz/download/category/ ... -component
see:
https://www.phoca.cz/documents/116-phoc ... phoca-cart
I hope, I will prepare bundle pack with demo data soon.
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 45
- Joined: 26 Aug 2018, 17:23
Re: Bug in filter
Price filter - in case there is no range, only one point is displayed (I don't know if I see it correctly but seems you don't have any price range but only one price :idea: )
Thenks!!
YES! No second point in filter. I will make a new test and tell you about the results
Thenks!!
YES! No second point in filter. I will make a new test and tell you about the results
- Jan
- Phoca Hero
- Posts: 48550
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
-
- Phoca Member
- Posts: 45
- Joined: 26 Aug 2018, 17:23
Re: Bug in filter
Hello, about Filter. In new test site:
>>Price filter - in case there is no range, only one point is displayed (I don't know if I see it correctly but seems you don't
see mod_phocacart_filter.php at string number 95 and 96:
$min = PhocacartProduct::getProductPrice(2, 1, $language);// min price
$max = PhocacartProduct::getProductPrice(1, 1, $language);// max price
This to var return zero = 0, and filter only one point is displayed.
If For test:
$min = PhocacartProduct::getProductPrice(2, 1, $language);// min price
$max = 10;// max price
And filter displayed two point. See:
https://wmpics.pics/di-XYS0.jpg
https://wmpics.pics/di-4VUW38RE.jpg
Why function getProductPrice(1, 1, $language) return 0?
>>Price filter - in case there is no range, only one point is displayed (I don't know if I see it correctly but seems you don't
see mod_phocacart_filter.php at string number 95 and 96:
$min = PhocacartProduct::getProductPrice(2, 1, $language);// min price
$max = PhocacartProduct::getProductPrice(1, 1, $language);// max price
This to var return zero = 0, and filter only one point is displayed.
If For test:
$min = PhocacartProduct::getProductPrice(2, 1, $language);// min price
$max = 10;// max price
And filter displayed two point. See:
https://wmpics.pics/di-XYS0.jpg
https://wmpics.pics/di-4VUW38RE.jpg
Why function getProductPrice(1, 1, $language) return 0?
- Jan
- Phoca Hero
- Posts: 48550
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Bug in filter
Hi, yes, it is a bug which was not fixed in latest release (based on full group by sql rule).
To make hot fix, please open this file:
administrator\components\com_phocacart\libraries\phocacart\product\product.php
and change the function getProductPrice.
Remove it and change to:
Please let me know if it is Ok.
Jan
To make hot fix, please open this file:
administrator\components\com_phocacart\libraries\phocacart\product\product.php
and change the function getProductPrice.
Remove it and change to:
Code: Select all
public static function getProductPrice($type = 1, $onlyAvailableProducts = 0, $lang = '') {
switch($type) {
case 2:
$select = 'MIN(p.price)';
break;
case 1:
default:
$select = 'MAX(p.price)';
break;
}
$db = JFactory::getDBO();
$wheres = array();
$lefts = array();
$wheres[] = ' p.published = 1';
if ($lang != '' && $lang != '*') {
$wheres[] = " p.language = ".$db->quote($lang);
}
if ($onlyAvailableProducts == 1) {
$rules = PhocacartProduct::getOnlyAvailableProductRules();
$wheres = array_merge($wheres, $rules['wheres']);
$lefts = array_merge($lefts, $rules['lefts']);
}
$group = PhocacartUtilsSettings::isFullGroupBy() ? ' GROUP BY p.published' : '';
$q = ' SELECT '.$select
.' FROM #__phocacart_products AS p'
. (!empty($lefts) ? ' LEFT JOIN ' . implode( ' LEFT JOIN ', $lefts ) : '')
. (!empty($wheres) ? ' WHERE ' . implode( ' AND ', $wheres ) : '')
. $group
. ' ORDER BY p.id'
. ' LIMIT 1';
$db->setQuery( $q );
$price = $db->loadResult();
return $price;
}
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 45
- Joined: 26 Aug 2018, 17:23
Re: Bug in filter
Yes, filter displayed two point after fix, Thenks