diff options
author | mattpiwik <matthieu.aubry@gmail.com> | 2011-09-19 11:56:23 +0400 |
---|---|---|
committer | mattpiwik <matthieu.aubry@gmail.com> | 2011-09-19 11:56:23 +0400 |
commit | 635f05698f4407b864dc39f435a226558dc6f871 (patch) | |
tree | f4a6fc2b55e3905638a5f3a4931fe16b30212ac1 /core/DataTable/Filter/ColumnCallbackAddColumnQuotient.php | |
parent | d3c082277fffbdeced912b15bfaebe79a5f3dd6c (diff) |
Fixes #2660
* Adding price tracking on Ecommerce pages, via JS or PHP api.
* Displaying price in API field avg_price ONLY IF the product was NOT purchased. If a product was purchased, the "display price" tracked is not displayed and purchased price is used instead.
* Price tracked with this feature will ONLY be displayed as "Avg_price" in Product Names, and Product SKUs ONLY WHEN the products havent been bought.
* Hacking around tracking price for ecommerce items, using a custom variable and small custom hacks to the SQL to get the average price for each custom var.
Similar to doing basic version of custom variables co variation
* Allow custom variables values to be integer (previously would fail to record the custom variable)
TODO: Update Doc
git-svn-id: http://dev.piwik.org/svn/trunk@5191 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'core/DataTable/Filter/ColumnCallbackAddColumnQuotient.php')
-rw-r--r-- | core/DataTable/Filter/ColumnCallbackAddColumnQuotient.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/DataTable/Filter/ColumnCallbackAddColumnQuotient.php b/core/DataTable/Filter/ColumnCallbackAddColumnQuotient.php index 3bfe42b87d..22f157b447 100644 --- a/core/DataTable/Filter/ColumnCallbackAddColumnQuotient.php +++ b/core/DataTable/Filter/ColumnCallbackAddColumnQuotient.php @@ -54,6 +54,11 @@ class Piwik_DataTable_Filter_ColumnCallbackAddColumnQuotient extends Piwik_DataT { foreach($table->getRows() as $key => $row) { + $existingValue = $row->getColumn($this->columnNameToAdd); + if($existingValue !== false) + { + continue; + } $value = $row->getColumn($this->columnValueToRead); if(!is_null($this->totalValueUsedAsDivisor)) { |