JoomlaWorks Community Forum

LOGIN
Welcome to the JoomlaWorks Community Forum | If you have a question, please search before posting!
Official support for commercial extensions has moved into the new JoomlaWorks Ticket Support System.
Support requests should ONLY be directed there and require an active subscription plan.
This forum board will remain public for purposes of knowledge exchange ONLY.

Author Topic: Pagination broke after K2Mart update 2.0.4. and VM update 2.0.18a   (Read 477 times)

Offline neekojoomla

  • Newbie
  • *
  • Posts: 4
    • View Profile
Hello,

Unfortunately the pagination of K2(Mart) broke after an update to 2.0.4. I haven't been able to resolve this issue so far. Is any the related functionality modified in this update compared with the 2.0.3 version? I.e. can anyone point me in the right direction?

Thanks!

Signatures appear only for members with more than 30 posts

Offline neekojoomla

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Pagination broke after K2Mart update 2.0.4. and VM update 2.0.18a
« Reply #1 on: January 29, 2013, 12:42:12 PM »
So far no fix yet.. Tried reinstalling, enabling / disabling layout overrides of my template. Nothing yet. Anyone with similar problems?
Signatures appear only for members with more than 30 posts

Offline neekojoomla

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Pagination broke after K2Mart update 2.0.4. and VM update 2.0.18a
« Reply #2 on: January 29, 2013, 09:38:26 PM »
Well, I have extracted the problem giving query:

string(913) "SELECT COUNT(*) FROM #__k2_items as i LEFT JOIN #__k2_categories c ON c.id = i.catid RIGHT JOIN #__k2mart AS k2mart ON k2mart.baseID = i.id RIGHT JOIN #__virtuemart_products AS product ON product.virtuemart_product_id = k2mart.referenceID LEFT JOIN #__virtuemart_product_manufacturers AS manufacturersXref ON product.virtuemart_product_id = manufacturersXref.virtuemart_product_id LEFT JOIN #__virtuemart_product_prices AS prices ON product.virtuemart_product_id = prices.virtuemart_product_id WHERE product.product_parent_id = 0 AND i.published = 1 AND i.access IN(1,1) AND i.trash = 0 AND c.published = 1 AND c.access IN(1,1) AND c.trash = 0 AND ( i.publish_up = '0000-00-00 00:00:00' OR i.publish_up <= '2013-01-29 21:29:35' ) AND ( i.publish_down = '0000-00-00 00:00:00' OR i.publish_down >= '2013-01-29 21:29:35' ) AND c.id=2 GROUP BY product.virtuemart_product_id ORDER BY i.ordering ASC"

It is constructed initially by the function getTotal() in 'components/com_k2/models/itemlist.php'. There are additional JOIN statements with k2mart and virtuemart and the query in the basic k2 component function getTotal() isn't constructed with those JOIN statements so I figure that the k2mart plugin is adding these JOIN statements.

//Edit: Disabling K2Mart plugins results in working k2 pagination

This query returns a total count of '1' where it should be something like 15. I can't figure out which part of the query is limiting the total count and more important why it is limiting the total count. It must have something to do with the update..

NOTE: WHERE product.product_parent_id = 0 is a hack since I only want to display parent products. However this worked in the previous version and disabling it doesn't solve the problem.
« Last Edit: January 30, 2013, 08:51:08 PM by neekojoomla »
Signatures appear only for members with more than 30 posts

Offline ee61ny

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Pagination broke after K2Mart update 2.0.4. and VM update 2.0.18a
« Reply #3 on: February 15, 2013, 07:26:23 PM »
Hi, I think you have already tried it, but installing new version of K2mart with extension manager (I had already done automatic update but I had same exactly the same problem with you), did the trick for me.
Wish you luck!
Signatures appear only for members with more than 30 posts

Find this topic helpful? Why not share it with others?