diff --git a/assets/js/snipcart.js b/assets/js/snipcart.js index fd6946a..0e0dfee 100644 --- a/assets/js/snipcart.js +++ b/assets/js/snipcart.js @@ -7,7 +7,12 @@ window.SnipcartSettings = { // Redirection après paiement réussi document.addEventListener('snipcart.ready', function() { Snipcart.execute('bind', 'order.completed', function(order) { - window.location.href = '/thanks?order=' + order.token; + // Détecter la langue actuelle depuis l'URL + const currentPath = window.location.pathname; + const langMatch = currentPath.match(/^\/([a-z]{2})(\/|$)/); + const langPrefix = langMatch ? '/' + langMatch[1] : ''; + + window.location.href = langPrefix + '/thanks?order=' + order.token; }); }); diff --git a/site/blueprints/pages/product.yml b/site/blueprints/pages/product.yml index 4421e9e..52fde12 100644 --- a/site/blueprints/pages/product.yml +++ b/site/blueprints/pages/product.yml @@ -22,6 +22,7 @@ tabs: min: 0 step: 0.01 required: true + translate: false width: 1/4 stock: label: Stock @@ -99,6 +100,7 @@ tabs: fr: Options type: toggle default: false + translate: false width: 1/7 optionLabel: label: @@ -116,6 +118,7 @@ tabs: help: en: "Comma-separated values (e.g.: XS, S, M, L, XL)" fr: "Valeurs séparées par des virgules (ex: XS, S, M, L, XL)" + translate: false when: hasOptions: true width: 3/7