Skip to content

Commit

Permalink
Release/3.8.0 (#302)
Browse files Browse the repository at this point in the history
Release/3.8.0

Co-authored-by: Olsi Qose <44775916+olsi-qose@users.noreply.github.com>
  • Loading branch information
supercid and olsi-qose authored Nov 22, 2019
2 parents e4aaae4 + 37f80ed commit 655d330
Show file tree
Hide file tree
Showing 8 changed files with 75 additions and 6 deletions.
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Bug report
about: Report errors and problems
title: ''
labels: bug
assignees: ''

---

**Prestashop version(s) used**: x.y.z
**Extension version(s) affected**: x.y.z

**Description**
<!-- A clear and concise description of the problem. -->

**How to reproduce**
<!-- Code, config and/or steps needed to reproduce the problem. -->

**Possible Solution**
<!--- Optional: only if you have suggestions on a fix/reason for the bug -->

**Additional context**
<!-- Optional: any other context about the problem: log messages, screenshots, etc. -->
12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation-issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: Documentation Issue
about: Missing, misleading or incomplete documentation issues
title: ''
labels: docs
assignees: ''

---

**Documentation issue**
<!-- Before opening a new issue, please make sure you already checked -->
<!-- our exhaustive wiki documentation at https://github.com/nosto/nosto-prestashop/wiki -->
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Ideas for new features and improvements
title: ''
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->

**Describe the solution you'd like**
<!-- A clear and concise description of what you want to happen. -->

**Describe alternatives you've considered**
<!-- A clear and concise description of any alternative solutions or features you've considered. -->

**Additional context**
<!-- Add any other context or screenshots about the feature request here. -->
4 changes: 1 addition & 3 deletions .github/pull-request-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@
<!--- Upon PR's approval, link the wiki page for your corresponding changes here. -->

## Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [ ] My code follows the code style of this project.
- [ ] I have updated the documentation accordingly.
- [ ] All new and existing tests passed.
- [ ] I have assigned the correct milestone or created one if non existent.
- [ ] I have assigned the correct milestone or created one if non-existent.
- [ ] I have correctly labeled this pull request.
- [ ] I have linked the corresponding issue in this description.
- [ ] I have updated the corresponding Jira ticket.
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ This project adheres to Semantic Versioning(http://semver.org/).

## 3.8.0
- Add feature flag to enable/disable search term escaping for Nosto tagging
- Send active domain with API calls when upserting product and creating order

## 3.7.1
- Allow reconnecting same account to the same store in same language
Expand Down
15 changes: 14 additions & 1 deletion classes/helpers/NostoHelperUrl.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
*/

use Nosto\NostoException;
use Nosto\Request\Http\HttpRequest as NostoSDKHttpRequest;
use Nosto\Helper\UrlHelper;

class NostoHelperUrl
{
Expand Down Expand Up @@ -282,7 +284,7 @@ public static function getControllerUrl($controllerClassName, $employeeId)
*
* @return string the base url.
*/
private static function getBaseUrl()
public static function getBaseUrl()
{
$idShop = (int)NostoHelperContext::getShopId();
$ssl = Configuration::get(self::PS_SSL_ENABLED);
Expand Down Expand Up @@ -325,4 +327,15 @@ public static function getContextShopUrl()

return $base . $lang;
}

/**
* Returns shop domain
*
* @return string
* @throws NostoException
*/
public static function getShopDomain()
{
return UrlHelper::parseDomain(self::getBaseUrl());
}
}
3 changes: 2 additions & 1 deletion classes/services/NostoOrderService.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,11 @@ function () use ($order) {
return;
}
$account = NostoHelperAccount::getAccount();
$shopDomain = NostoHelperUrl::getShopDomain();
if ($account !== null && $account->isConnectedToNosto()) {
$customerId = NostoCustomerManager::getNostoId($order);

$operation = new NostoSDKOrderConfirmOperation($account);
$operation = new NostoSDKOrderConfirmOperation($account, $shopDomain);
$operation->send($nostoOrder, $customerId);
try {
if (NostoOrderService::$syncInventoriesAfterOrder === true) {
Expand Down
3 changes: 2 additions & 1 deletion classes/services/NostoProductService.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,9 @@ private function update(array $products)

foreach ($productsInStore as $data) { //@codingStandardsIgnoreLine
$nostoAccount = $data[self::KEY_ACCOUNT];
$shopDomain = NostoHelperUrl::getShopDomain();
foreach ($data[self::KEY_DATA] as $batches) { //@codingStandardsIgnoreLine
$op = new NostoSDKUpsertProductOperation($nostoAccount);
$op = new NostoSDKUpsertProductOperation($nostoAccount, $shopDomain);
$op->setResponseTimeout(self::$apiWaitTimeout);
foreach ($batches as $product) {
$op->addProduct($product);
Expand Down

0 comments on commit 655d330

Please sign in to comment.