Skip to content

Commit 5c8d683

Browse files
Update to 1.2.3
1 parent c839786 commit 5c8d683

File tree

8 files changed

+35
-9
lines changed

8 files changed

+35
-9
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Flowbox integration for Magento2
44

55
Facts
66
-----
7-
- version: 1.2.2
7+
- version: 1.2.3
88
- extension key: Itonomy_Flowbox
99

1010
Description

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "itonomy/module-flowbox",
33
"description": "Flowbox for Magento2",
44
"type": "magento2-module",
5-
"version": "1.2.2",
5+
"version": "1.2.3",
66
"license": [
77
"MIT"
88
],

composer.json.marketplace

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "itonomy/module-flowbox",
33
"description": "Flowbox for Magento2",
44
"type": "magento2-module",
5-
"version": "1.2.2",
5+
"version": "1.2.3",
66
"license": [
77
"MIT"
88
],

src/Block/Checkout/Onepage/Success.php

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function __construct(
3030
parent::__construct($context, $encryptor, $data);
3131
$this->checkoutSession = $checkoutSession;
3232
}
33-
33+
3434
/**
3535
* @inheritDoc
3636
*/
@@ -50,7 +50,7 @@ function ($item) {
5050
'quantity' => (int) $item->getQtyOrdered()
5151
];
5252
},
53-
$order->getItems()
53+
$this->getAllVisibleItems($order)
5454
),
5555
]);
5656
} catch (\Exception $e) {
@@ -64,4 +64,20 @@ function ($item) {
6464
$this->_logger->error($errorMessage, ['exception' => $e]);
6565
}
6666
}
67-
}
67+
/**
68+
* Retrieves visible products of the order, omitting its children (yes, this is different than Magento's method)
69+
* @param Magento\Sales\Model\Order $order
70+
*
71+
* @return array
72+
*/
73+
protected function getAllVisibleItems($order)
74+
{
75+
$items = [];
76+
foreach ($order->getItems() as $item) {
77+
if (!$item->isDeleted() && !$item->getParentItem()) {
78+
$items[] = $item;
79+
}
80+
}
81+
return $items;
82+
}
83+
}

src/etc/config.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,13 @@
1414
<debug_javascript>0</debug_javascript>
1515
</general>
1616
</itonomy_flowbox>
17+
<dev>
18+
<js>
19+
<minify_exclude>
20+
<flowbox>https://connect.getflowbox.com/flowbox.js</flowbox>
21+
<flowbox_checkout>https://connect.getflowbox.com/bzfy-checkout.js</flowbox_checkout>
22+
</minify_exclude>
23+
</js>
24+
</dev>
1725
</default>
1826
</config>

src/etc/csp_whitelist.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<value id="amazon-aws" type="host">https://*.amazonaws.com</value>
1414
<value id="flowbox-cdn" type="host">https://cdn.flbx.io</value>
1515
<value id="flowbox" type="host">https://connect.getflowbox.com</value>
16+
<value id="flowbox-insecure" type="host">http://connect.getflowbox.com</value>
1617
</values>
1718
</policy>
1819
<policy id="img-src">
@@ -24,7 +25,8 @@
2425
<values>
2526
<value id="flowbox-cdn" type="host">https://cdn.flbx.io</value>
2627
<value id="flowbox" type="host">https://connect.getflowbox.com</value>
28+
<value id="flowbox-insecure" type="host">http://connect.getflowbox.com</value>
2729
</values>
2830
</policy>
2931
</policies>
30-
</csp_whitelist>
32+
</csp_whitelist>

src/etc/module.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
10-
<module name="Itonomy_Flowbox" setup_version="1.2.2">
10+
<module name="Itonomy_Flowbox" setup_version="1.2.3">
1111
<sequence>
1212
</sequence>
1313
</module>

src/view/frontend/templates/checkout/success.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"components": {
1717
"flowbox-checkout": {
1818
"component": "Itonomy_Flowbox/js/checkout",
19-
"config": <?= $block->escapeJs($block->getJsConfig()) ?>,
19+
"config": <?= /* @escapeNotVerified */ $block->getJsConfig() ?>,
2020
"dataScope": "flowbox"
2121
}
2222
}

0 commit comments

Comments
 (0)