diff options
| -rw-r--r-- | views/js/frontend.js | 25 | ||||
| -rw-r--r-- | views/produkttemplates/standard.phtml | 2 |
2 files changed, 27 insertions, 0 deletions
diff --git a/views/js/frontend.js b/views/js/frontend.js index 67b69f5..487007a 100644 --- a/views/js/frontend.js +++ b/views/js/frontend.js @@ -16,6 +16,31 @@ } // wpsg_mod_basketteaser_add(produkt_id)
+ /**
+ * Aktualisiert ein eventuell eingebundenes Warenkorbwidget
+ */
+ function wpsg_refreshBasketWidget()
+ {
+
+ if (jQuery('.wpsg_basket_widget').length <= 0) return;
+
+ jQuery('.wpsg_basket_widget').html('<img class="loading" src="' + wpsg_ajax.img_ajaxloading + '" alt="' + wpsg_ajax.label_pleasewait + '" />');
+
+ jQuery.ajax( {
+ url: wpsg_ajax.url_basket,
+ data: {
+ 'wpsg[ajax]': 1,
+ 'wpsg[action]': 'widget'
+ },
+ success: function(data) {
+
+ jQuery('.wpsg_basket_widget').html(data);
+
+ }
+ } );
+
+ } // function wpsg_refreshBasketWidget()
+
function wpsg_customerquestion(url_redirect)
{
diff --git a/views/produkttemplates/standard.phtml b/views/produkttemplates/standard.phtml index 3d63b63..0da35d4 100644 --- a/views/produkttemplates/standard.phtml +++ b/views/produkttemplates/standard.phtml @@ -310,6 +310,8 @@ success: function(data)
{
+ wpsg_refreshBasketWidget();
+
<?php if ($this->get_option('wpsg_afterinsert') == '2') { ?>
tb_show('<?php echo __('Ihr Warenkorb', 'wpsg'); ?>', '<?php echo $this->getURL(wpsg_ShopController::URL_BASKET_AJAX); ?>&height=500');
<?php } else { ?>
|
