Skip to content

Commit

Permalink
Merge pull request #24 from koala-framework/fixes
Browse files Browse the repository at this point in the history
Fixes
  • Loading branch information
lllHuber committed Apr 23, 2021
2 parents 2e8ebb3 + 76c31ff commit f8a83bf
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public function getTemplateVars(Kwf_Component_Renderer_Abstract $renderer)
$order = $renderer->getRecipient();
$ret['items'] = $order->getProductsData();
foreach ($ret['items'] as &$r) {
if (!isset($r->additionalOrderData[0])) continue; // vouchers don't have additionalOrderData
$r->additionalOrderData[0]['name'] = $this->getData()->trlStaticExecute($r->additionalOrderData[0]['name']);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public function sendContent($includeMaster)
->getReferencedModel('Order')->getCartOrder();
$db = Kwf_Registry::get('db');
$db->query(
"UPDATE `KwcShop_Kwc_Shop_orders` SET `status` = 'cart' WHERE `id` = {$db->quote($order->id)} AND `status` = 'processing'"
"UPDATE `kwc_shop_orders` SET `status` = 'cart' WHERE `id` = {$db->quote($order->id)} AND `status` = 'processing'"
);
unset($session->paypalCartId);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public function processInput($data)
$db = Kwf_Registry::get('db');

$date = date('Y-m-d H:i:s');
$sql = "UPDATE `KwcShop_Kwc_Shop_orders` SET
$sql = "UPDATE `kwc_shop_orders` SET
`payment_component_id` = {$db->quote($this->getData()->parent->componentId)},
`checkout_component_id` = {$db->quote($this->getData()->parent->parent->componentId)},
`cart_component_class` = {$db->quote($this->getData()->parent->parent->parent->componentClass)},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
var onReady = require('kwf/commonjs/on-ready-ext2');
var onReady = require('kwf/commonjs/on-ready');
var $ = require('jQuery');

onReady.onRender('.kwcClass', function(el, config) {
var form = el.child('form');
form.on('submit', function(e) {
onReady.onRender('.kwcClass', function(el) {
var form = el.find('form');
form.one('submit', function(e) {
e.preventDefault();
el.child('.process').show();
el.find('.kwcBem__process').show();
form.hide();
Ext2.Ajax.request({
url: config.controllerUrl,
params: config.params,
callback: function(response, options) {
this.dom.submit();
},
scope: form
});
}, this);
var config = el.data('options');
$.post(config.controllerUrl, config.params)
.done(function (response) {
form.submit();
});
});
});

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<div class="{{ rootElementClass }}" data-options="{{ options|json_encode }}">
<input type="hidden" value="{{ options|json_encode }}">
{{ paypalButton|raw }}
<div class="{{ 'process'|bemClass }}"></div>
<div class="{{ 'error'|bemClass }}"></div>
</div>

0 comments on commit f8a83bf

Please sign in to comment.