Total products price

Phoca Cart - complex e-commerce extension
Zaydy
Phoca Newbie
Phoca Newbie
Posts: 8
Joined: 15 Oct 2019, 22:26

Total products price

Post 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?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Total products price

Post 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
If you find Phoca extensions useful, please support the project
Zaydy
Phoca Newbie
Phoca Newbie
Posts: 8
Joined: 15 Oct 2019, 22:26

Re: Total products price

Post 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.
Zaydy
Phoca Newbie
Phoca Newbie
Posts: 8
Joined: 15 Oct 2019, 22:26

Re: Total products price

Post by Zaydy »

Any advice on this
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Total products price

Post 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
If you find Phoca extensions useful, please support the project
Zaydy
Phoca Newbie
Phoca Newbie
Posts: 8
Joined: 15 Oct 2019, 22:26

Re: Total products price

Post by Zaydy »

Hi

There is button for attaching a screenshot in this forum.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Total products price

Post 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
If you find Phoca extensions useful, please support the project
Zaydy
Phoca Newbie
Phoca Newbie
Posts: 8
Joined: 15 Oct 2019, 22:26

Re: Total products price

Post by Zaydy »

User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Total products price

Post 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
If you find Phoca extensions useful, please support the project
Post Reply