VirtueMart Forum

VirtueMart 2 + 3 => Virtuemart Development and bug reports => Topic started by: El_Loboo on September 07, 2013, 03:20:15 am

Title: Limit products box problem
Post by: El_Loboo on September 07, 2013, 03:20:15 am
Hi all,

I'm using Joomla 2.5.8 and VM 2.0.22

The limit products box not working for me since I upgrade to VM 2.0.22. I have been testing different configurations from backend but I think it's a code bug.

You can see this problem in any category, here for example: http://www.juguetitossex.es/juguetes-xxx/vibradores/vibradores

Limit products box display: 100,250,20,25 and 50, but not in descending order. If I choose any such values the page always display 20 products. I have spent much time in last days but I don't get fix it.

Anybody can help me, please?

My website is www.juguetitossex.es

Regards
Title: Re: Limit products box problem
Post by: Maxim Pishnyak on September 07, 2013, 15:53:35 pm
Limit products box display: 100,250,20,25 and 50, but not in descending order. If I choose any such values the page always display 20 products. I have spent much time in last days but I don't get fix it.
These values are from VM configuration or from category settings?
Title: Re: Limit products box problem
Post by: El_Loboo on September 07, 2013, 16:34:21 pm
Hi Maxim,

Both is empty. I've attach two images, the first for category settings and second one for VM configuration. I don't know why VM display these values but I've tried change these values and nothing changes.

It's very strange because if I select value '100' URL display this:

http://www.juguetitossex.es/juguetes-xxx/vibradores/vibradores-lengua/results,1-100

but it always display 20 in box products limit.



[attachment cleanup by admin]
Title: Re: Limit products box problem
Post by: Maxim Pishnyak on September 08, 2013, 10:05:59 am
At this point I suggest you to install demo VM shop somewhere and check what recommend values are necessary for those screens that you are looking at now.
Title: Re: Limit products box problem
Post by: Milbo on September 08, 2013, 12:38:20 pm
The answer is relativly simple. As long there is only one value, it assumes that the values are old values and therefore it just uses the dynamic system and just adds your set 20. Remove the 20 everywhere completly or write a list with at least 2 items, for example 20,50
Title: Re: Limit products box problem
Post by: El_Loboo on September 21, 2013, 16:17:55 pm
Hi,

I'm sure it's a bug code. I restored all default values for products display and not works properly. I get a blank page many times with default values and I must refresh page to display products and no works fine, select box numbers are displayed disordered, when I select a number to display some values dissapear... many errors.

I've tried reprogramming /administrator/components/com_virtuemart/helpers/vmmodel.php or replacing with vmmodel from a previous version that works fine but not works with this VM version. Also I've tried upgrading yo 2.0.22d and the problem persists.

Select box number depends on vmmodel.php and... which other/s file/s?

P.S: I know people with the same problem
Title: Re: Limit products box problem
Post by: Maxim Pishnyak on September 21, 2013, 19:02:21 pm
You could pm me access and I could look into this probably misconfiguration issue.
Title: Re: Limit products box problem
Post by: michelming on September 21, 2013, 19:45:23 pm
Hi,

I also tested a variety of different settings, indeed can not work properly, when you select a digit, it also returns to the original default number ...
Title: Re: Limit products box problem
Post by: Maxim Pishnyak on September 22, 2013, 08:30:43 am
Probably you need to have menu item for VM Categories (Top Level of VM Categories) in your 'Menú de usuario' menus.

Using cache is not welcome for VM also. BTW I wasn't able to test without cache cos I had only admin (not superadmin) access.

Did you try on standard Joomla template?
Title: Re: Limit products box problem
Post by: El_Loboo on September 22, 2013, 12:52:52 pm
Hi Maxim,

Probably you need to have menu item for VM Categories (Top Level of VM Categories) in your 'Menú de usuario' menus.

I've tried that with a backup in localhost and doesn't work. I've deleted all categories and only one parent category to display products, select box number doesn't work. On the other hand, I've spent much time to sort the categories, nearly 10.000 products, is important to have a good menu item distribution and easily accesible.

Using cache is not welcome for VM also. BTW I wasn't able to test without cache cos I had only admin (not superadmin) access.

I know cache is not welcome for VM hehehe. I've had many problems with cache and VM but have been resolved. Incorrect select box number is not cache problem, I've tested.

Did you try on standard Joomla template?

I've changed to others templates like beez or atomic, the problem persists.

I changed the permissions, you now have super admin permission but be careful please, website is actually operating and I would not want to stop working page.

Regards.
Title: Re: Limit products box problem
Post by: Maxim Pishnyak on September 22, 2013, 13:15:58 pm
I'll take a look at night then.
Title: Re: Limit products box problem
Post by: El_Loboo on September 26, 2013, 23:19:08 pm
Hi Maxim,

I sent you two private message in last days, have you seen?
Title: Re: Limit products box problem
Post by: Maxim Pishnyak on September 27, 2013, 10:24:43 am
Sorry for late reply. I'm working on your issue currently.
Title: Re: Limit products box problem
Post by: Maxim Pishnyak on September 27, 2013, 10:52:28 am
Using cache is not welcome for VM also. BTW I wasn't able to test without cache cos I had only admin (not superadmin) access.

I know cache is not welcome for VM hehehe. I've had many problems with cache and VM but have been resolved. Incorrect select box number is not cache problem, I've tested.
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.
Title: Re: Limit products box problem
Post by: michelming on September 27, 2013, 17:33:02 pm
Hi El_Loboo

I also have the same problem. Your problem solved?
Title: Re: Limit products box problem
Post by: El_Loboo on September 27, 2013, 19:42:36 pm
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:

      
Code: [Select]
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:

Code: [Select]
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?
Title: Re: Limit products box problem
Post by: michelming on September 28, 2013, 08:09:40 am
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]
Title: Re: Limit products box problem
Post by: El_Loboo on September 28, 2013, 13:16:40 pm
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:

Quote
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 );
         }
To:
Code: [Select]
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.
Title: Re: Limit products box problem
Post by: michelming on September 28, 2013, 15:19:25 pm
Hi El_Loboo

Try setting you change it. See additional pictures.

[attachment cleanup by admin]
Title: Re: Limit products box problem
Post by: Milbo on September 29, 2013, 13:41:14 pm
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.
Title: Re: Limit products box problem
Post by: Maxim Pishnyak on September 30, 2013, 07:14:45 am
Hi El_Loboo

I also have the same problem. Your problem solved?
Then use solution provided by me to him.
Title: Re: Limit products box problem
Post by: El_Loboo on October 06, 2013, 16:02:35 pm
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.

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...

Title: Re: Limit products box problem
Post by: Milbo on October 23, 2013, 11:55:24 am
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.
Title: Re: Limit products box problem
Post by: MarioP on October 23, 2013, 15:29:58 pm
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]
Title: Re: Limit products box problem
Post by: Milbo on October 23, 2013, 16:55:16 pm
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.
Title: Re: Limit products box problem
Post by: MarioP on October 23, 2013, 19:52:27 pm
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?
Title: Re: Limit products box problem
Post by: Milbo on October 23, 2013, 19:54:47 pm
Hmmm maybe it is connected to multilanguage and SEF? Which SEF settings do you use? rewriting?
Title: Re: Limit products box problem
Post by: MarioP on October 23, 2013, 20:19:06 pm
Yes, I use Joomla Apache mod_rewrite/URL rewriting
Title: Re: Limit products box problem
Post by: 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.....
Title: Re: Limit products box problem
Post by: Milbo on October 25, 2013, 11:18:01 am
what happens when you disable your SEF?

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.
Title: Re: Limit products box problem
Post by: MarioP on October 25, 2013, 11:47:08 am
Joomla! SEF disabled: the same result as when it's enabled: http://www.multitest.hekko.pl/index.php/en/katalog-produktow-3/kolumny-pasywne/stage-black/results,1-15?language=en-GB&filter_product=
Title: Re: Limit products box problem
Post by: NorxMAL on October 25, 2013, 15:17:56 pm
I too have problems with the pagination.

It is stuck on 10, like yours Milbo, even though I have set "Frontend default items per list view" to 20.

I have tried changing to a standard joomla template and default category template, but then I get no other choice than 10 from the droplist.

If I use my own template, it shows the values I have chosen in virtuemart configuration, but choosing any of them still makes it only show 10.

Joomla  2.5.14
Virtuemart 2.0.24
All Sef is off and cache is turned off
The frontside language is not English

I got this problem when I updated to  2.0.24
I usually always get problems with pagination in virtuemart each time I upgrade virtuemart in some way or the other :(

I do consider this a bug also, that using catalogue mode, and using "Do not display product" in "Action when a Product is Out of Stock" makes the pagination totally wack. If pagination is set to 10 for example, it can show 2 products on one page, 5 on the next one then perhaps 10. So if only 2 products are showing on one page, it means 8 products are out of stock but it doesn't replace them with products that are. I also think the counter it generates for products in a category also includes items that are out of stock.
Title: Re: Limit products box problem
Post by: Milbo on October 25, 2013, 20:03:43 pm
You may give me BE access. I have still no clue, because I cannot reproduce it.
Title: Re: Limit products box problem
Post by: MarioP on October 28, 2013, 10:06:37 am
I see that in VM forum we can find more threads concerning the issue with listbox.

http://forum.virtuemart.net/index.php?topic=117436.msg399317#msg399317
http://forum.virtuemart.net/index.php?topic=119667.msg407259#msg407259
https://forum.virtuemart.net/index.php?topic=117111.0

Did anybody manage to solve the problem? Of course we can solve it partially by removing values from category settings - VM will use the global configuration and it works great.. But what about category setting?? When we set 'initial number of listed items' the listbox stops work.... I also tried change temple to Joomla! standard, SEO enable/ disable, many different settings of VM, nothing worked... Maybe someone found a clue to solve the problem.....
Title: Re: Limit products box problem
Post by: Milbo on October 28, 2013, 11:30:30 am
Maybe I found the reason in the vmmodel, in case you are using another pagination module, then the default

line 741 is atm
Code: [Select]
if(!array_key_exists($this->limit,$limits)){
$limits[] = JHTML::_('select.option', JRoute::_( $link.'&limit='.$this->limit,false),$this->limit);
ksort($limits);
}

should be

Code: [Select]
if(!array_key_exists($this->limit,$limits)){
$limits[$this->limit] = JHTML::_('select.option', JRoute::_( $link.'&limit='.$this->limit,false),$this->limit);
ksort($limits);
}
Title: Re: Limit products box problem
Post by: MarioP on October 28, 2013, 11:45:14 am
Do you mean this file: vmmodel.php in /my domain/public_html/administrator/components/com_virtuemart/helpers ? This code is in line 725...
Title: Re: Limit products box problem
Post by: Milbo on October 28, 2013, 11:59:51 am
Maybe, because I work on the new version, we wanna release today.

found the next problem at product model around line 593

Code: [Select]
if(!empty($category->limit_list_initial)){

must be

Code: [Select]
if(empty($limit) and !empty($category->limit_list_initial)){
Title: Re: Limit products box problem
Post by: MarioP on October 28, 2013, 12:44:10 pm
First test with suggested changes and finally it seems to be work!
Title: Re: Limit products box problem
Post by: NorxMAL on October 30, 2013, 09:35:44 am
Yay, it works for me too now! :)

Did the changes Milbo wrote to
/administrator/components/com_virtuemart/helpers/vmmodel.php
/administrator/components/com_virtuemart/models/product.php

then it all worked again :)

Still the problem in catalogue mode, but I just removed all the cart functionality from my templates to overcome that for now :P
Title: Re: Limit products box problem
Post by: aadilk4 on November 07, 2013, 13:22:07 pm
howsit guys, please assist me, having this same issue, and i cant come right! ive tried the reccomended method from the forums but none helps,

my site is www.metrolifestyle.co.za

thanking you!