- Posts: 25
- Thank you received: 1
Problems with the list of products in parent category.
7 years 2 months ago - 7 years 2 months ago #308976
by alisse
Problems with the list of products in parent category. was created by alisse
-- HikaShop version -- : 4.2.0
-- Joomla version -- : 3.9.8
-- PHP version -- : 7
Hi, After the update, I have problems with the list of products in parent category.
I have a menu with list of categories, and that shows the sub-elements of the child categories, but there are products that do not belong to these categories.
The list of all products on the web appears, this before the update did not happen.
Looking at the files the problem is generated by the new file listing_div.php
I forgot to mention what happens using infinite scroll
Note: I do update in local environment.
Thanks for your help!
-- Joomla version -- : 3.9.8
-- PHP version -- : 7
Hi, After the update, I have problems with the list of products in parent category.
I have a menu with list of categories, and that shows the sub-elements of the child categories, but there are products that do not belong to these categories.
The list of all products on the web appears, this before the update did not happen.
Looking at the files the problem is generated by the new file listing_div.php
I forgot to mention what happens using infinite scroll
Note: I do update in local environment.
Thanks for your help!
Last edit: 7 years 2 months ago by alisse.
Please Log in or Create an account to join the conversation.
7 years 2 months ago - 7 years 2 months ago #308999
by Philip
Replied by Philip on topic Problems with the list of products in parent category.
Hello,
Can you try the function "Rebuild" to see if that solve your issue.
Sometimes an update can have an impact on category tree, this is why you have this function.
To be more complete on my answer the 4.2.0 release didn't change the listing div view, but maybe your root issue don't come from the view.
If that don't solve your issue can you provide more elements like :
- Category tree screenshot
- Listing div configuration screenshot
- Url link to your listing div frontend page.
Awaiting news from you.
Regards
Can you try the function "Rebuild" to see if that solve your issue.
Sometimes an update can have an impact on category tree, this is why you have this function.
To be more complete on my answer the 4.2.0 release didn't change the listing div view, but maybe your root issue don't come from the view.
If that don't solve your issue can you provide more elements like :
- Category tree screenshot
- Listing div configuration screenshot
- Url link to your listing div frontend page.
Awaiting news from you.
Regards
Last edit: 7 years 2 months ago by Philip.
Please Log in or Create an account to join the conversation.
7 years 2 months ago #309024
by alisse
Replied by alisse on topic Problems with the list of products in parent category.
Hello, Phillip
Thanks for answering,
Yes, it was the first thing I did, it did not work.
I have a template override of the listing_div.php view of the previous version, so it works well, when I use the 4.2.0 update, the list changes, shows products that do not belong to the parent category.
The son categories work well.
When the update comes out I update all the files that I have changed for my template. I tried to do it with this file but this problem happened.
Try to try a new menu item, but the Infinite scroll does not work, and I can not see more products.
this is the only change I have in the file of the previous version.
Thank you for your help, please help me understand what happens, or how I can solve this
Thanks for answering,
Yes, it was the first thing I did, it did not work.
I have a template override of the listing_div.php view of the previous version, so it works well, when I use the 4.2.0 update, the list changes, shows products that do not belong to the parent category.
The son categories work well.
When the update comes out I update all the files that I have changed for my template. I tried to do it with this file but this problem happened.
Try to try a new menu item, but the Infinite scroll does not work, and I can not see more products.
this is the only change I have in the file of the previous version.
Thank you for your help, please help me understand what happens, or how I can solve this
Please Log in or Create an account to join the conversation.
7 years 2 months ago #309025
by alisse
Replied by alisse on topic Problems with the list of products in parent category.
Please Log in or Create an account to join the conversation.
7 years 2 months ago #309031
by nicolas
Replied by nicolas on topic Problems with the list of products in parent category.
Hi,
There are a bit more changes to the listing_div.php view file in the 4.2.0 release.
Here is a diff of all the changes:
Also, note that we had to add several patchs today for the filter system. So if you have issues with it, I would recommend downloading again the install package on our website and installing it on yours to get the patchs.
There are a bit more changes to the listing_div.php view file in the 4.2.0 release.
Here is a diff of all the changes:
Code:
Index: listing_div.php
===================================================================
--- listing_div.php (revision 12671)
+++ listing_div.php (revision 12796)
@@ -8,7 +8,7 @@
}
$mainDivName = $this->params->get('main_div_name', '');
-$enableCarousel = (int)$this->params->get('enable_carousel', 0);
+$enableCarousel = (int)$this->params->get('enable_carousel', 0) && $this->module;
$infinite_scroll = !$enableCarousel && ((int)$this->params->get('infinite_scroll', 0) == 1) && ((int)$this->params->get('random', 0) == 0);
$this->align = (((int)$this->params->get('text_center') == 0) ? 'left' : 'center');
@@ -50,9 +50,9 @@
if(in_array($pagination, array('top', 'both')) && $this->params->get('show_limit') && $this->pageInfo->elements->total && !$infinite_scroll) {
$this->pagination->form = '_top';
?>
-<form action="<?php echo hikashop_currentURL(); ?>" method="post" name="adminForm_<?php echo $mainDivName . $this->category_selected; ?>_top">
+<form action="<?php echo str_replace('&tmpl=raw', '', hikashop_currentURL()); ?>" method="post" name="adminForm_<?php echo $mainDivName . $this->category_selected; ?>_top">
<div class="hikashop_products_pagination hikashop_products_pagination_top">
- <?php echo $this->pagination->getListFooter($this->params->get('limit')); ?>
+ <?php echo str_replace('&tmpl=raw','', $this->pagination->getListFooter($this->params->get('limit'))); ?>
<span class="hikashop_results_counter"><?php echo $this->pagination->getResultsCounter(); ?></span>
</div>
<input type="hidden" name="filter_order_<?php echo $mainDivName . $this->category_selected; ?>" value="<?php echo $this->pageInfo->filter->order->value; ?>" />
@@ -115,10 +115,10 @@
else
echo '<div class="hk-row-fluid hk-row-'.$row_fluid.'">';
- $itemLayoutType = $this->params->get('div_item_layout_type');
-
+ $itemLayoutType = $this->params->get('div_item_layout_type');
+
foreach($this->rows as $row) {
-?>
+?>
<div class="hkc-md-<?php echo (int)$span; ?> hikashop_product hikashop_product_column_<?php echo $current_column; ?> hikashop_product_row_<?php echo $current_row; ?>"
itemprop="itemList" itemscope="" itemtype="http://schema.org/ItemList">
<div class="hikashop_container">
@@ -130,10 +130,10 @@
$this->setLayout('listing_' . $itemLayoutType);
echo $this->loadTemplate();
unset($this->row);
-?>
+?>
</div>
</div>
- </div>
+ </div>
<?php
if($current_column >= $columns) {
$current_row++;
@@ -178,6 +178,10 @@
$filters_params .= '&'.$name . '=' . $value;
}
}
+ $cid = '';
+ if($this->categoryFromURL)
+ $cid = '&cid='.(int)(is_array($this->pageInfo->filter->cid) ? reset($this->pageInfo->filter->cid) : $this->pageInfo->filter->cid);
+
?>
<div class="hikashop_infinite_scroll" id="<?php echo $mainDivName; ?>_infinite_scroll">
<a href="#" onclick="return window.localPage.infiniteScroll('<?php echo $mainDivName; ?>');">
@@ -203,7 +207,7 @@
container.loading = true;
o.addClass(container, 'loading');
- var url = '<?php echo HIKASHOP_LIVE; ?>index.php?option=com_hikashop&ctrl=product&task=listing&cid=<?php echo (int)(is_array($this->pageInfo->filter->cid) ? reset($this->pageInfo->filter->cid) : $this->pageInfo->filter->cid); ?>&limitstart=HIKAPAGE<?php echo $filters_params; ?>&Itemid=<?php echo (int)$Itemid; ?>&tmpl=raw';
+ var url = '<?php echo HIKASHOP_LIVE; ?>index.php?option=com_hikashop&ctrl=product&task=listing<?php echo $cid; ?>&limitstart=HIKAPAGE<?php echo $filters_params; ?>&Itemid=<?php echo (int)$Itemid; ?>&tmpl=raw';
url = url.replace(/HIKAPAGE/g, <?php echo (int)$this->pageInfo->limit->value; ?> * window.localPage.infiniteScrollPage);
o.xRequest(url, null, function(xhr) {
if(xhr.responseText.length == 0) {
@@ -303,9 +307,9 @@
if(in_array($pagination, array('bottom', 'both')) && $this->params->get('show_limit') && $this->pageInfo->elements->total && !$infinite_scroll) {
$this->pagination->form = '_bottom';
?>
-<form action="<?php echo hikashop_currentURL(); ?>" method="post" name="adminForm_<?php echo $mainDivName . $this->category_selected; ?>_bottom">
+<form action="<?php echo str_replace('&tmpl=raw', '', hikashop_currentURL()); ?>" method="post" name="adminForm_<?php echo $mainDivName . $this->category_selected; ?>_bottom">
<div class="hikashop_products_pagination hikashop_products_pagination_bottom">
- <?php echo $this->pagination->getListFooter($this->params->get('limit')); ?>
+ <?php echo str_replace('&tmpl=raw','', $this->pagination->getListFooter($this->params->get('limit'))); ?>
<span class="hikashop_results_counter"><?php echo $this->pagination->getResultsCounter(); ?></span>
</div>
<input type="hidden" name="filter_order_<?php echo $mainDivName . $this->category_selected; ?>" value="<?php echo $this->pageInfo->filter->order->value; ?>" />
Please Log in or Create an account to join the conversation.
7 years 2 months ago #309061
by alisse
Replied by alisse on topic Problems with the list of products in parent category.
Hi, Nicolas.
I installed it again, but the only thing that improved is the infinite scroll, the products in the categories remain the same, showing podructs that do not belong.
Thank you
I installed it again, but the only thing that improved is the infinite scroll, the products in the categories remain the same, showing podructs that do not belong.
Thank you
Please Log in or Create an account to join the conversation.
7 years 2 months ago #309064
by nicolas
Replied by nicolas on topic Problems with the list of products in parent category.
Hi,
Then, we'll need to look into the situation as we don't have the problem on our end.
Please provide a link to the page with the issue, a backend access, a FTP access, a link to this thread and precise information on a product displaying while it shouldn't so that we can look into it.
Please send that via our contact form:
www.hikashop.com/support/contact-us.html
Then, we'll need to look into the situation as we don't have the problem on our end.
Please provide a link to the page with the issue, a backend access, a FTP access, a link to this thread and precise information on a product displaying while it shouldn't so that we can look into it.
Please send that via our contact form:
www.hikashop.com/support/contact-us.html
Please Log in or Create an account to join the conversation.
Time to create page: 0.178 seconds