Skip to content

Commit

Permalink
Получение товаров из affproduct_v2
Browse files Browse the repository at this point in the history
  • Loading branch information
skeeks-semenov committed Aug 15, 2017
1 parent 4e5c2f2 commit a7a1b9e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,6 +1,10 @@
CHANGELOG
==============

2.1.2.1
-----------------
* Получение товаров из affproduct_v2

2.1.2
-----------------
* Добавлена работа с canurl
Expand Down
8 changes: 8 additions & 0 deletions src/config/agents.php
Expand Up @@ -93,5 +93,13 @@
'is_period' => 'N'
],

'v3toys/products/load affproduct_v2' =>
[
'description' => 'Получение и обновление данных по товарам аффилиата v2',
'agent_interval' => 3600,
'next_exec_at' => \Yii::$app->formatter->asTimestamp(time()) + 60,
'is_period' => 'N'
],


];
4 changes: 2 additions & 2 deletions src/console/controllers/ProductsController.php
Expand Up @@ -66,7 +66,7 @@ public function optionAliases()
/**
* Обновление цен и налчия товаров
*/
public function actionLoad()
public function actionLoad($table = 'affproduct')
{
ini_set("memory_limit","8192M");
set_time_limit(0);
Expand Down Expand Up @@ -104,7 +104,7 @@ public function actionLoad()
}

$query = (new \yii\db\Query())
->from('apiv5.affproduct')
->from('apiv5.' . $table)
->where(["!=", 'title', ""])
//->andWhere(["!=", 'description', ""])
//->andWhere(["!=", 'main_image_path', ""])
Expand Down

0 comments on commit a7a1b9e

Please sign in to comment.