Closed c-topherl closed 8 years ago
-Need unit in each product object
Good practice note: should really have array of products inside responseData object. Not sure how handlebars is going to handle the nested objects here.. guess we'll find out.
{ responseData: { products: [ {product 1} {product 2} ] }
I have no idea what the number field is doing there. I'll look in to it. getproducts has been updated to return like your last comment, just need to do the other get* functions.
Also, you should be requesting ?function=get_product_units because that is the table that has all of the combinations.
Any way we can substitute the nulls for empty strings? I think handlebars will take the string "null" and plug it in... we'll see though. Maybe not cuz there isn't quotes around it?
http://joelmeister.net/brewCom/controllers/product_controller.php?function=get_product_units
That column is defined as NOT NULL, I just was messing around with bad data. I updated that particular one so it should be fine now.
-SELECT statement is being echo'd... stop that
-What are all the number keys for each product object? Examples below:
"prod_code":"zoe","0":"zoe", "class_code":"apolo","3":"apolo" "prod_desc":"joels favorite beer","1":"joels favorite beer"
Every attribute has a number key after it with a duplicate value.
-Should probably use somewhat realistic data if we're going to be showing this soon...