Author Topic: products module not displaying corrent number of items  (Read 2891 times)

bunglehaze

  • Jr. Member
  • **
  • Posts: 487
products module not displaying corrent number of items
« on: January 28, 2012, 00:48:14 am »
As an example i have set my products module to display random products, 6 products in total and 6 in a row which unless I am missing something should show 6 products in total across the module space, for some reason though occasionally I get 6, sometimes 3 or 4 but most regularly only 5 products display and I cannot understand why, this has been the case since 2.0.0 stable as far as I remember. I do not use filter by category or anything similar and am using no overrides  - just a vanilla module.

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10400
  • VirtueMart Version: 3+
Re: products module not displaying corrent number of items
« Reply #1 on: January 28, 2012, 03:57:08 am »
are there html errors on the page?

are the products in the source?

is cache turned on?
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

bunglehaze

  • Jr. Member
  • **
  • Posts: 487
Re: products module not displaying corrent number of items
« Reply #2 on: February 01, 2012, 19:35:21 pm »
No errors, no cache turned on and all of the products are not appearing to be in the source - the example below is only showing 4 products where it is set to show 6, the next load might display 6, I might only get 3.

Code: [Select]
<div class="vmgroup">

<div class="vmproduct">
<div style="width:150px;float:left;padding:5px;text-align:center:margin-left:auto;margin-right:auto;">
<div class="spacer">
<a href="/shop/acantharus-frags/6-stage-200gal-item" title="6 Stage 200gal"><img src="/images/stories/virtuemart/product/resized/6_Stage_200gal_4b0c6720ded82_130x130.jpg" alt="6_Stage_200gal_4b0c6720ded82.jpg" class="featuredProductImage" border="0" /></a><div class="clear"></div> <a href="/shop/acantharus-frags/6-stage-200gal-item">6 Stage 200gal</a> <div class="clear"></div>£250.11 </div></div>
<div style="width:150px;float:left;padding:5px;text-align:center:margin-left:auto;margin-right:auto;">
<div class="spacer">
<a href="/shop/acantharus-frags/critterpack-3-item" title="Critterpack 3"><img src="/images/stories/virtuemart/product/resized/Critterpack_3_4a6638cba1183_130x130.jpg" alt="Critterpack_3_4a6638cba1183.jpg" class="featuredProductImage" border="0" /></a><div class="clear"></div> <a href="/shop/acantharus-frags/critterpack-3-item">Critterpack 3</a> <div class="clear"></div>£100.00 </div></div>

<div style="width:150px;float:left;padding:5px;text-align:center:margin-left:auto;margin-right:auto;">
<div class="spacer">
<a href="/shop/acantharus-frags/acan-ac16-item" title="Acan AC16"><img src="/images/stories/virtuemart/product/resized/acan_ac16_4edd0e4d62cd0_130x130.jpg" alt="acan_ac16_4edd0e4d62cd0" class="featuredProductImage" border="0" /></a><div class="clear"></div> <a href="/shop/acantharus-frags/acan-ac16-item">Acan AC16</a> <div class="clear"></div>£35.00 </div></div>
<div style="width:150px;float:left;padding:5px;text-align:center:margin-left:auto;margin-right:auto;">
<div class="spacer">
<a href="/shop/acantharus-frags/mushroom-4-item" title="Mushroom 4"><img src="/images/stories/virtuemart/product/resized/m4  9 [400x400]_130x130.jpg" alt="m4  9 [400x400]" class="featuredProductImage" border="0" /></a><div class="clear"></div> <a href="/shop/acantharus-frags/mushroom-4-item">Mushroom 4</a> <div class="clear"></div>£9.00 </div></div>
</div>

<br style='clear:both;' />

</div>

I currently have the cache turned on as it makes no difference either way but I turn it all off to develop and check these things - any ideas where this might be coming from?

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10400
  • VirtueMart Version: 3+
Re: products module not displaying corrent number of items
« Reply #3 on: February 01, 2012, 19:44:00 pm »
I cannot reproduce this error.

this is NOT standard
<div style="width:150px;float:left;
are you using a template override?

the width is a class, and it is calculated, by dividing 100/products per row
see here
https://dev.virtuemart.net/svn/virtuemart/trunk/virtuemart/modules/mod_virtuemart_product/tmpl/default.php


J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

bunglehaze

  • Jr. Member
  • **
  • Posts: 487
Re: products module not displaying corrent number of items
« Reply #4 on: February 01, 2012, 21:38:57 pm »
Sorry, that was an override but actually nothing that is different to the vanilla module as it happens. If I take the override out it does exactly the same

bunglehaze

  • Jr. Member
  • **
  • Posts: 487
Re: products module not displaying corrent number of items
« Reply #5 on: February 01, 2012, 21:41:40 pm »
vanilla module outputting 3,4,5 or 6 products.

Code: [Select]
<div class="vmgroup">

<div class="vmproduct">
<div class=" width16 floatleft"><div class="spacer">
<a href="/component/virtuemart/australian-corals/australian-a37-item?Itemid=0" title="Australian A37"><img src="/images/stories/virtuemart/product/resized/australian corals a37  130.00_130x130.jpg" alt="australian corals a37  130.00" class="featuredProductImage" border="0" /></a><div class="clear"></div> <a href="/component/virtuemart/australian-corals/australian-a37-item?Itemid=0">Australian A37</a> <div class="clear"></div>£130.00 </div></div>

<div class=" width16 floatleft"><div class="spacer">
<a href="/component/virtuemart/2011-12-30-13-05-404/nano-critterpack-1-item?Itemid=0" title="Nano Critterpack 1"><img src="/images/stories/virtuemart/product/resized/Nano_Critterpack_4c1a8452608dd_130x130.jpg" alt="Nano_Critterpack_4c1a8452608dd.jpg" class="featuredProductImage" border="0" /></a><div class="clear"></div> <a href="/component/virtuemart/2011-12-30-13-05-404/nano-critterpack-1-item?Itemid=0">Nano Critterpack 1</a> <div class="clear"></div>£31.00 </div></div>
<div class=" width16 floatleft"><div class="spacer">
<a href="/component/virtuemart/ricordeas/florida-ricordea-r25-item?Itemid=0" title="Florida Ricordea R25"><img src="/images/stories/virtuemart/product/resized/r25_130x130.jpg" alt="r25" class="featuredProductImage" border="0" /></a><div class="clear"></div> <a href="/component/virtuemart/ricordeas/florida-ricordea-r25-item?Itemid=0">Florida Ricordea R25</a> <div class="clear"></div>£16.99 </div></div>
<div class=" width16 floatleft"><div class="spacer">
<a href="/component/virtuemart/australian-frags/af-favia-frag3-item?Itemid=0" title="AF Favia Frag3"><img src="/images/stories/virtuemart/product/resized/AF_Favia_Frag3_4b0c4fffe360b_130x130.jpg" alt="AF_Favia_Frag3_4b0c4fffe360b.jpg" class="featuredProductImage" border="0" /></a><div class="clear"></div> <a href="/component/virtuemart/australian-frags/af-favia-frag3-item?Itemid=0">AF Favia Frag3</a> <div class="clear"></div>£15.00 </div></div>

</div>
<br style='clear:both;' />

</div>

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10400
  • VirtueMart Version: 3+
Re: products module not displaying corrent number of items
« Reply #6 on: February 01, 2012, 21:48:53 pm »
do you have "system cache" plugin enabled?
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

bunglehaze

  • Jr. Member
  • **
  • Posts: 487
Re: products module not displaying corrent number of items
« Reply #7 on: February 01, 2012, 21:49:40 pm »
no, no caches of any kind at all.

bunglehaze

  • Jr. Member
  • **
  • Posts: 487
Re: products module not displaying corrent number of items
« Reply #8 on: February 03, 2012, 01:28:24 am »
Any ideas where to even begin with this issue? It has me stumped.

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10400
  • VirtueMart Version: 3+
Re: products module not displaying corrent number of items
« Reply #9 on: February 03, 2012, 03:07:28 am »
try removing this

   $output = ob_get_clean();
   $cache->store($output, $key);
}
echo $output;


https://dev.virtuemart.net/svn/virtuemart/trunk/virtuemart/modules/mod_virtuemart_product/mod_virtuemart_product.php
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

bunglehaze

  • Jr. Member
  • **
  • Posts: 487
Re: products module not displaying corrent number of items
« Reply #10 on: February 03, 2012, 14:52:34 pm »
try removing this

   $output = ob_get_clean();
   $cache->store($output, $key);
}
echo $output;


https://dev.virtuemart.net/svn/virtuemart/trunk/virtuemart/modules/mod_virtuemart_product/mod_virtuemart_product.php

That just stops the page from loading the module and anything further down the page - in my case everything.

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10400
  • VirtueMart Version: 3+
Re: products module not displaying corrent number of items
« Reply #11 on: February 03, 2012, 15:22:31 pm »
ok, I honestly dont know what the problem could be
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

bunglehaze

  • Jr. Member
  • **
  • Posts: 487
Re: products module not displaying corrent number of items
« Reply #12 on: February 06, 2012, 13:40:06 pm »
I have gone and uninstalled all the VM component, AIO and then modules individually, made sure all the directories had gone for the modules and then installed it all again from scratch. Same problem occurs still so there must be a reason for it but I cannot see an obvious one, all of the reasons I would have thought might interfere have been eliminated such as caching etc.

It is very frustrating though as it makes an otherwise lovely looking shop look badly formatted

I have tested this on both the shop template of yootheme Cloud and the std atomic template - on both it changes between the correct number shown and less

whiteart

  • Beginner
  • *
  • Posts: 2
Re: products module not displaying corrent number of items
« Reply #13 on: May 15, 2012, 15:02:20 pm »
I have exactly the same problem. I had 2.0.3 installed and there wasn't any problem with this. It happened after upgrade to 2.0.6.