News:

Support the VirtueMart project and become a member

Main Menu

Limit products box problem

Started by El_Loboo, September 07, 2013, 03:20:15 AM

Previous topic - Next topic

El_Loboo

Hi michelming,

I managed to fix it but not completely.

It's not a cache problem. Without the cache works only for '20' or '25' (in my case), for 100 or 250 I get always a blank page. I'm researching, the problem occur when you choice a value of 34 or higher. You check this going to administrator\components\com_virtuemart\models in line 620:

       if(empty($limit)){
$limit = 30;
}
}


This part of code displays initial value when in VM administration is empty. If you select any value to 33 it displays correctly but if you choice 34 or higher you will get a blank page. The only way I've got to do work is setting values ​​for less than 33. In administrator\components\com_virtuemart\helpers in line 721:

if(empty($limits) or !is_array($limits)){
if($this->_perRow===1) $this->_perRow = 5;
$limits[] = JHtml::_('select.option',JRoute::_( $link.'&limit='. $this->_perRow * 5, false) ,$this->_perRow * 5);
$limits[] = JHTML::_('select.option',JRoute::_( $link.'&limit='. $this->_perRow * 10, false) , $this->_perRow * 10 );
$limits[] = JHTML::_('select.option',JRoute::_( $link.'&limit='. $this->_perRow * 20, false) , $this->_perRow * 20 );
$limits[] = JHTML::_('select.option',JRoute::_( $link.'&limit='. $this->_perRow * 20, false) , $this->_perRow * 50 );
}


You can see this here: http://www.juguetitossex.es/juguetes-xxx/vibradores/vibradores

Not works perfectly, numbers not display ordering (10,20,25,30,5) but this problem occur with cache deactivated.

Why when you select a value of 33 or greater is this happening?

michelming

#16
Hi El_Loboo

I made repeated testing, the problem seems to come to resolve.

In the category settings, do not set any, keep the default;
In the configuration, set your 'Frontend default items per list view' and 'items per row'.

Should now display correctly

It seems, 'Number of Products per Row', 'Category Pagination Sequence' and 'Initial number of listed items' in the category settings where there are still problems, how to fix?

I'm sorry, my site has not been released, so I can not provide browsing.

[attachment cleanup by admin]

El_Loboo

Hi,

'Max items listed displaying media' = 0
'Backend default items per list views'= 12
'Frontend default items per list views'= 12
'For 4 items per row' = 0

Now you are going to administrator\components\com_virtuemart\helpers in line 721 and replace this:

Quoteif(empty($limits) or !is_array($limits)){
            if($this->_perRow===1) $this->_perRow = 5;
            $limits[] = JHtml::_('select.option',JRoute::_( $link.'&limit='. $this->_perRow * 5, false) ,$this->_perRow * 5);
            $limits[] = JHTML::_('select.option',JRoute::_( $link.'&limit='. $this->_perRow * 10, false) , $this->_perRow * 10 );
            $limits[] = JHTML::_('select.option',JRoute::_( $link.'&limit='. $this->_perRow * 20, false) , $this->_perRow * 20 );
            $limits[] = JHTML::_('select.option',JRoute::_( $link.'&limit='. $this->_perRow * 20, false) , $this->_perRow * 50 );
         }
To:
if(empty($limits) or !is_array($limits)){
if($this->_perRow===1) $this->_perRow = 4;
$limits[] = JHtml::_('select.option',JRoute::_( $link.'&limit='. $this->_perRow * 2, false) ,$this->_perRow * 2);
$limits[] = JHTML::_('select.option',JRoute::_( $link.'&limit='. $this->_perRow * 4, false) , $this->_perRow * 4 );
$limits[] = JHTML::_('select.option',JRoute::_( $link.'&limit='. $this->_perRow * 6, false) , $this->_perRow * 6 );
$limits[] = JHTML::_('select.option',JRoute::_( $link.'&limit='. $this->_perRow * 8, false) , $this->_perRow * 8 );
}


Your pagination would be: 4,8,16,24,32. You can try configuring higher values, in my case values to 34 or higher not works. This is the way I used to make work, I hope it would be helpful for you.

michelming

#18
Hi El_Loboo

Try setting you change it. See additional pictures.

[attachment cleanup by admin]

Milbo

I am 100% sure that you have just wrong configuration settings. I suggest to remove any setting done in the categories and to learn first to use the setting in the vm config. Then you may think about to override it.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Maxim Pishnyak

Quote from: michelming on September 27, 2013, 17:33:02 PM
Hi El_Loboo

I also have the same problem. Your problem solved?
Then use solution provided by me to him.
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart

El_Loboo

Hi Milbo,

It's possible that I have a wrong configuration but I've tested a lot of configurations. The last one I delete all values for limit_list_start, limit_list_step, limit_list_max and limit_list_initial from *_virtuemart_categories from BBDD but problem persists.

Quote from: Maxim Pishnyak on September 27, 2013, 10:52:28 AM
But you still have your cache filled after you had turned off this option. Why? Cos template provider provides also own cache plugins. That was your issue.

This is not a solution for me, as I said I tested without cache activated and not works. Cache was filled when you tried to emptied because I use a cache combination, template provides an option to compress css files, is this what you saw. But repeat, I tested in localhost and doesn't work.

Two days ago I´ve upgraded VM to 2.0.24 but problem still occurs. I removed all category settings, and global settings for product displayed but anything works.

I do not know what else to do...


Milbo

There was someone other finding the reason for the blank page. It is when you set no value to the initial listing or so. Anyway I think I fixed it. There will be a vm2.0.24a now.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

MarioP

#23
The same (or similar problem). Regardless the chosen value in limit products box ( front end, VM category view) there's always appear value (amount of products) assigned to 'initial number of listed items' set in category details.
My VM overall back end settings (see attachment 1)
My VM specific category settings (see attachment 2)
Example on my site : http://www.multitest.hekko.pl/en/katalog-produktow-3/kolumny-pasywne/stage-black
Joomla 2.5.14
VM 2.0.24

Value 10 in back end settings is only example, whatever value I set the problem is the same.

[attachment cleanup by admin]

Milbo

I am sorry, I cant reproduce it.

In fact correct are corrections.

For example I want 3 products per row and I give a start listing of 10, then I get 9 and it is added to my standard of 15, 30, 60, and 150.

10 would not fit on one page, so it is corrected to 9 and added to the box.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

MarioP

Maybe this problem concerns multilanguage sites ( I have some strange url when I choose the value in the limit box - http://www.multitest.hekko.pl/en/katalog-produktow-3/kolumny-pasywne/stage-black/results,1-15?language=en-GB&filter_product= ) I'm not a programmer and sorry if I ask strange question but is the url correct?

Milbo

Hmmm maybe it is connected to multilanguage and SEF? Which SEF settings do you use? rewriting?
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

MarioP

Yes, I use Joomla Apache mod_rewrite/URL rewriting

MarioP

#28
My test: VM SEO disabled and the same action performed: I have the following result (url) /stage-black/language/en-GB/view/category/virtuemart_category_id/24/filter_product/keyword/limit/15
- on the front page appears 'Search in shop' form.....

Milbo

what happens when you disable your SEF?

Quote from: MarioP on October 24, 2013, 21:50:05 PM
My test: VM SEO disabled and the same action performed: I have the following result (url) /stage-black/language/en-GB/view/category/virtuemart_category_id/24/filter_product/keyword/limit/15
- on the front page appears 'Search in shop' form.....

=> Your SEF is still active. You must disable it in joomla.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/