Skip to content

Commit c272a43

Browse files
author
andreicotaga
committed
Changes for sdk
1 parent dd21ac1 commit c272a43

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

lib/Api/Customers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class Customers extends AbstractRetargetingSDK
2020
protected $token;
2121
protected $data = [];
2222
protected $currentPage = 1;
23-
protected $lastPage = 20;
23+
protected $lastPage = '';
2424
protected $nextPage = '';
2525
protected $prevPage = '';
2626

lib/Product.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
use RetargetingSDK\Helpers\BrandHelper;
1111
use RetargetingSDK\Helpers\CategoryHelper;
12+
use RetargetingSDK\Helpers\ProductFeedHelper;
1213
use RetargetingSDK\Helpers\UrlHelper;
1314
use RetargetingSDK\Helpers\VariationsHelper;
1415

@@ -108,11 +109,12 @@ public function getPrice()
108109
}
109110

110111
/**
111-
* @param mixed $price
112+
* @param $price
113+
* @throws \Exception
112114
*/
113115
public function setPrice($price)
114116
{
115-
$price = $this->formatIntFloatString($price);
117+
$price = ProductFeedHelper::formatPrice($price);
116118

117119
$this->price = $price;
118120
}
@@ -126,13 +128,14 @@ public function getPromo()
126128
}
127129

128130
/**
129-
* @param float $promo
131+
* @param $promo
132+
* @throws \Exception
130133
*/
131134
public function setPromo($promo)
132135
{
133136
if($promo > 0 && $promo < $this->getPrice())
134137
{
135-
$promo = $this->formatIntFloatString($promo);
138+
$promo = ProductFeedHelper::formatPrice($promo);
136139
}
137140
else
138141
{

0 commit comments

Comments
 (0)