domsinclair
Forum Replies Created
-
Problem turned out to be a misunderstanding on my part. I was under the impression that the different table templates associated with the project needed to have different names and so I named them differently. In reality they should have had the same name. Once they did everything that I’d wanted to achieve worked.
Hi Peter
Thanks for getting back to me. I had thought that I was doing what you suggested, but obviously not. If I read the documentation correctly the project template (let’s call it Post query) is essentially the wrapper for what will be the overall Master detail query.
To that query I add two data pages, one is essential the posts table (set to parent child) which in my case has a where clause on post type to filter down the posts to to just those of type product, which works, and of course I define the relationship to postmeta.
I then add a separate data page for post meta, this is set to table . Currently It returns all 68 rows for each filtered post, but in reality I only want two where meta_key = ‘_price’ and meta_key = ‘_stock’. That I added to the Where clause in that data page. Is that not the correct thing to do? It doesn’t work, whatever.
I got the inline editing working, left with one issue I;m trying to solve but without much luck.
I need a parent- editing project between posts and posmeta. That I have managed to setup but all of the postmeta values are being returned whereas I would like to restrict them.
I know taht it can be done becuase I have done it in the query builder:
SELECT15_postmeta.post_id` as ‘Post_id’
,15_postmeta.meta_keyas ‘Meta_key’
,15_postmeta.meta_valueas ‘Meta_value’
FROM15_postmeta
WHERE (15_postmeta.meta_key= ‘_stock’)
OR (15_postmeta.meta_key= ‘_price’)
ORDER BY15_postmeta.post_idasc`I cannot achieve the same result in a template, tried adding the where clause makes no difference. Have I missed a step do you think?
I should have realised that if it walks like a duck, quacks like a duck and looks like a duck then it almost certainly is a duck. Buried deep within the postmeta table were other references to product stock quantity and price.
I managed to get a data project built and got a an editable backend form working. Not had as much success with an inline back end form thus far (signed up for the free premium trial to test it). I know you said that the inline front end inline data form editing is not yet available.
Will play around some more and see if I can get that to function.
Further experimentation results
data altered by wpda gets saved back to the table and can be see by any queries created with wpda. BUT if I look at a product on the front end the chaged data is not shown, the only way to change product data and have it shown on the front end is to do so in the Products themselves. Then they will show up in the product page at the front end, but curiously they’ll also show up in the wpda queries.
Were it not for the fact that I know there aren’t I’d almost be tempted to say that there are two different tables.
Now I know from reading the documentation that inline editing in the free version is limited. Have I stumbled across one of these limits without realising it?
Running out of ideas to try. I hoping now that this is just a limitation of the free version, because I really like what I’m seeing here.
So I’ve done a fair bit of playing with the free edition. Plain wordpress site with woocommerce installed and the sample data provided by woocommerce loaded to have something to work with.
I experimented by setting up a project and creating a page linked to the WC_PRODUCT_META_LOOKUP table. I disabled the ability to add and delete rows but retained the ability to edit.
I can definitely edit the stock_quantity field and that gets saved back to the database, cofirmed by looking at it via phpmyadmin.
However if I look at the standard product entry (accessed via the products menu these edits are not shown. If I make an ammendment here though it is reflected in my wpda project, so I’m at something of a loss. wpda is changing the backend values but they are not being registered in the edit view for Products.
As WPDA is still very new to me I may be doing something wrong here but I’m not sure what.