Magento quick search by SKU - magento

When I try to search products by SKU, I get incomplete results. For example: I have products with SKU IR-CP-CH_1 and A-453-B-I_1. Both products are configurable products, both are visible for Catalog, Search. I get correct result for query IR-CP-CH_1 and no result for A-453-B-I_1.
Indexes are rebuilt. I use combined search type (like + fulltext). In advanced search everything works fine.

I suggest you take a quick look in your database at the table catalogsearch_fulltext. In the data_index column you should be able to see the SKUs as part of the full text string Magento creates for quick searching in.
See if you can either manually spot the elusive SKU 'A-453-B-I_1' or hit it with an
SELECT * FROM catalogsearch_fulltext WHERE data_index LIKE '%453%'
Maybe the SKU got entered with some strange characters or a space instead of a hyphen. You could search in the product_id column instead to see what search string Magento does have for that SKU.
If the string is in the table and the character glyphs match exactly, then I think you are looking to indexing, caching, stock, store views etc as suggested in the comments above by others
If the string is not in the table at all then I think you are looking to 'visibility'.
If you look in the table catalogsearch_query and find your search string 'A-453-B-I_1' then look to the num_results column - if that value is greater than zero then items were found but it's not displaying that product for some reason.
**EDIT following comments below
Actually I think you should remove that '0' result from the catalogsearch_query table. You could remove it using SQL or phpmyadmin. Magento will return a result from catalogsearch_query if it finds one rather that search catalogsearch_fulltext every time.
It is possible that at some point the result was '0' but now it is non-zero but Magento is stuck with the '0 results' in the catalogsearch_query table.
There is more analysis that can be done, but try that first and if it still isn't right we can look at trapping the database query to try to understand why Magento thinks the result is zero.

For information, in my case, a free module (activo_catalogsearch) was breaking the research by sku because it was not up to date and probably conflicting with magento 1.9.4.1 (worked fine before with magento 1.9.2.1)

Related

Complex "featured product" model using query-time ranking (optional filters)

I have a products index that displays filtered results on category pages.
For a given category, any amount of products may be flagged as featured, meaning it displays first.
When products are displayed for a category, only one featured product should show at a time (at random from the available products flagged as featured)
Additionally, a product should not be flagged as featured if it has date range fields and the current date is not within the range
So, my index might look something like: https://gist.github.com/1a0327d8a321dc6627e197b94f4209c9
A solution to 1. has been posted here: https://stackoverflow.com/a/40922535 using optional filters, currently in private beta: https://www.algolia.com/doc/advanced/optional-filters-scoring/. At query time I could do optionalFacetFilters: ["featuredIn.category:category1"] Update: I've since been told by Algolia reps that this feature is has a large performance cost, and therefor is only really viable for enterprise customers.
However, I'm at a loss as to how to pull of 2. and 3..
Any guidance is greatly appreciated!

Not getting the correct totals using Cognos Report Studio. Need to get totals that show up in column

newparts_calc
if (([MonthToDateQuery].[G/L Account] = 4200 and [Query1].[G_L_Group] = 'NEW')) THEN ([Credit Amount]-[Debit Amount]) ELSE (0)
Data Item1
total([newparts_calc])
I need Data Item1 to return newparts_calc values only.
So for example in 1st row Data Item1 should be 8,540.8, but is 34,163.2
Whats wrong? how do i fix?
REVISED QUESTION
I apologize for not making sense on the original question.
I have many of the calc's that im trying to gather and put on a crosstab. I want to see sales by month (row) and part category (column)
[Query2] is the one shown in picture above.
It joins [MonthToDateQuery] AND [Query1]
The join is on 'Invoice' and carnality is 1..1 = 1..1
[MonthToDateQuery] is based on the package im working in. General ledger. It supplies the g/l entries for each sales g/l account
[Query1] is a SQL query i brought in to be able to break out categories even further from g/l group.
For example g/l account 4300 is rebuilt. However i needed to break out even further to see Rebuilt-Production and Rebuilt-New. I can do that with the g/l group.
I saw in my g/l account ledger entries that it referenced the invoice number. So thats how i tied in my SQL.
So as you can see from the table below (which is the view tabular data from query) i need a total. I have tried plugging newparts_calc into my crosstab and setting aggregation to total but the numbers still dont seem right. I dont think i have something set as it should be.
All the calc's im doing are based on single or multiple G/L Accounts and single or multiple G/L Groups.
Any Advice?
As you can see the problem seems to be duplicate invoice numbers.
How can i fix?
Couple things come to mind:
-Set the processing order to 2
-Since your calc is always a multiple and you are joining two queries, you may need to check your cardinality. Sometimes it helps to add derived queries to ensure you are working with the correct grain.
I'm obviously missing something, but if you want
I need Data Item1 to return newparts_calc values only.
just use newparts_calc, without total? That would give you proper value for row 1 -)
If you need a running-total for days (sum of values for previous days) — you should use a running_total function.
At a guess, one of your two queries is returning multiple rows for each invoice, which will cause this double counting. Look at the output of the two queries and see if that's happening. If so, then you just need to work out how to collapse that down to one row per invoice.
Per your new question - The underlying data has got to be causing the issue. Its clearly not 1:1 (note that even though this is what your stated cardinality is, Cognos does not enforce 1:1). Invoice number is not unique, GL Group is at a lower level.

Filtering Quotes by InventTable

I'm trying to build a report in AX 2009 (SP1, currently rollup 6) with a primary data source of the SalesQuotationLine table. Due to how our inventory is structured, I need to apply a filter that shows only certain categories of items (in this case, non-service items as defined in the InventTable). However, it seems that there is a problem in the link between the SalesQuotationLine and InventTable such that only two specific items will ever display.
We have tested this against the Sales Quotation Details screen as well, with the same results. Executing a query such as this:
...will only show quotes that have one of the specific items mentioned earlier. If we change the Item Type to something else (for example to Item), the result is an empty set. We are also getting this issue on one of our secondary test servers, which for all intents is a fresh install.
There doesn't seem to be any issues with the data mapping from the one table to the other, and we are not experiencing this issue with any other table set. Is this a real issue, or am I just missing something?
After analyzing the results from a SQL Profile run during the execution of the query, it seems the issue was a system bug. When selecting a table to join to the SalesQuotationLines, you have two options: 'Items' and 'Items (Item Number)'. Regardless of which table you select the query executes with, it joins the InventTable with the relation "SalesQuotationLines.ProjTransCode = InventTable.ItemId".
After comparing the table to other layers in the system, I found the following block of code removed from the createLine method (in the SYP layer):
if (this.ProjTransType == QuotationProjTransType::Item)
{
this.ProjTransCode = this.ItemId;
}
Since the ProjTransCode is no longer being populated, the join does not work except on certain quote lines that do have the ProjTransCode populated.
In addition, there is no directly defined relation to the InventTable - the link is only maintained via an Extended Data Type that is used on the SalesQuotationLine.ItemId field. Adding this relation in manually solved the problem.

Products not appearing in Magento search results, despite being search enabled

(Yes I know this is a duplicate, but none of the other solutions work for me.)
I’ve got a product that won’t appear in search results, despite being search enabled.
Here is an image to prove it.
And I’m using the latest version of Magento CE version 1.7.0
I've reindexed several times and have disabled the cache.
Please help! I can’t setup my shop without this.
1. Check product Quantity and Stock and that product is assigned to a category
2. Clear Cache
3. Run Re-Indexing.
Try to change the Search Type from like to fulltext
Configuration -> Catalog -> Catalog Search.
Regards
Check the MySql variable ft min word len. I had a similar issue, if I searched for the word "Pad" it returned 0 results because the ft min word len variable was set to 4 charachters and the word 'pad' has only 3.
Warning: Changing the value of the ft min word len variable to 3 may affect your server performance.
I just had the same problem and it turned out, that the Website-Checkbox (on the Products' tab "Website" in the Magento Backend) was not set during import.
Tried the following (still working on development-site)
Re-Index all Data
Delete the Cache
Delete all Session Files (rm -rf session/* in var/)
Checked Product Settings for:
Stock
Visibility
Status
Selected Categories
Website
I've been playing around with these for years. Here is what I currently have setup.
catalog catalog/search (in admin)
2
25
128
combine like/full text
2000
attributes: that are searchable
name, short_description, sku, color, manufacturer_part_number, manufacturer, upc
I did have description searchable but found that it returns way too many results..I just really want the search text found in my products name to be found.
Our client had created a new Root Category and moved all their products under here. They had neglected to update the Main Website Store configuration in:-
"System/Manage Stores/Main Website Store/Root Category"
We set this to the "New Root Category" and the search sprang back into life :)

Telerik Report omitting data

After performing a product evaluation by one of the managers other can change the scoring for certain categories. This changes in scoring are stored in the database for reference.
The structure of the evaluation is like this:
Evaluatoin
- Category
- Scoring point
an evaluation can have many categories which all can have many scoring points.
My problem is the following:
If I change a scoring point a few times all is entered in the database but in the reports i am only seeing the first scoring point. The rest of them with the same name are left blank but are using space just as it would if all were visible. The stored procedure that is delivering the data is working fine. It bring all data to the report which then displayes it wrong.
=Fields.CategoryName is working fine... every category name is displayed correctly
=Fields.ScoringPointName is not working... it displayes only the first and leavese all the rest blank... if for example a scoring point name is Product robustnes it would display only the first change of scoring but wouldnt display the rest
Any ideas???
Found out what the problem was. Maybe it will be helpful for other people
I was showing the data in a group header section with grouping =Fields.DefinitionText. Thus it will only repeat if the Fields.DefinitionText is distinct. About the empty space it's caused by the detail section that repeats for every data record. Thus if I want to display all of the data records I have to move the group header section textboxes to the report's detail section.
Here and Here are some usefull things about reporting.
Cheers

Resources