big commerce Wish Lists not exposed on category template - bigcommerce

I am trying to add wish list functionality to the Big Commerce category.html. I have exposed wish lists to the page using the below frontmatter, but customer.wishlists always returns null instead of a list of wish lists (my user has two created).
Frontmatter - category.html
---
category:
shop_by_price: true
products:
limit: {{theme_settings.categorypage_products_per_page}}
customer:
wishlists:
limit: 10
---
Context
"customer": {
"id": 1,
"name": "user name",
"email": "user#email.co.uk",
"phone": "",
"store_credit": {},
"shipping_address": {},
"recently_viewed_products": null,
"wishlists": null,
Anyone have ideas of why this isn't returning the correct data? Have I missed a step maybe?

Related

Add computed field to Query in Grafana using JSON API als data source

What am I trying to achieve:
I would like to have a time series chart showing the total number of members in my club at any time. This member count should be calculated by using the field "Eintrittsdatum" (joining-date) and "Austrittsdatum" (leaving-date). I’m thinking of it as a running sum - every filled field with a joining-date means +1 on the member count, every leaving-date entry is a -1.
Data structure
I’m calling the API of webling.ch with a secret key. This is my data structure with sample data per member:
[
{
"type": "member",
"meta": {
"created": "2020-03-02 11:33:00",
"createuser": {
"label": "Joana Doe",
"type": "user"
},
"lastmodified": "2022-12-06 16:32:56",
"lastmodifieduser": {
"label": "Joana Doe",
"type": "user"
}
},
"readonly": true,
"properties": {
"Mitglieder ID": 99,
"Anrede": "Dear",
"Vorname": "Jon",
"Name": "Doe",
"Strasse": "Doeington Street",
"Adresszusatz": null,
"PLZ": "9999",
"Ort": "Doetown",
"E-Mail": "jon.doe#doenet.net",
"Telefon Privat": null,
"Telefon Geschäft": null,
"Mobile": "099 877 54 54",
"Geschlecht": "m",
"Geburtstag": "1966-03-10",
"Mitgliedschaftstyp": "Aktivmitgliedschaft",
"Eintrittsdatum": "2020-03-01",
"Austrittsdatum": null,
"Passfoto": null,
"Wordpress Benutzername": null,
"Wohnhaft im Glarnerland": false,
"Lat": "43.1563379",
"Long": "6.0474622"
},
"parents": [
240
],
"children": {
},
"links": {
"debitor": [
2124,
3056,
3897
],
"attendee": [
2576
]
},
"id": 1815
}
]
Grafana data source
I am using the “JSON API” by Marcus Olsson: GitHub - grafana/grafana-json-datasource: A data source plugin for loading JSON APIs into Grafana.
Grafana v9.3.1 (89b365f8b1) on Linux
My current approach
Queries:
Query C - uses a filter on the source-API to only show entries with "Eintrittsdatum" IS NOT EMPTY
Field 1 (alias "datum") has a JSONata-Query of:
properties.Eintrittsdatum
Field 2 (alias "names") should return the full name and has a query of:
$map($.properties, function($v) {(
($v.Vorname&" "&$v.Name);
)})
Field 3 (alias "value") should return "1" for every entry and has a query of:
$map($.properties, function($v) {(
(1);
)})
Query D - uses a filter on the source-API to only show entries with "Austrittsdatum" IS NOT EMPTY
Field 1 (alias "datum") has a JSONata-Query of:
properties.Austrittsdatum
Field 2 (alias "names") should return the full name and has a query of:
$map($.properties, function($v) {(
($v.Vorname&" "&$v.Name);
)})
Field 3 (alias "value") should return "1" for every entry and has a query of:
$map($.properties, function($v) {(
(1);
)})
Here's a screenshot to clarify things
(https://zigerschlitzmakers.ch/wp-content/uploads/2023/01/ScreenshotGrafana-1.png)
Transformations:
My applied transformations
(https://zigerschlitzmakers.ch/wp-content/uploads/2023/01/ScreenshotGrafana-2.png)
What's working
I can correctly gather the number of members added/subtracted per day.
What's not working
I can't get the graph to display the way i want: I'd like to have a running sum of these numbers instead of the following two graphs.
Time series graph with merged queries
(https://zigerschlitzmakers.ch/wp-content/uploads/2023/01/ScreenshotGrafana-3.png)
Time series graph with unmerged queries
(https://zigerschlitzmakers.ch/wp-content/uploads/2023/01/ScreenshotGrafana-4.png)
I can't get the names to display within the tooltip of the data points (really not THAT necessary).

Yodlee searchSite returning component with multiple values

The Yodlee docs for siteSearch shows a componentList array with each entry looking like this:
{
"valueIdentifier": "LOGIN",
"valueMask": "LOGIN_FIELD",
"fieldType": {
"typeName": "TEXT"
},
"size": 20,
"maxlength": 22,
"name": "LOGIN",
"displayName": "User ID",
"isEditable": true,
"isOptional": false,
"isEscaped": false,
"helpText": "101920",
"isOptionalMFA": false,
"isMFA": false
},
however, when the siteSearch is matches "baa", we get a response with a componentList array entry that seems to have multiple possible values, like this:
{
\"defaultValues\": [
\"6331\",
\"5700\",
null,
null
],
\"values\": [
null,
null,
null,
null
],
\"validValues\": [
null,
null,
null,
null
], ...
I can't find any documentation on this "multiple-value field", and it seems to be a rare case. Can anyone point me to any information on this type?
Thanks.
I would suggest you to check this.
Here look for Social Security Number example. It is a single field which has been divided into 3 section(i.e. input text box). Similarly you need to consume the Login form you are receiving and show it to the consumer of your application.
Whenever you'll find valueIdentifier is having an array i.e. more than 1 value then it is multiple fixed field type else it's a single field.
Here is the image how does it look like once you render the same.

Freebase query with inner joins on the statment

Can I create an inner join on free base that uses another query?
I tried to create a join between 2 querys:
The first, select all the artist that the genre is the same as nirvana without nirvana:
[{
"id": null,
"name": null,
"name!=": "nirvana",
"type": "/music/artist",
"genre": [{
"name|=": [
"Punk rock",
"Grunge",
"Alternative rock",
"Rock music",
"Hardcore punk"
]
}]
}]
the second, select all the genre of nirvana:
[{
"name": "nirvana",
"type": "/music/musical_group",
"/music/artist/genre": []
}]
I want to create a query like this but it does not work.
[{
"id": null,
"name": null,
"name!=": "nirvana",
"type": "/music/artist",
"genre": [{
"name|=":
[{
"name": "nirvana",
"type": "/music/musical_group",
"/music/artist/genre": []
}]
}]
}]
I'm not sure why you need to do this all as one query. Since Nirvana's music spans a number of very popular genres your query will probably return thousands of results which will mean that you'll have to make multiple API requests to get all the results either way.
In any case, here's a MQL query that finds all the bands which have at least one music genre in common with Nirvana:
[{
"id": null,
"name": null,
"/music/artist/genre": [{
"id": null,
"name": null,
"!/music/artist/genre": {
"id": "/m/0b1zz",
"name": null
}
}]
}]
The exclamation mark in front of the 2nd genre property means that we want the inverse relationship ie. "music artists with this genre" instead of "music genres for this artist".
Note that I've used the MID (/m/0b1zz) to represent Nirvana. You shouldn't be using names to identify topics in a query since they're not unique. You want results for the Nirvana started by Kurt Cobain in 1987, not just any band named Nirvana.

How do i make custom reordering for products in collection in shopify

How do i make custom reorder for products in collection in shopify. i mean for exapmle i have 'test' collection and i want to reorder products in 'test' collection by using product tag i mean i put some tags like 'firstshowup' in some product in 'test' collection so when customer click 'test' collection customer see products which have 'firstshowup' tag first and then see the rest so what iam trying here is reordering using custom reordering not using like order by bestseller or allpabetically or date created s.t
thank you so much guys in advance
Your collection will be made up of Collect objects, which have a position attribute. Assuming you're using a CustomCollection, you can modify the position of the Collects by updating the CustomCollection: http://api.shopify.com/customcollection.html#update
From the examples, to update a collection, you can use:
PUT /admin/custom_collections/#{id}.json
With the following payload:
{
"custom_collection": {
"body_html": "<p>The best selling ipod ever</p>",
"handle": "ipods",
"id": 841564295,
"published_at": "2008-02-01T19:00:00-05:00",
"sort_order": "manual",
"template_suffix": null,
"title": "IPods",
"updated_at": "2008-02-01T19:00:00-05:00",
"image": {
"created_at": "2012-12-11T12:01:29-05:00",
"src": "http://cdn.shopify.com/s/files/1/0006/9093/3842/collections/ipod_nano_8gb.jpg?0"
},
"collects": [
{
"product_id": 921728736,
"position": 1
},
{
"id": 841564295,
"position": 2
}
]
}
}

Freebase search_api and excluding results by specified type

is anyone know, how to exclude some topics with specified type(s) using search api and mql?
For example i'm try to find all topics "Voodoo People", and exclude only those, that have composition and release types, and sort result by score desc: http://tinyurl.com/3tjkb7y.
Sorting work perfect, but i can't find functionality for excluding :(
I'm try to use mql_filter: http://tinyurl.com/644xkow, but releases still there.
And one more question: i see in type_strict param possible values: "all", "any", "should". But there is no value "not" or "not in". Is needed result can be obtained in any other way?
The syntax that you're looking for is "optional" : "forbidden". In your query that would look like this:
[{
"search": {
"query": "Voodoo People",
"score": null,
"mql_filter": [{
"type": {
"id": "/music/release",
"optional": "forbidden"
}
}]
},
"name": null,
"id": null,
"type": [],
"/common/topic/notable_for": {
},
"limit": 15,
"sort": "-search.score"
}]​