Skip to content

Commit

Permalink
Merge pull request #501 from alma/release/v4.1.1
Browse files Browse the repository at this point in the history
Release v4.1.1
  • Loading branch information
Benjamin-Freoua-Alma authored Jul 10, 2024
2 parents f8c2baa + 442db21 commit d083180
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 44 deletions.
2 changes: 2 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ categories:

exclude-labels:
- 'skip-changelog'
- 'release'
- 'hotfix'
- 'type: chore'
- 'type: ci'
- 'type: refactor'
Expand Down
5 changes: 0 additions & 5 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@
"matchManagers": ["dockerfile", "docker-compose"],
"groupName": "docker updates"
},
{
"matchManagers": ["github-actions"],
"matchPackageNames": ["LoveToKnow/slackify-markdown-action"],
"enabled": false
},
{
"description": "PHP, composer and Prestashop versions in Dockerfiles must be freezed",
"matchManagers": ["dockerfile"],
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/release-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@ jobs:
});
- name: Format release notes for Slack
# v1.0.2 cannot be used as it is not correctly handling the newlines
uses: LoveToKnow/[email protected]
uses: LoveToKnow/[email protected]
id: slack-markdown-release-notes
with:
text: |
Expand All @@ -112,13 +111,12 @@ jobs:
${{ steps.fetch-release-draft.outputs.body }}
:warning: This release will be available on PrestaShop marketplace in a few hours
cc <@france.berut> <@khadija.cherif>
- name: Send changelog to Slack
uses: slackapi/[email protected]
with:
# TODO: Replace with channel #alma_changelog (id: CR9C57YM6) once full testing is done
# Channel `#devx-experiments`
channel-id: C04MQ9VEWRF
channel-id: CR9C57YM6
slack-message: ${{ steps.slack-markdown-release-notes.outputs.text }}
payload: |
{
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## v4.1.1 - 2024-07-10

### Changes

- fix: add insurance from cart page with multiple execution (#499)

#### Contributors

@Benjamin-Freoua-Alma, @carine-bonnafous and @github-actions

## v4.1.0 - 2024-07-08

- feat: Link your store with PS Account
Expand Down
4 changes: 2 additions & 2 deletions alma/alma.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

class Alma extends PaymentModule
{
const VERSION = '4.1.0';
const VERSION = '4.1.1';

public $_path;
public $local_path;
Expand Down Expand Up @@ -83,7 +83,7 @@ public function __construct()
{
$this->name = 'alma';
$this->tab = 'payments_gateways';
$this->version = '4.1.0';
$this->version = '4.1.1';
$this->author = 'Alma';
$this->need_instance = false;
$this->bootstrap = true;
Expand Down
67 changes: 35 additions & 32 deletions alma/views/js/alma-cart-insurance.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,42 +184,45 @@ function onloadInsuranceClickEvents() {
});

window.addEventListener('message', (e) => {
if (e.data.type === 'getSelectedInsuranceData') {
let idIframeModal = $('#' + e.data.idIframeModal);

if (e.data.selectedInsuranceData !== null) {
$.ajax({
type: 'POST',
url: '/module/alma/insurance?action=addInsuranceProduct',
dataType: 'json',
data: {
ajax: true,
token: idIframeModal.attr('data-token'),
product_id: idIframeModal.attr('data-product-id'),
product_attribute_id: idIframeModal.attr('data-product-attribute-id'),
customization_id: idIframeModal.attr('data-product-customization-id'),
insurance_contract_id: e.data.selectedInsuranceData.insuranceContractId,
insurance_quantity: e.data.selectedInsuranceQuantity
},
handleAddInsuranceProductFromWidget(e);
});
}

function handleAddInsuranceProductFromWidget(e) {
if (e.data.type === 'getSelectedInsuranceData') {
let idIframeModal = $('#' + e.data.idIframeModal);

if (e.data.selectedInsuranceData !== null) {
$.ajax({
type: 'POST',
url: '/module/alma/insurance?action=addInsuranceProduct',
dataType: 'json',
data: {
ajax: true,
token: idIframeModal.attr('data-token'),
product_id: idIframeModal.attr('data-product-id'),
product_attribute_id: idIframeModal.attr('data-product-attribute-id'),
customization_id: idIframeModal.attr('data-product-customization-id'),
insurance_contract_id: e.data.selectedInsuranceData.insuranceContractId,
insurance_quantity: e.data.selectedInsuranceQuantity
},
})
.success(function () {
location.reload();
})
.success(function () {
location.reload();
})

.error(function (e) {
console.log(e)
//location.reload();
});
}

removeLoaderDot();
.error(function (e) {
console.log(e)
//location.reload();
});
}
if (e.data.type === 'almaEligibilityAnswer') {
if (e.data.eligibilityCallResult.length > 0) {
$('#' + e.data.iFrameIdForProductWidget).show();
}
}
if (e.data.type === 'almaEligibilityAnswer') {
if (e.data.eligibilityCallResult.length > 0) {
$('#' + e.data.iFrameIdForProductWidget).show();
}
});
}
window.removeEventListener('message', handleAddInsuranceProductFromWidget);
}

// ** Display extra info for insurance under the item product on cart **
Expand Down

0 comments on commit d083180

Please sign in to comment.