I'd like my Magento 2 in stock products to display in Algolia search results before my out of stock products. Is there any way to do this?
In the current version (1.0.3) it's not possible via Algolia configuration in Magento, because in_stock attribute is not exposed in Algolia configuration in Magento backend.
But it'll be possible in upcoming version (>= 1.0.4), which should be released early next week. In the new version, you will need to select in_stock attribute as indexable attribute and then use this attribute for custom ranking.
That will ensure, that products with the same textual relevancy will be sorted based on custom ranking and in stock products will be ranked higher then out of stock ones. You can find more about custom ranking in Algolia documentation: https://www.algolia.com/doc/guides/relevance/ranking#custom-ranking
The configuration then might look like this:
P.S.
Here is the pull request which exposes the in_stock attribute - https://github.com/algolia/algoliasearch-magento-2/pull/109
Feel free to give it a try!
Related
When using the NetSuite SOAP API I would like to retrieve the purchaseOrderList for a VendorBill record. The purchaseOrderList field is shown as a RecordRefList on this docs page, however that field doesn't populate on responses when performing a get to retrieve a vendorBill based on the internalId.
I've tried setting the bodyFieldsOnly header to false, hoping this would cause it to return all related fields, however this doesn't change the response.
Does anyone know how to force a RecordRefList field type to populate?
After searching through the docs online it seems that the purchaseOrderList property on the Vendor Bill is only used when updating the bill to associate it with Purchase Orders, it doesn't look like the property can be returned when retrieving Vendor Bill records. See this docs page under the 'Linking Purchase Orders to a Vendor Bill' section.
In order to retrieve the PO numbers associated with a Vendor Bills items and expenses I am retrieving them from the itemList and expenseList properties which are present on the Vendor Bill. If anyone knows of another way please feel free to comment or edit.
I'm using Algolia to power search in my app. I have an index called prod_COACHES in which I have some records with an object key called speciality1.
The data structure for speciality1 looks like this:
I have enabled speciality1.itemName as an Algolia 'facet' so that I can filter on it. All good so far and working nicely. Now, in my Algolia dashboard I can see a nice bit of UI that shows me every unique facet (in this case my specialisations) along with the number of records for each facet:
As it happens, I want to show exactly this information on my own UI in my app but I'm not sure how to get this data from Algolia in the most efficient way. I'm using the client side AlgoliaSearch Javascript SDK. How do I run a search to retrieve every unique speciality1.itemName and the number of records for each unique speciality1.itemName so I can build my own UI just like the above?
I have gone through the docs and followed the examples but my question is really about finding the most efficient way to do this from someone who really knows Algolia well, rather than hack my own solution together. Thanks!
It looks like you've enabled attributesForFaceting on the attribute speciality1.itemName. You can retrieve the facet values for the given attribue with the search parameter facets. The Algolia response will now contain a map with value:count. Here is an example with the JavaScript client:
import algoliasearch from 'algoliasearch';
const client = algoliasearch('XXX', 'XXX');
const index = client.initIndex('XXX');
index.search('', {
facets: ['speciality1.itemName']
}).then(result => {
console.log(result.facets)
});
If you want to easily build a search UI, you should take a look at the InstantSearch libraries. It's built on top of Algolia to ease the state/ui management for such UI. Many flavours are available e.g. Vanilla, React.
There is the coins catalog https://colnect.com/en/coins/list/year/1889
Each item in list has Product Microdata, some items in marketplace have the offers property. For example: this stamp.
Recently the Structured Data Testing Tool began to show error instead of warning for missing offers property on Product pages against it still described as recommended property in product rich result docs. Also here are 'Either "offers", "review", or "aggregateRating" should be specified' errors in Google Search Console.
What kind of structured data will be most suitable for those items?
How to avoid these structured data errors? Will it be correct to have Thing type for catalog items and then change it to Product when the item will be placed in marketplace?
Update 2019-10-15: Structured Data for mentioned above stamp are here. At the moment it has offers so there are 3 warnings only.
And Structured Data for some other stamp without offers, here is the missing offers filed error.
It seems Google does not allow schema.org Product markup without offers.
Hard to answer your issue (Next time please add some code examples).
In general in this URL:
https://colnect.com/en/stamps/stamp/2376-Snowstorm_-_Steamer_off_a_Harbours_Mouth-Birth_Bicentenary_of_JMW_Turner_painter-United_Kingdom_of_Great_Britain_Northern_Ireland
Without this warning:
'Either "offers", "review", or "aggregateRating" should be specified'
- But read this:
https://www.checkerboard.com/web-development/fix-offers-review-aggregaterating-specified/
Product VS Thing - it's better to use more specific object-type (This is not related to the "marketplace" option to pay Online) (Google rich-snippet related to products).
productontology:
For coins/Sports Cards and so on you could add extra-data by productontology (not mandatory):
http://www.productontology.org/
Related:
Can we make structured page data for any type of entities?
I have a website providing a ranking (based on reviews) of other websites that require a membership to access them (ex. Online tool requiring a monthly membership).
I have 2 question related to this:
Should I use the Product or WebSite entity? At the moment I opted for Product since it has the price attribute and so on.
How can I describe my ranking of website? I'm looking for a kind of ordered list of products (or websites if I have to change that).
With the offers property, you can directly offer the WebSite (or WebApplication, which might be more appropriate in your case). No need for Product.
For the ranking, you have several options:
With the review property you can specify a Review, which can have the reviewRating property to specify a Rating. This allows you to provide specific scores (e.g., in the form of "1.27", "1.28", "2.04" …).
If the rank is the average rating from all reviews, you can use the aggregateRating property to specify an AggregateRating.
With an ItemList you could specify for each entry a ListItem with the position property. This allows you to (implicitly) provide a ranking (i.e., in the form of "1", "2", "3", …).
You could also use both ways (Rating/AggregateRating and ItemList).
Make sure to apply the review/aggregateRating on the correct item: on the Offer if you are ranking the offers, on the WebApplication if you are ranking the apps.
I want to download item from Intuit data service (IDS) for windows by using Item type filter .
Like how can I query (post data) to download/retrieve only Inventory and Service item from QBDesktop using sync manager and IDS.
Reference links: https://ipp.developer.intuit.com/0010_Intuit_Partner_Platform/0050_Data_Services/0500_QuickBooks_Windows/0600_Object_Reference/Item
https://ipp.developer.intuit.com/0010_Intuit_Partner_Platform/0050_Data_Services/0500_QuickBooks_Windows/0200_Key_Concepts/0200_Custom_Fields/Data_Services_Custom_Fields#Retrieving_and_Filtering_Objects_With_Custom_Fields
If I understand what you are asking, then there is no query filter that will just get items where type=service or type-inventory, you need to query them all and filter the data on your side.
The v3 version of the API provides Simple Query Language where you will be able to provide the query you are asking, but the v3 is only in early beta for external partners today.
jarred