Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
uses: actions/checkout@v2.0.0

- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: vendor
key: php-${{ hashFiles('composer.lock') }}
Expand Down Expand Up @@ -74,14 +74,14 @@ jobs:

# Add vendor folder in cache to make next builds faster
- name: Cache vendor folder
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: vendor
key: php-${{ hashFiles('composer.lock') }}

# Add composer local folder in cache to make next builds faster
- name: Cache composer folder
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.composer/cache
key: php-composer-cache
Expand Down
31 changes: 14 additions & 17 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<module>
<name>dashproducts</name>
<displayName><![CDATA[Dashboard Products]]></displayName>
<version><![CDATA[2.1.4]]></version>
<version><![CDATA[2.2.0]]></version>
<description><![CDATA[Adds a block with a table of your latest orders and a ranking of your products]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[dashboard]]></tab>
Expand Down
12 changes: 6 additions & 6 deletions dashproducts.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function __construct()
{
$this->name = 'dashproducts';
$this->tab = 'administration';
$this->version = '2.1.4';
$this->version = '2.2.0';
$this->author = 'PrestaShop';

parent::__construct();
Expand Down Expand Up @@ -119,7 +119,7 @@ public function getTableRecentOrders()
]),
Tools::htmlentitiesUTF8($order['firstname']),
Tools::htmlentitiesUTF8($order['lastname'])
) : '',
) : $this->trans('Deleted customer', [], 'AdminGlobal'),
'class' => 'text-left',
];
$tr[] = [
Expand Down Expand Up @@ -148,7 +148,7 @@ public function getTableRecentOrders()
'id' => 'details',
'value' => '',
'class' => 'text-right',
'wrapper_start' => '<a class="btn btn-default" href="index.php?controller=AdminOrders&id_order=' . (int) $order['id_order'] . '&vieworder&token=' . Tools::getAdminTokenLite('AdminOrders') . '" title="' . $this->trans('Details', [], 'Modules.Dashproducts.Admin') . '"><i class="icon-search"></i>',
'wrapper_start' => '<a class="btn btn-default" href="' . $this->context->link->getAdminLink('AdminOrders', true, [], ['id_order' => (int) $order['id_order'], 'vieworder' => 1]) . '" title="' . $this->trans('Details', [], 'Modules.Dashproducts.Admin') . '"><i class="icon-search"></i>',
'wrapper_end' => '</a>',
];

Expand Down Expand Up @@ -198,7 +198,7 @@ public function getTableBestSellers($date_from, $date_to)
SELECT
product_id,
product_name,
SUM(product_quantity-product_quantity_refunded-product_quantity_return-product_quantity_reinjected) as total,
SUM(product_quantity-product_quantity_refunded-product_quantity_return) as total,
p.price as price,
pa.price as price_attribute,
SUM(total_price_tax_excl / conversion_rate) as sales,
Expand Down Expand Up @@ -471,7 +471,7 @@ public function getTotalViewed($date_from, $date_to, $limit = 10)
WHERE pt.`name` = \'product\'
' . Shop::addSqlRestriction(false, 'pv') . '
AND dr.`time_start` BETWEEN "' . pSQL($date_from) . '" AND "' . pSQL($date_to) . '"
AND dr.`time_end` BETWEEN "' . pSQL($date_from) . '" AND "' . pSQL($date_to) . '"
AND dr.`time_end` BETWEEN "' . pSQL($date_from) . '" AND "' . pSQL($date_to) . ' 23:59:59"
ORDER BY pv.counter DESC
LIMIT ' . (int) $limit);
}
Expand All @@ -485,7 +485,7 @@ public function getMostSearchTerms($date_from, $date_to, $limit = 10)
return Db::getInstance((bool) _PS_USE_SQL_SLAVE_)->executeS('
SELECT `keywords`, count(`id_statssearch`) as count_keywords, `results`
FROM `' . _DB_PREFIX_ . 'statssearch` ss
WHERE ss.`date_add` BETWEEN "' . pSQL($date_from) . '" AND "' . pSQL($date_to) . '"
WHERE ss.`date_add` BETWEEN "' . pSQL($date_from) . '" AND "' . pSQL($date_to) . ' 23:59:59"
' . Shop::addSqlRestriction(false, 'ss') . '
GROUP BY ss.`keywords`
ORDER BY `count_keywords` DESC
Expand Down
Loading