Page 1 of 2
Bug in filter
Posted: 29 Aug 2018, 10:51
by Serebro200
Добрый день, в фильтре ЦЕНЫ не отображается слайдер выбора диапазона:
https://prnt.sc/ko5aqs - скриншот
Вторая проблема, не корректно ведут себя CSS-стили для демо шаблона:
tmpl_phoca_duka_v1.0.0.zip, хотя в демо:
https://www.phoca.cz/phocacartdemo/ - все отображается корректно. Где взять полностью данные с демо данными как в шаблоне:
https://www.phoca.cz/phocacartdemo/?
Re: Bug in filter
Posted: 29 Aug 2018, 12:59
by Serebro200
And How to add icon NEW on Product VIEW:
https://prnt.sc/ko6zxu
Re: Bug in filter
Posted: 29 Aug 2018, 13:13
by Serebro200
Dont REMOVE class .navbar-fixed-top in top navigation menu:
https://d.radikal.ru/d25/1808/17/d7da58064de5.jpg
Re: Bug in filter
Posted: 29 Aug 2018, 13:31
by Serebro200
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
Re: Bug in filter
Posted: 02 Sep 2018, 01:22
by Jan
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
Dont REMOVE class .navbar-fixed-top in top navigation menu:
Sorry, I don't understand what you exactly mean?
var origOffsetY = menu.offset().top+10; is solved problem
Ok, thank you for the info, I will take a look at it for next version of templates.
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
Re: Bug in filter
Posted: 02 Sep 2018, 08:42
by Serebro200
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
Re: Bug in filter
Posted: 02 Sep 2018, 22:04
by Jan
Ok
Re: Bug in filter
Posted: 14 Sep 2018, 14:47
by Serebro200
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?
Re: Bug in filter
Posted: 15 Sep 2018, 14:17
by Jan
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:
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;
}
Please let me know if it is Ok.
Jan
Re: Bug in filter
Posted: 16 Sep 2018, 14:17
by Serebro200
Yes, filter displayed two point after fix, Thenks