I am trying something I haven't tried before and would like some advice. I am building a sort of "shopping cart" idea and am struggling with a few concepts. I have formatted this so the questions are in red and hopefully easier to answer:
Rather than allowing 1 payment for 1 product as is currently the case I am hoping to introduce a shopping cart using a table which isn't backed by a resource in Ebase (lets call it a session table). So ultimately I have 1 database backed resource, "PRODUCTS" which is displayed as a repeater control, and 1 unbacked table "ORDER" which is displayed as a table :
Is it sensible/feasible and possible to use ebase tables for this?
I have already built some of the functionality and whilst some of it works I am now struggling with a few extra features (all of which are caused by the fact the table isn't backed by a resource):
How can I refresh the table when a product is added? I know the products are added as I can see it in the log and if I add more than 2 the screen does update. However I can't get it to refresh on the first product.
Is it possible to perform calculations on the column's? (for example to count the "charge" column to display a total)
How can I compare column values between the database backed resource and the unbacked resource? Ultimately to hide/unhide controls on the repater control
Really hope that makes sense! At the end of all this I will have to build a HTTP POST URL to call the payment interface....
EDIT = I think I know why the table isn't refreshing on the first insert. It is something to do with the first insert only containing null values, my code must be wrong even though if I log the values they are populated - it is currently simply "tables.PRODUCTS.item.value = tables.ORDER.item.value" for the various columnsetc followed by "tables.ORDER.insertRow()"..Will pick this up next week.