| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Extending Tags Module without Breaking Search | ||||
|
|
Thread Tools | Search this Thread |
#11
|
|||||||
|
|||||||
Re: Extending Tags Module without Breaking Search
Hi,
This is my model: PHP Code:
This is my ItemsList: PHP Code:
WIth only the line moreThan1000 gives the correct products and count, just the line hasTags gives the correct products but the count is wrong. I tried changing the \XLite\View\ItemsList\AItemsList::getItemsCount() method to PHP Code:
with the same result. I can hard code a value return 55; for example and that works. I wonder if it's something to do with the getData and true function.
__________________
Core version: 5.5.xx |
|||||||
#12
|
|||||||||
|
|||||||||
Re: Extending Tags Module without Breaking Search
Hi @xgarb,
Can you try to dump the value returned by getSearchCondition() method in getItemsCount() one? Is it any different compared to one returned by getLimitCondition() method in getPageData() one? They should be the same except search limiting parameters in latter one. Tony
__________________
Found a bug in X-Cart? Post it to our bug tracker! Know how to make X-Cart better? Suggest an idea! |
|||||||||
#13
|
|||||||
|
|||||||
Re: Extending Tags Module without Breaking Search
Like this?
PHP Code:
PHP Code:
I get this in the log:... Quote:
Quote:
Full log if it helps: https://pastebin.com/NyyFdhyK
__________________
Core version: 5.5.xx |
|||||||
#14
|
|||||||||
|
|||||||||
Re: Extending Tags Module without Breaking Search
Yes, like this, but I would also define third parameter of logCustom() method as 'true', so we would see file / line from where getData() is called and be sure that we find the right piece of log to look at.
I would also log what number is returned by getItemsCound() method to check whether this number is indeed what you see in pagination widget. Tony
__________________
Found a bug in X-Cart? Post it to our bug tracker! Know how to make X-Cart better? Suggest an idea! |
|||||||||
#15
|
|||||||
|
|||||||
Re: Extending Tags Module without Breaking Search
New methods:
PHP Code:
PHP Code:
New log: https://pastebin.com/9pZhmMFk I notice that the items count starts at 182 but later is 2963 (the number shown on the site). The actual number of products is only three.
__________________
Core version: 5.5.xx |
|||||||
#16
|
|||||||||
|
|||||||||
Re: Extending Tags Module without Breaking Search
@xgarb,
I am sorry I cannot say much about what can be the problem judging by these logs only. getSearchCondition() seems to return proper values, but something does not work right and we need to dig deeper, into search() method and look for the differences between requests for quantity of entities and for actual entities. If you like I can try to check the problem directly onto your server. For that, please email us at support@x-cart.com with the reference to this forum thread. Tony
__________________
Found a bug in X-Cart? Post it to our bug tracker! Know how to make X-Cart better? Suggest an idea! |
|||||||||
|
|||
X-Cart forums © 2001-2020
|