Page 1 of 1
Total products price
Posted: 15 Oct 2019, 23:24
by Zaydy
Hi Team
How can I get total price and total original price? Either to be in control panel phoca cart interface or in the left menu column.
Any help in this?
Re: Total products price
Posted: 16 Oct 2019, 14:03
by Jan
Hi, what do you exactly mean? Total is displayed in calculation but original price is not included in calculation, it is just "design" price to see what was the price previously in past.
Jan
Re: Total products price
Posted: 16 Oct 2019, 20:04
by Zaydy
Hi
In the control panel products list there is two columns: price and original price, is there a way around to sum up automatically price column to get total price of all products. Likewise to original price column.
Re: Total products price
Posted: 20 Oct 2019, 23:46
by Zaydy
Any advice on this
Re: Total products price
Posted: 21 Oct 2019, 12:44
by Jan
Hi, there is no such option to counting all prices together to get total price of all products but if this is needed, some simple sql query can just return the sum of all price columns from database directly, something like this:
Code: Select all
select sum(price) from jos_phocacart_products where published = 1;
But still no idea what do you exactly mean with original price column. Such is not used in any calculation or statistics. Can you paste a screenshot what do you exactly mean?
Jan
Re: Total products price
Posted: 24 Oct 2019, 11:47
by Zaydy
Hi
There is button for attaching a screenshot in this forum.
Re: Total products price
Posted: 24 Oct 2019, 13:14
by Jan
Hi, see phoca forum rules, just upload your image to imgur, copy the bb code from imgur and paste it here:
https://www.phoca.cz/documents/50-phoca ... forum-post
Jan
Re: Total products price
Posted: 24 Oct 2019, 15:58
by Zaydy
Re: Total products price
Posted: 25 Oct 2019, 13:31
by Jan
Hi, now I understand, so there is no such option and this needs to be customized.
The number you can get per SQL queries like this:
Code: Select all
select sum(price) from jos_phocacart_products where published = 1;
select sum(original_price) from jos_phocacart_products where published = 1;
So the number then should be loaded from database and pasted in the control panel view:
administrator\components\com_phocacart\views\phocacartcp\tmpl\default.php
Jan