Hallo,
ich habe hier mal eine Lösung die meiner Meineung nach funktioniert. In der wpshopgermany.js müsst ihr eine neue Funktion zum Vari switchen einfügen, meine sieht so aus:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Code: Alles auswählen
newswitchVari = function(p_id, v_id) {
if (jQuery("#preis_" + p_id) == null) return;
var var_class = jQuery("#select_" + p_id + " option:selected").attr("class");
var var_preis = var_class.split("|")[0];
var var_weight = var_class.split("|")[1];
var var_stock = var_class.split("|")[2];
jQuery("#preis_" + p_id).html( number_format(getFloat(jQuery("#gp_" + p_id).html()) + getFloat(jQuery("#select_" + p_id + " option:selected").attr("class")), 2, ',', '.') );
if (jQuery("#stock_" + p_id) != null)
{
jQuery("#stock_" + p_id).html(var_stock);
}
if (jQuery("#weight_" + p_id) != null && var_weight != null)
{
jQuery("#weight_" + p_id).html( number_format(getFloat(jQuery("#weight_gp_" + p_id).html()) + getFloat(jQuery("#var_weight_" + v_id).html()), 2, ',', '.') );
}
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
anschließend kopiert ihr das Standard- Produkttemplate unter einem neuen Namen und fügt den folgenden Inhalt ein
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Code: Alles auswählen
<span class="wpshopgermany">
<div class="wpshopgermany_produkt">
<!-- Versteckter Grundpreis für die Javascript Berechnung des Variantenpreises -->
<span style="display:none;" id="weight_gp_###p_id###">###mod_weight###</span>
<div class="name">###name###</div>
<div class="beschreibung">###beschreibung###</div>
<div class="price">
Stückpreis: <span style="font-weight:bold;"><span id="preis_###p_id###">###preis###</span> ###wahrung###</span><br />
###gp_start###Grundpreis: <span id="gp_###p_id###">###preis###</span> ###wahrung###<br />###gp_end###
###mod_stock_start###Lagerbestand: <span id="stock_###p_id###">###mod_stock###</span><br />###mod_stock_end###
###weight_start###Gewicht: <span id="weight_###p_id###">###mod_weight###</span>###mod_weight_unit###<br />###weight_end###
###fmenge_start###Füllmenge: ###fmenge######feinheit### (###gpreis######wahrung###/###fbasis######feinheit###) <br />###fmenge_end###
<span class="zusatz">(inkl. ###mwst_value###% Mwst. und zzgl. <a href="###link_vk###">Versandkosten</a>)</span>
</div>
<div class="weight">Gewicht: ###mod_weight### ###mod_weight_unit###</div>
<div class="wpshopgermany_vari"><select id="select_###p_id###" name="vari">###mod_vari###</select>
<script type="text/javascript">
jQuery(document).ready(function()
{
jQuery("select").each(function()
{
if(jQuery(this).find("option").length < 1)
{
jQuery(this).remove();
}
});
//schaltet die Var. Preise um
if(typeof newswitchVari == 'function')
{
newswitchVari(###p_id###, jQuery("#select_###p_id####").val());
}
});
</script>
</div>
<div class="image">###bild###</div>
###menge_start###
<div class="amount">Menge: <input type="text" name="menge" value="1" size="5"/></div>
###menge_end###
<input class="wpshopgermany_submit_basket" type="submit" name="submit_basket" value="Zum Warenkorb hinzufügen"/>
<div class="clear"></div>
</div>
</span>
###varianten_start###
<option class="###var_preis###|###var_weight###|###var_stock###" style="margin-bottom:2px;" onclick="newswitchVari(###p_id###, ###var_id###);" value="###var_id###">
###var_name###
(
<span id="var_preis_###var_id###">###var_preis###</span>###wahrung###
###weight_start###/ <span id="var_weight_###var_id###">###var_weight###</span>###mod_weight_unit### ###weight_end###
###mod_stock_start###/ Lagerbestand: <span id="var_stock_###var_id###">###var_stock###</span>###mod_stock_end###
)
</option>
###varianten_end###
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
zum Schluss müsst ihr natürlich des neue Template den Produkten noch zuordnen, fertig
Gruß dgrrgn