0

I'm trying to fix some nasty thing that happened to our store. We currently using Grid only display mode. Category has 192 products and settings are these: - List Mode: Grid Only; - Products per Page on Grid Allowed Values: 9,15,18,24,27,30; - Products per Page on Grid Default Value: 15; - Allow All Products per Page: No - Product listing Sort By: Best Value

It suppose to render 15 product and make all others available on other pages that should be selected through pagination.

Toolbar renders correct, It shows Grid Allowed Values in Dropdown. Pagination is also calculating number of pages correct (13 pages for 15 products per page options), but page rendered with all products from this category at once.

I've tried limit them by adding ?limit=30 to URL, but no reaction.

I've google it and found out that it could happen if collection is loaded before it is limited. Theme is customized, but mostly styles and html.

I even replaced customized /catalog/product/list.phtml with original one (from base), but it is still outputs all products at once.

local.xml is also not changing standard layout. Backend -> Catalog -> Manage Categories - > This Category -> Custom Design Tab is also with no customization.

Here what I have in list.phtml

Beginning:

<?php
    $_productCollection=$this->getLoadedProductCollection();
    $_helper = $this->helper('catalog/output');
?>

Grid mode loop:

<?php // Grid Mode ?>
<?php $_collectionSize = $_productCollection->count() ?>
<?php $_columnCount = $this->getColumnCount(); ?>
<?php $i=0; foreach ($_productCollection as $_product): ?>
    <?php if ($i++%$_columnCount==0): ?>
    <ul class="products-grid text-center row">
    <?php endif ?>

/* here is product image, name, price code */

<?php if ($i%$_columnCount==0 || $i==$_collectionSize): ?>
    </ul>
    <?php endif ?>
    <?php endforeach ?>
    <script type="text/javascript">decorateGeneric($$('ul.products-grid'), ['odd','even','first','last'])</script>

Any help will be appreciated.

Thanks

  • I hope you are not using ajax auto load method. Like this turnkeye.com/blog/loading-products-with-ajax – Adarsh Khatri Apr 16 '15 at 23:51
  • @AdarshKhatri No, we didn't changed core functions. They supposed to load as usual. – Sharif Apr 17 '15 at 12:40
  • Then, I would replace original catalog.xml file - path_to_your_theme/layout/catalog.xml and see if it helps. Also could you give your live link here? – Adarsh Khatri Apr 17 '15 at 17:31
  • Yeah, I've played with catalog.xml all directives are remained unchanged. Page itself is here doorsandbeyond.com/interior-door-handles – Sharif Apr 17 '15 at 19:02
  • I even loaded category in default Magento theme (changed Custom Design dropdown in Category's configuration). It does not any change. You can see in screenshot here: yadi.sk/i/AFSaqTi1g4vbJ – Sharif Apr 17 '15 at 19:17
2

First, I think somewhere core function is customized. For example this file - /app/code/core/Mage/Catalog/Block/Product/New.php Please check this link.

Check your app/code/local folder and check if it has mage/catalog/block/product/new.php file. If it is there, remove/rename it for testing.

Also, some extension might have playing role, you need to disable all external extension from etc/modules and see if that helps.

Only problem I can see is your system not counting products right for the pages.

If all of these doesn't helps, I would replace all core files in app/code/core/mage with clean files of same version.

But remember make backup of all the files and database before doing any of these.

  • Hi @Adarsh I've checked '/app/code/local' there's no modification on catalog view. As well as in New.php. Moreover, I've replaced core files in '/app/code/core/Mage/Catalog/Block/Product' with original files, flushed caches, but nothing happened. It is still generating all products at once. Now I'll dig into extensions. – Sharif Apr 20 '15 at 15:30
  • Maybe it could help. This is result of '<?php echo $_productCollection->getSelect(); ?>' pastebin.com/adXJF3ef – Sharif Apr 20 '15 at 16:23
  • One more strange thing that Sort by and Sorting asc desc also not working. I mean there is no reaction when changing sort position and direction. – Sharif Apr 20 '15 at 19:56
  • Then it could be your catalog/product/list/toolbar.phtml, try replacing org. file in phtml as well as php file for both. – Adarsh Khatri Apr 21 '15 at 0:12
  • Finally I found what was the cause for this bug. Extension named Qubit Universal Variable (Tag manager). Thanks for your contribution. I will Accept your answer as it guided me to find the cause. – Sharif May 18 '15 at 20:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.