Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {*mod aktualisiereAmpel*}
- {* Teil 1 um im JTL-Shop3 beim Konfigurator die Lieferzeit zu aktualisieren *}
- {* Anleitung: http://forum.jtl-software.de/webshopanbindung/57784-konfigurator-lieferzeiten-sobald-zusatzartikel-gewaehlt.html *}
- {* bitte ganz oben in tpl_inc/artikel_konfigurator(_custom).tpl einfügen *}
- {* (c) 2014 Thomas Oster *}
- {literal}
- <script type="text/javascript">
- $(function(){
- function refreshAmpel()
- {
- var nstatus = 99;
- var ampeltext = "TODO";
- var klieferstatus = 0;
- var clieferstatus = "TODO";
- $("select option[data-ampeltext]:selected").each(function(){
- if ($(this).data("nstatus") < nstatus)
- {
- nstatus = $(this).data("nstatus");
- ampeltext = $(this).data("ampeltext");
- }
- if ($(this).data("klieferstatus") > klieferstatus)
- {
- klieferstatus = $(this).data("klieferstatus");
- clieferstatus = $(this).data("clieferstatus");
- }
- });
- if (nstatus !== 99)
- {
- $("span.signal_image").removeClass("a0 a1 a2 a3").addClass("a"+nstatus).text(ampeltext);
- }
- if (klieferstatus > 0)
- {
- $("li > b:contains('Lieferstatus')").parent().contents().filter(function(){ return this.nodeType == 3; }).last().replaceWith(": "+clieferstatus);
- }
- }
- $("select option[data-ampeltext]").parent()
- .change(refreshAmpel);
- });
- </script>
- {/literal}
- {*/mod*}
RAW Paste Data