Widget: Support button with subevent but without items

This commit is contained in:
Raphael Michel
2021-03-16 19:01:18 +01:00
parent 5ae839f62e
commit eae55e4b5a

View File

@@ -614,7 +614,12 @@ var shared_methods = {
}, },
resume: function () { resume: function () {
var redirect_url; var redirect_url;
redirect_url = this.$root.target_url + 'w/' + widget_id + '/?iframe=1&locale=' + lang; redirect_url = this.$root.target_url + 'w/' + widget_id + '/';
if (this.$root.subevent && !this.$root.cart_id) {
// button with subevent but no items
redirect_url += this.$root.subevent + '/';
}
redirect_url += '?iframe=1&locale=' + lang;
if (this.$root.cart_id) { if (this.$root.cart_id) {
redirect_url += '&take_cart_id=' + this.$root.cart_id; redirect_url += '&take_cart_id=' + this.$root.cart_id;
} }