News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Limitstart on categories - Cannot get back to page one

Started by cre8iv_dzine, November 27, 2012, 20:49:11 PM

Previous topic - Next topic

cre8iv_dzine

I'm having a problem with the link that involves "limitstart" on my site.

If you put the limit per page down to 3 (or any number that doesn't list everything on one page). If you go to any page besides 1, you cannot get back to page one because the link is incorrectly programmed.

So, to clear this up, if I go to page 2 on my vmpagnation bar, it goes to this link
/index.php?option=com_virtuemart&view=category&virtuemart_category_id=3&Itemid=101&limitstart=3

Go to page 3 and it goes here
/index.php?option=com_virtuemart&view=category&virtuemart_category_id=3&Itemid=101&limitstart=6

However, if I click on page 1, the link goes to this
/index.php?option=com_virtuemart&view=category&virtuemart_category_id=3&Itemid=101
The limitstart is left off and you remain on whatever page you were on.

The link is SUPPOSED to go to
/index.php?option=com_virtuemart&view=category&virtuemart_category_id=3&Itemid=101&limitstart=0

Unfortunately, I don't know enough about PHP programming to fix this myself

I believe the fix for it is in this file
/administrator/components/com_virtuemart/helpers/vmmodel.php
But I'm not 100% sure.

Any help anyone could give me, would be a big help

bytelord

Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!


bytelord

??
From the backend Go to Prosuct -> Product Categories -> Select a category ... this is the category configuration ...

Regards
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

cre8iv_dzine

I set them all to 0 and I'm still having the same issue.

The link is basically the only problem. If "page 1" linked to "limitstart=0" it would work. I've tested this by going to this page manually and the page comes up without issue.

I appreciate the help, but neither fix you sent worked

bytelord

Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

cre8iv_dzine

Yes, I tried a couple of things, because later down that forum post you said it was fixed in the newest version (2.0.14) which is what I'm using.

This is my code from line 549 to 569

$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;
$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'];
}
}



And yes, I've cleared my browser cache and my DNS resolver cache for good measure

cre8iv_dzine