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?
Total products price
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Total products price
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
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 8
- Joined: 15 Oct 2019, 22:26
Re: Total products price
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.
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.
-
- Phoca Newbie
- Posts: 8
- Joined: 15 Oct 2019, 22:26
Re: Total products price
Any advice on this
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Total products price
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:
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
Code: Select all
select sum(price) from jos_phocacart_products where published = 1;
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 8
- Joined: 15 Oct 2019, 22:26
Re: Total products price
Hi
There is button for attaching a screenshot in this forum.
There is button for attaching a screenshot in this forum.
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Total products price
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
https://www.phoca.cz/documents/50-phoca ... forum-post
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 8
- Joined: 15 Oct 2019, 22:26
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Total products price
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:
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
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;
administrator\components\com_phocacart\views\phocacartcp\tmpl\default.php
Jan
If you find Phoca extensions useful, please support the project