VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: slammy on July 02, 2012, 14:10:03 PM

Title: only 8 products per view with 2.0.8_a
Post by: slammy on July 02, 2012, 14:10:03 PM
Hi,

since I update to stable_version 2.0.8_a my category-views show 8 products and I have to use site 2, site 3 .... . the configuration option under configuration->shopfront "max number of products per frontend-site" seems to be not functional. I can left it empty, take 32 or 64 - but always only 8 products are shown and I have to switch.
Title: Re: only 8 products per view with 2.0.8_a
Post by: slammy on July 02, 2012, 14:22:19 PM
I found out that I must use the configuration for max products in the category configuration to get more than 8 products in one view/site, this works - but it would be fine if global configuration would be function again. regards slam
Title: Re: only 8 products per view with 2.0.8_a
Post by: Milbo on July 02, 2012, 23:41:02 PM
Please try this file, just remove the .txt and upload it to /administrator/components/com_virtuemart/models

Thanks

[attachment cleanup by admin]
Title: Re: only 8 products per view with 2.0.8_a
Post by: slammy on July 03, 2012, 15:46:22 PM
Hi Milbo,

thx for ur post and file. Will test it today evening and get back then here ... regards slam
Title: Re: only 8 products per view with 2.0.8_a
Post by: slammy on July 04, 2012, 00:06:35 AM
Hi Milbo,

I´ve upload product.php to /administrator/components/com_virtuemart/models/ but it remains the same, only 8 products per page shows up. I  just updated to vm 2.0.8_b and its the same -> 8 products. I did every step once with jml 2.5.4 and 2.5.6, it remains the same.

Maybe this is interesting for you, I did two backups with first stable release version vm2.0.8 (which is currently not available at dev.virtuemart.net anymore so I am a lucky guy), and jml 2.5.4 and 2.5.6. In all of these "seetings" the global parameter for setting up max products work, hope this information is useful.

regards slam
Title: Re: only 8 products per view with 2.0.8_a
Post by: Milbo on July 04, 2012, 01:50:12 AM
You must check your values in the config and the category. Please read here http://forum.virtuemart.net/index.php?topic=104707.0
Title: Re: only 8 products per view with 2.0.8_a
Post by: slammy on July 04, 2012, 13:08:02 PM
Hi Milbo,

hm, for me it remains the same with the code snippet you mentioned in the other linked threat (last post from u) - which is already included in 2.0.8_b.
If I have to use category configuration for max products its okay for me, but global configuration was better for the lazy ones.

regards slam
Title: Re: only 8 products per view with 2.0.8_a
Post by: BaidareW on July 04, 2012, 21:20:22 PM
For me the same in 2.0.8b - in category view I see only 8 products, but configuration not changed before update to 2.0.8b

And paging option shows up (see picture).

[attachment cleanup by admin]
Title: Re: only 8 products per view with 2.0.8_a
Post by: BaidareW on July 05, 2012, 21:26:51 PM
Not fixed in 2.0.8c
Title: Re: only 8 products per view with 2.0.8_a
Post by: Milbo on July 05, 2012, 22:11:13 PM
What exactly is not solved?
Title: Re: only 8 products per view with 2.0.8_a
Post by: BaidareW on July 06, 2012, 10:14:33 AM
Well I still have only 8 products in category view no matter what I set in configuration. I see that some code is provided, but I found that it is already included in 2.0.8c. If it is fixed in virtuemart, maybe now template override good settings ? But in 2.0.7 everything (in category view) was OK.
Title: Re: only 8 products per view with 2.0.8_a
Post by: Milbo on July 06, 2012, 13:45:35 PM
no in 2.0.7 was nothing okey, the error just did not appeared in your case.
Title: Re: only 8 products per view with 2.0.8_a
Post by: BaidareW on July 06, 2012, 13:47:33 PM
But it worked for me :)

So what solution would be now ? How to get rid of pagination (see attachment) and to show all products in category view ?

Thanks.

[attachment cleanup by admin]
Title: Re: only 8 products per view with 2.0.8_a
Post by: slammy on July 06, 2012, 15:30:27 PM
Hi BadaireW,

you have to set up the limit for each category under vm backend: productcategories->category you want to change, see screenshot below:
regards slam

[attachment cleanup by admin]
Title: Re: only 8 products per view with 2.0.8_a
Post by: BaidareW on July 06, 2012, 22:08:29 PM
Thanks, this solution helped to ignore the bug :)
Title: Re: only 8 products per view with 2.0.8_a
Post by: John2400 on July 10, 2012, 11:56:03 AM
Hi , I'm just adding my little bit to say that I too have the limiting of products view-  I have 20 products in one category - I can see the Pagination set and can see next at the top of the page - .

* when I click next - I still only see the front page ( or the original products) .

* have then gone into the category section and set the "category form Initial display records" to 20.

* the result as stated below is that I now have all products showing on the front or page 1. 

my version is shown in my footer .  If someone has a better solution then let us know for now - Thank you slammy for your solution.
Title: Re: only 8 products per view with 2.0.8_a
Post by: Milbo on July 14, 2012, 12:45:44 PM
In the d version it is enough to set the limit one time per vm config.
Title: Re: only 8 products per view with 2.0.8_a
Post by: John2400 on July 14, 2012, 14:28:16 PM
Set - both SEO to the same setting - see image -  this fixed the issue

[attachment cleanup by admin]
Title: Re: only 8 products per view with 2.0.8_a
Post by: slammy on July 19, 2012, 10:50:39 AM
Hi all,

I just did the update to sr 2.0.8_e and the global configuration does function properly again. Great, thread solved.
BUT: If you used my workaround/solution and put the limits in the category configuration -> you have to set up these entrys to zero to make global vm config happen, see screenshot below ...

best regards slam

[attachment cleanup by admin]
Title: Re: only 8 products per view with 2.0.8_a
Post by: Milbo on July 19, 2012, 16:49:57 PM
great :-)
Title: Re: only 8 products per view with 2.0.8_a
Post by: lipes on July 19, 2012, 22:46:09 PM
I am with only 8 products per view with the last VM version too

In my Configuration i've got:
Shopfront > Max products per view in frontend: 20
In the Template > Set the pagination sequence for the List Box: 20, 40, 60

And in the front end when i visit any Category only displays 8 products per page !!!
works if we click to display 40 per page ... and then we need to go back again to 20 products per page...

I've also got some problems in the:
- Creation of a new user (without he/she agreed with the terms of service check box) sends a Joomla 500 error page ... and if i go back the system confirm that the user has been created (http://forum.virtuemart.net/index.php?topic=105481.0);
- Filtering products Sku's (for example GR-2845 ) with some special characters like the  - dont work (http://forum.virtuemart.net/index.php?topic=105472.0);
- Filtering the categories names is not working too (http://forum.virtuemart.net/index.php?topic=103428.0);
- The Final Price is not saving by hitting the "Save & close".. We need to hit "Save" first and then "Save & Close" ... this process for have a correct procuct final price its so bad when Versus VM1 :-/   (http://forum.virtuemart.net/index.php?topic=104960.msg349348#msg349348)

I have some good features ideas to propose but i'll wait this fixes to not overcharge the VM team work ...
Title: Re: only 8 products per view with 2.0.8_a
Post by: John2400 on July 19, 2012, 23:33:14 PM


Just wondering did you try the settings below and set the categories to 0 and the SEo settings as described to then see if pagination worked. then reset the categories to 20, 40 We all had the same issue in 2.0.8 d and it was ok there we just had the wrong configurations?  Then we will know it is the pagenation sequence issue in configuration >>templates setting or the categories issue.
Title: Re: only 8 products per view with 2.0.8_a
Post by: slammy on July 20, 2012, 10:12:07 AM
Hi Lipes,

don´t know if I understand you right, but I don´t make configuration through a file or direct on the database.

Set up the global max products per view configuration in vm backend -> configuration -> shopfront  as a general numeric for all categories.
If you want to change (override) these setting for a special category, you use the configuration under vm backend -> Productcategory (choose the one you want to change) -> and then there what you described as limit_list_inital (in german version it´s named "Kategorie Formular Startzahl anzuzeigender Einträge").

regards slam

[attachment cleanup by admin]
Title: Re: only 8 products per view with 2.0.8_a
Post by: hjet on October 15, 2012, 18:22:42 PM
VM2.0.12b

edit config VM (Configuration ->Templates -> Set the pagination sequence for the List Box)

edit /administrator/components/com_virtuemart/models/product.php line 559

$limit = $suglimit - $rest;

add after this


$prod_per_page = explode(",",VmConfig::get('pagination_sequence'));
if($limit <= $prod_per_page['0'] && array_key_exists('0',$prod_per_page)){
$limit = $prod_per_page['0'];
}


profit!
Title: Re: only 8 products per view with 2.0.8_a
Post by: kernel on October 31, 2012, 01:57:52 AM
Quote from: hjet on October 15, 2012, 18:22:42 PM
VM2.0.12b

edit config VM (Configuration ->Templates -> Set the pagination sequence for the List Box)

edit /administrator/components/com_virtuemart/models/product.php line 559

$limit = $suglimit - $rest;

add after this


$prod_per_page = explode(",",VmConfig::get('pagination_sequence'));
if($limit <= $prod_per_page['0'] && array_key_exists('0',$prod_per_page)){
$limit = $prod_per_page['0'];
}


profit!


Hi hjet!!

Your code works fine!!  :)
Thanks a lot!!

One question: When you upgrade virtuemart in the future, will rewrite the product.php file and this changes will be lost. Is there any way to save this file with templates overrides?

Greetings.
Kernel.
Title: Re: only 8 products per view with 2.0.8_a
Post by: tonis on November 26, 2012, 12:39:48 PM
Many thanks for this solution, it has repaired my pagination problem on manufacturer product page ... now it works with the default configuration setting  8)

Quote from: hjet on October 15, 2012, 18:22:42 PM
VM2.0.12b

edit config VM (Configuration ->Templates -> Set the pagination sequence for the List Box)

edit /administrator/components/com_virtuemart/models/product.php line 559

$limit = $suglimit - $rest;

add after this


$prod_per_page = explode(",",VmConfig::get('pagination_sequence'));
if($limit <= $prod_per_page['0'] && array_key_exists('0',$prod_per_page)){
$limit = $prod_per_page['0'];
}


profit!
Title: Re: only 8 products per view with 2.0.8_a
Post by: bytelord on November 27, 2012, 02:26:16 AM
Added to the core by Max. Will be available on the next releases (2.0.16, 2.1)

Thanks hjet
Title: Re: only 8 products per view with 2.0.8_a
Post by: csimmo on December 03, 2012, 03:45:41 AM
I am so sorry for asking, but this mean the code should look like this: I am running VM 2.0.14

Line 548         $catModel= VmModel::getModel('category');
         $category = $catModel->getCategory();
         if(empty($limit)){
            if(!empty($category->limit_list_initial)){
               $suglimit = $category->limit_list_initial;
            } else {
               if(empty($category->limit_list_step)){
                  $suglimit = VmConfig::get ('list_limit', 20);
               } else {
                  $suglimit = $category->limit_list_step;
                  
               }
            }
            if(empty($category->products_per_row)){
               $category->products_per_row = VmConfig::get ('products_per_row', 3);
            }
            $rest = $suglimit%$category->products_per_row;
line 565            $limit = $suglimit - $rest;
               }
            $prod_per_page = explode(",",VmConfig::get('pagination_sequence'));
            if($limit <= $prod_per_page['0'] && array_key_exists('0',$prod_per_page)){
            $limit = $prod_per_page['0'];
            }
Title: Re: only 8 products per view with 2.0.8_a
Post by: Mrstech on December 10, 2012, 03:05:44 AM
Hi,  I'm having the same problem with VM 2.014  :-(

Where you able to get it working Csimmo??
Title: Re: only 8 products per view with 2.0.8_a
Post by: bytelord on December 10, 2012, 09:47:57 AM
did your it? http://forum.virtuemart.net/index.php?topic=104709.msg364194#msg364194
Title: Re: only 8 products per view with 2.0.8_a
Post by: mpigio on December 18, 2012, 13:23:35 PM
Hi, I added your code but without result.
I must to remove pagination by setting more than 100 products per page and torn off VM Seo on virtuemart configuration.

Otherwise if I click on manufacturer name I can see only first page

J 2.5.8
VM 2.0.14

Thanks for your help
Title: Re: only 8 products per view with 2.0.8_a
Post by: bytelord on December 18, 2012, 20:16:11 PM
Hello,

Please try to follow http://forum.virtuemart.net/index.php?topic=109043

Read the post from the start ... some hits

Regards