Add Odoo Version dropdown (19.0/20.0) next to server location in pricing section; include version in buyNow basket POST

This commit is contained in:
Reef committed 2026-09-27 10:02:22 +00:00
1 parent e5604381da
commit 246beeb231
2 files changed
+10 -1

No files matched your search

+5
View File
@@ -262,6 +262,11 @@
<div class="pricing-server-row">
<label for="pricingServerLocation">Server Location</label>
<select id="pricingServerLocation" class="pricing-server-select"></select>
<label for="pricingOdooVersion">Odoo Version</label>
<select id="pricingOdooVersion" class="pricing-server-select">
<option value="19.0">19.0 &mdash; Tons of OCA supported modules</option>
<option value="20.0">20.0 &mdash; Latest Greatest</option>
</select>
</div>
<div class="pricing-grid">
<!-- Side Hustle -->
+5 -1
View File
@@ -640,6 +640,8 @@ var si = 0,
window.buyNow = function (productId) {
var locSelect = document.getElementById('pricingServerLocation');
var location = locSelect ? locSelect.value : '';
var verSelect = document.getElementById('pricingOdooVersion');
var version = verSelect ? verSelect.value : '';
var form = document.createElement('form');
form.method = 'POST';
form.action = 'https://odoo.odoo4projects.com/shop/post_basket';
@@ -649,7 +651,9 @@ var si = 0,
basket.type = 'hidden';
basket.name = 'basket';
var item = { product_id: productId, qty: 1 };
if (location) { item.info = location.replace('.odoo4projects.com', ''); }
var info = location ? location.replace('.odoo4projects.com', '') : '';
if (version) { info += (info ? '|' : '') + version; }
if (info) { item.info = info; }
basket.value = JSON.stringify([item]);
console.log('Buy basket:', basket.value);
form.appendChild(basket);