as in title, i'm trying to get sum of my variable product (for each product) in admin instead of 'out-of-stock' or 'in-stock' indication. I've variable product so i need sum of one variation to get all my product (ive a pant in different size and different colour but i need only sum of all size). Anyone got this before me? Thanks in advance, Francesco
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- SQL join to get the cartesian product of 2 columns
- sql execution latency when assign to a variable
- Difference between Types.INTEGER and Types.NULL in
Finally i found solution. First of all added this
to functions.php in order to have a column in my backend.
Then i've added also this
where
$query
is SQL query that sum all_stock
value inpostmeta
table forpost_parent
posts that are the variations ofpost_id
.Sorry for my poor english (i'm italian), i hope this code can be helpful fot other people. Francesco.