Pagination system with getProductListing function in my module

Started by johnyDev, February 15, 2014, 18:00:59 PM

Previous topic - Next topic

johnyDev

Hello,

I just want to use the function "getProductListing" in my module but with pagination system, I want it to accept $perPage paramater and $start paramater

1/ Can I use the existent funtion with pagination system (it will be great)
2/ Is there any solution, I can for example copy paste the code in my module and then modify it, but how can I modify it ?

Thank you.     


getProductListing    (         $group = FALSE,
           $nbrReturnProducts = FALSE,
           $withCalc = TRUE,
           $onlyPublished = TRUE,
           $single = FALSE,
           $filterCategory = TRUE,
           $category_id = 0
   )       

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Milbo


if (!class_exists( 'VmConfig' )) require(JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_virtuemart'.DS.'helpers'.DS.'config.php');
VmConfig::loadConfig();

$pmodel = VmModel::getModel('product');
$myproducts = $pmodel -> getProductListing(....);
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

johnyDev

Thank you for your answer, but I know how to use that function, but didn't find a way to manage the pagination with that function, to pass $start and $limit parameters, actually what I did is copy and paste the function and change it to accept two more parameters ... it's not the best implementation but it works... now I have another problem it will be great you take a look  : https://forum.virtuemart.net/index.php?topic=122261.msg417236

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/