Product Variants Not Loading on Localhost

I tested Dolibarr RC version on our web server, and the product variants worked fine. I could add them to products, no problem. Now that I have version 6.0.1 installed on our localhost server, the variants no longer load when selected on the product card. The tab shows up and it looks like it should work, but after selecting a type of variant, the options never show up, just says “Loading” and never actually loads anything.

Any ideas or suggestions?

So I’ve been scouring the code looking for where the problem may be. I found this in C:\dolibarr\www\dolibarr\htdocs\variants\combinations.php: (<-- that is how it is installed on our localhost…we installed using DoliWamp and not sure why it has a dolibarr directory and then a “www” directory than ANOTHER “dolibarr” directory, but it does, and I digress)

if (GETPOST(‘selectvariant’))
{
$action = ‘add’;
if (GETPOST(‘attribute’) != ‘-1’ && GETPOST(‘value’) != ‘-1’)
{
$selectedvariant[GETPOST(‘attribute’).’:’.GETPOST(‘value’)]=GETPOST(‘attribute’).’:’.GETPOST(‘value’);
$SESSION['addvariant’.$object->id]=$selectedvariant;
}
}

It seems like somewhere in there lies the answer…but where?

Ok, so I’ve narrowed it down to having to do with the IP addresses when using dolibarr remotely. If I create a product variant combination while using the computer on which Dolibarr is installed (localhost), it does work. It is only when I access it remotely using an IP address that I have issues. Is this a port issue?

So I found this code further down, and this is where it is actually calling for the list (or at least that what it looks like to me - and keep in mind, I am not a developer by any means):

variants_available = <?php echo json_encode($prodattr_alljson) ?\>; variants_selected = { index: [], info: [] }; <?php foreach ($productCombination2ValuePairs1 as $pc2v) { $prodattr_val-\>fetch($pc2v-\>fk_prod_attr_val); ?\> variants_selected.index.push(<?php echo $pc2v-\>fk_prod_attr ?\>); variants_selected.info[<?php echo $pc2v-\>fk_prod_attr ?\>] = { attribute: variants_available[<?php echo $pc2v-\>fk_prod_attr ?\>], value: { id: <?php echo $pc2v-\>fk_prod_attr_val ?\>, label: '<?php echo $prodattr_val-\>value ?\>' } }; <?php } ?\> restoreAttributes = function() { jQuery("select[name=attribute]").empty().append(' '); jQuery.each(variants_available, function (key, val) { if (jQuery.inArray(val.id, variants_selected.index) == -1) { jQuery("select[name=attribute]").append('' \+ val.label \+ ''); } }); }; jQuery(document).ready(function() { jQuery("select#attribute").change(function () { console.log("Change of field variant attribute"); var select = jQuery("select#value"); if (!jQuery(this).val().length || jQuery(this).val() == '-1') { select.empty(); select.append(' '); return; } select.empty().append('Loading...'); jQuery.getJSON("<?php echo dol_buildpath('/variants/ajax/get_attribute_values.php', 2) ?\>", { id: jQuery(this).val() }, function(data) { if (data.error) { select.empty(); select.append(' '); return alert(data.error); } select.empty(); select.append(' '); jQuery(data).each(function (key, val) { keyforoption = val.id valforoption = val.value select.append('' \+ valforoption \+ ''); }); }); }); }); And more specifcally, within here: select.empty().append('Loading...'); jQuery.getJSON("<?php echo dol_buildpath('/variants/ajax/get_attribute_values.php', 2) ?\>", { id: jQuery(this).val() }, function(data) { if (data.error) { select.empty(); select.append(' '); return alert(data.error); } And I checked out the /variants/ajax/get_attribute_vaules.php file but couldn't identify anything obvious that would block it from a remote IP. Am I looking in the wrong spots? I have a feeling this is probably fairly simple and it is killing me that I cannot figure it out!

It works on our localhost server (the actual computer where the files are installed) but not other workstations on our local network. So doesn’t seem to be a coding issue. Maybe a permissions issue??