Skip to content

Commit

Permalink
More Stable Customer Endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
CasperKN committed Sep 24, 2020
1 parent e6ca4fe commit f3b1a1e
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion clerk.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function __construct()
$this->api = new Clerk_Api();
$this->name = 'clerk';
$this->tab = 'advertising_marketing';
$this->version = '6.1.0';
$this->version = '6.2.0';
$this->author = 'Clerk';
$this->need_instance = 0;
$this->ps_versions_compliancy = array('min' => '1.5', 'max' => _PS_VERSION_);
Expand Down
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>clerk</name>
<displayName><![CDATA[Clerk]]></displayName>
<version><![CDATA[6.1.0]]></version>
<version><![CDATA[6.2.0]]></version>
<description><![CDATA[Clerk.io Turns More Browsers Into Buyers]]></description>
<author><![CDATA[Clerk]]></author>
<tab><![CDATA[advertising_marketing]]></tab>
Expand Down
2 changes: 1 addition & 1 deletion config_da.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<module>
<name>clerk</name>
<displayName><![CDATA[Clerk]]></displayName>
<version><![CDATA[6.1.0]]></version>
<version><![CDATA[6.2.0]]></version>
<description><![CDATA[Clerk.io Turns More Browsers Into Buyers]]></description>
<author><![CDATA[Clerk]]></author>
<tab><![CDATA[advertising_marketing]]></tab>
Expand Down
2 changes: 1 addition & 1 deletion config_de.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<module>
<name>clerk</name>
<displayName><![CDATA[Clerk]]></displayName>
<version><![CDATA[6.1.0]]></version>
<version><![CDATA[6.2.0]]></version>
<description><![CDATA[Clerk.io Turns More Browsers Into Buyers]]></description>
<author><![CDATA[Clerk]]></author>
<tab><![CDATA[advertising_marketing]]></tab>
Expand Down
2 changes: 1 addition & 1 deletion config_fr.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<module>
<name>clerk</name>
<displayName><![CDATA[Clerk]]></displayName>
<version><![CDATA[6.1.0]]></version>
<version><![CDATA[6.2.0]]></version>
<description><![CDATA[Clerk.io Turns More Browsers Into Buyers]]></description>
<author><![CDATA[Clerk]]></author>
<tab><![CDATA[advertising_marketing]]></tab>
Expand Down
2 changes: 1 addition & 1 deletion config_it.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<module>
<name>clerk</name>
<displayName><![CDATA[Clerk]]></displayName>
<version><![CDATA[6.1.0]]></version>
<version><![CDATA[6.2.0]]></version>
<description><![CDATA[Clerk.io Turns More Browsers Into Buyers]]></description>
<author><![CDATA[Clerk]]></author>
<tab><![CDATA[advertising_marketing]]></tab>
Expand Down
11 changes: 10 additions & 1 deletion controllers/front/customer.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,17 @@ class ClerkCustomerModuleFrontController extends ClerkAbstractFrontController

public function __construct()
{
parent::__construct();

require_once (_PS_MODULE_DIR_. $this->module->name . '/controllers/admin/ClerkLogger.php');

$context = Context::getContext();

$this->logger = new ClerkLogger();

//Needed for PHP 5.3 support
$context = $this->context;

}
/**
* Get response
Expand All @@ -45,7 +54,7 @@ public function getJsonResponse()
{
try {
header('User-Agent: ClerkExtensionBot Prestashop/v' ._PS_VERSION_. ' Clerk/v'.Module::getInstanceByName('clerk')->version. ' PHP/v'.phpversion());
$customers = Customer::getCustomers(true);
$customers = Customer::getCustomers($this->getLanguageId(), $this->offset, $this->limit, $this->order_by, $this->order, false, true);

foreach ($customers as $index => $customer) {
//Rename id_customer to id and prepend to response
Expand Down

0 comments on commit f3b1a1e

Please sign in to comment.