0
Hello support,
I have products varriants and I am struggling with product detail page, where it shows only product name (qty) so I have to basically click each invoice to see the detail of varriants product and check if quantity is right or not.
is there a way or modification i can make to show the Product Varriants next to the Product name in Product detail page?
example now it shows
Product name (qty)
please see my screenshot of how it looks now .
could it be >>
Product name
(varriants 1 = qty)
(varriants 2 = qty) etc...
or it could display like what it display in invoice as summary (see my last attachment)
Thank you
0
Hello,
I get the code from repo. You can try replace the line 2232 - 2239 with following
$this->db
->select("date, reference_no, biller, customer, GROUP_CONCAT(CONCAT({$this->db->dbprefix('sale_items')}.product_name, ' ', {$this->db->dbprefix('product_variants')}.name, ' (', ROUND({$this->db->dbprefix('sale_items')}.quantity, {$this->Settings->qty_decimals}), ')') SEPARATOR '\n') as iname, grand_total, paid, payment_status", false)
->from('sales')
->join('sale_items', 'sale_items.sale_id=sales.id', 'left')
->join('warehouses', 'warehouses.id=sales.warehouse_id', 'left')
->join('product_variants', 'product_variants.id=sale_items.option_id', 'left')
->group_by('sales.id')
->order_by('sales.date desc');
I don't have machine with php8 so I am unable to check this but it should add the variant name after products name in column E.
Thank you
0
Mian Saleem
I have tried but the exported report are missing data and variant still not showing
you could check my attached screenshot
0
here attachments
0
The item those are not showing maybe because they are not having any variants, so it might be a bit of query condition missing.
0
Mian Saleem so you have any idea about that ?
0
Hello,
I am not so sure but it should be due to new changes. Maybe you can try case statement, something like
$this->db
->select("date, reference_no, biller, customer, GROUP_CONCAT(CONCAT({$this->db->dbprefix('sale_items')}.product_name, (CASE WHEN {$this->db->dbprefix('sale_items')}.option_id > 0 THEN CONCAT(' ', {$this->db->dbprefix('product_variants')}.name) ELSE '' END), ' (', ROUND({$this->db->dbprefix('sale_items')}.quantity, {$this->Settings->qty_decimals}), ')') SEPARATOR '\n') as iname, grand_total, paid, payment_status", false)
->from('sales')
->join('sale_items', 'sale_items.sale_id=sales.id', 'left')
->join('warehouses', 'warehouses.id=sales.warehouse_id', 'left')
->join('product_variants', 'product_variants.id=sale_items.option_id', 'left')
->group_by('sales.id')
->order_by('sales.date desc');
Thank you
0
Mian Saleem Wonderful,
It works.
Thank you very much
Showing 11 to 17 of total 17 records
We use Cookies
We use cookies to ensure that we give you the best experience on our website. By continuing to browse the site you are agreeing to our use of cookies.