You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Realise this is an old thread, and I'm not sure pagination was the cause of the issue for us, but we did encounter this and fixed it by adding a conditional to purchase-patterns/src/elements/db/ProductQueryExtended.php
Description
Is there a trick to be able to paginate extended queries? I get this error when trying to do so:
SQLSTATE[42000]: Syntax error or access violation: 1066 Not unique table/alias: 'purchase_counts'
The SQL being executed was: SELECT
elements
.id
,elements
.fieldLayoutId
,elements
.uid
,elements
.enabled
,elements
.archived
,elements
.dateCreated
,elements
.dateUpdated
,elements_sites
.slug
,elements_sites
.siteId
,elements_sites
.uri
,Steps to reproduce
{% set productQuery = craft.purchasePatterns.extended().orderBy('qtyCount DESC').relatedTo(category).limit(24) %}
{% paginate productQuery as pageInfo, productEntries %}
Additional info
The text was updated successfully, but these errors were encountered: