I followed the codelab for adding a new card to google wallet (of course I used the business profile of the company and the issuer id was not temporary).
As one of steps, I added one row with two items, in generic_class.js,but it is not shown in the final generated card
'classTemplateInfo': {
'cardTemplateOverride': {
'cardRowTemplateInfos': [
{
'twoItems': {
'startItem': {
'firstValue': {
'fields': [
{
'fieldPath': 'object.textModulesData["company"]',
},
],
},
},
'endItem': {
'firstValue': {
'fields': [
{
'fieldPath': 'object.textModulesData["badgeId"]',
},
],
},
},
},
},
],
}
(of course, if I click on details, they are shown in the bottom, outside of the card).
Then I noticed that the final card of the codelab is also without the row!
So I want to add two or three rows to my generic_class like the pass builder, any idea?
I searched the web and asked wallet support team, no answer yet.
OMG, I found the solution! I wrongly updated the class :-| It should be like this:
updatedClass['classTemplateInfo'] = {
"cardTemplateOverride": {
"cardRowTemplateInfos": [
{
"twoItems": {
"startItem": {
"firstValue": {
"fields": [
{
"fieldPath": "object.textModulesData['company']"
}
]
}
},
"endItem": {
"firstValue": {
"fields": [
{
"fieldPath": "object.textModulesData['badgeId']"
}
]
}
}
}
}
]
}
};
I had written an extra 'classTemplateInfo': {
under the updatedClass['classTemplateInfo'] = {
and that's why it didn't work!