Hi everyone.
Im learning how to create an app which is basically set up to sell books that my daughter is writing.
Her sales model is selling a chapter at a time (or the whole book if wanted). Ive added a field in the items data simply called Chapter Url and we then enter the page url of the chapter that is being purchased.
Im having trouble adding that page url to the order in the customers account. I would also like to figure out how to email the order with the link but thats for another day, unless someone here can direct me to the steps i need to take for that also, I just havnt gotten to that yet.
I have tried adding a new line of text with dynamic data but im confused on the options to pick to get me to that field. Nothing seems to work.
You can see where ive circled the space Im trying to put the link and what Ive come up with dynamically but its not working. I even tried to add the link to the product page but hidden to see if it will pull it from there. Im at a loss.
In order for there to be a link to the chapter, you would need a page in the app, and on that page have the content type set to ‘Chapter’, and then when you use a dynamic expression to reference a chapter URL, you will select which page the URL should be for. If there is more than one page in the app that has a content type set to Chapter, your choices will be more than one, but if only a single page in the app has content type of Chapter, Bubble likely automatically selects that single option for you.
On Order data type, have a field that is related to the data type of Order Line Items, and on the Order Line Items data type have a text field that is the link to the chapter for that specific Order Line Item. Order Line Items is a data type necessary for creating a checkout system, as it will hold onto things like what is being purchased and the quantity…in your system, it seems like a user could in theory purchase more than one chapter at a time, so you need Order Line Items to denote in the Order each of the chapters purchased.
What you have circled in read is showcasing that the Ordered Items data entry, is not specified, since the ‘each items page url’ is indicative of there being multiple, hence the ‘each items’, so what you need to do is take the expression and instead of ending with ‘each items Page URL’ you need to use a filtered operator to narrow down which Ordered Item entry from the Order you want to display the Page URL for, and then after the filtered operator use ‘first item’ operator and then you would use ‘Page URL’ since then it would be for a single item.
But, in your system it would seem that you are already attempting to have multiple items per Order (as you should) and so the expression in Red may be correct in an attempt to show all Items at once…and if everything else is correct there, as it looks, then the issue maybe that the Parent Groups’ Order is not specified, and so the Ordered Items is empty because it has no specified Order to reference…Use the Inspector tool to verify if your parent groups Order is specified and if it has any Ordered Items attached to it or not. Often the mistake is not specifying the value, or the data not having all data it needs.
Once you get it to display on the page correctly, then you do the same type of thing on an send email action.
Thanks so much, will go through all this and see what works. I think i have figured part of it out, I was adding the text without a group, once i gave it its own group i could specify the type of content and then the correct options were showing up. Doh.