Neuigkeiten
  • Die modified eCommerce Shopsoftware ist kostenlos, aber nicht umsonst.
    Spenden
  • Damit wir die modified eCommerce Shopsoftware auch zukünftig kostenlos anbieten können:
    Spenden
  • Thema: MODUL: product_options_selection.html mit jQuery

    h-h-h

    • modified Team
    • Beiträge: 4.562
    MODUL: product_options_selection.html mit jQuery
    Antwort #15 am: 08. Januar 2011, 17:32:53
    Dann erweitere die stylesheet noch einmal.

    Code: CSS  [Auswählen]
    #radios {height:40px}
    Bitte den Wert je nach Bedarf ändern und eventuell ein margin:5px 0; in die geschweiften Klammern einfügen.

    Gruß

    h-h-h

    memocorex

    • Frisch an Board
    • Beiträge: 51
    MODUL: product_options_selection.html mit jQuery
    Antwort #16 am: 08. Januar 2011, 17:53:45
    so jetzt aber, hat alles geklappt.

    Vielen Vielen Vielen Dank.

    h-h-h

    • modified Team
    • Beiträge: 4.562
    MODUL: product_options_selection.html mit jQuery
    Antwort #17 am: 08. Januar 2011, 18:18:10
    Danke für die Rückmeldung.
    Bitte schreibe doch bitte wie Du es gelöst hast.

    Gruß

    h-h-h

    memocorex

    • Frisch an Board
    • Beiträge: 51
    MODUL: product_options_selection.html mit jQuery
    Antwort #18 am: 08. Januar 2011, 18:32:46
    Ich habe in die stylesheet.css folgendes eingefügt:

    Code: CSS  [Auswählen]
    .radio {float:left;margin-left:20px;margin-top:5px;}
    #radios {height:40px}
    Ist im Gegensatz zu meinem Ansatz, Firefox & IE kompatibel.

    memocorex

    • Frisch an Board
    • Beiträge: 51
    MODUL: product_options_selection.html mit jQuery
    Antwort #19 am: 30. April 2011, 12:39:27
    Hallo,

    wie kann ich eigentlich die Vorauswahl verhindern? Also den Kunden erinnern wenn er auf "in den Warenkorb" klickt, zuvor noch eine Größe auswählen muss?

    Ok, ich habe nun herausgefunden wenn ich in der product_options_selection.html Zeile 7

    Code: PHP  [Auswählen]
        <input id="{$item_data.ID}" type="radio" name="id[{$options_data.ID}]" value="{$item_data.ID}" {if $smarty.foreach.key_data.first}checked="checked" {/if} />
    folgendes entferne:

    Code: PHP  [Auswählen]
    {if $smarty.foreach.key_data.first}checked="checked" {/if}
    wird die Vorauswahl deaktiviert, jedoch kann man dann den Artikel ohne Attribut kaufen, was bei T-Shirts nicht sinnvoll ist, kann mir zumindest da jemand weiterhelfen?
    LG

    Mehmet

    h-h-h

    • modified Team
    • Beiträge: 4.562
    MODUL: product_options_selection.html mit jQuery
    Antwort #20 am: 30. April 2011, 16:54:19
    [...] kann mir zumindest da jemand weiterhelfen?
    [...]

    Hallo Mehmet,
    wo konnte Dir keiner weiterhelfen?  :?

    /templates/<dein-template>/javascript/general.js.php

    Code: PHP  [Auswählen]
    <script type="text/javascript">
    function pos_radio(){
      var radioCheck = false;
      var arrInputs = document.form.getElementsByTagName("input");
      for(var i=0; i<arrInputs.length; i++){
        if((arrInputs[i].type.toLowerCase() == "radio") && arrInputs[i].checked){
            radioCheck = true; break;
        }
      }
      if (radioCheck == false){
        alert('Bitte wählen Sie eine T-Shirt-Größe');
      }
      return radioCheck;
    }
    </script>
    /templates/<dein-template>/product_info_***.html

    ersetze

    Code: PHP  [Auswählen]
    {$FORM_ACTION}
    mit

    Code: PHP  [Auswählen]
    {$FORM_ACTION|replace:'>':' onSubmit="return pos_radio()">'}
    Gruß

    h-h-h

    memocorex

    • Frisch an Board
    • Beiträge: 51
    MODUL: product_options_selection.html mit jQuery
    Antwort #21 am: 30. April 2011, 21:43:05
    Hallo!

    entschuldige, habe mich etwas schlampig ausgedrückt. ;)

    also ich habe die Änderungen vorgenommen, jedoch ohne Wirkung, man kann noch immer ohne Auswahl bestellen.

    das ist der Inhalt meiner general.js.php:

    Code: PHP  [Auswählen]
    <?php
    /* -----------------------------------------------------------------------------------------
       $Id: general.js.php 1262 2005-09-30 10:00:32Z mz $

       XT-Commerce - community made shopping
       http://www.(( Wir dulden keine kommerziellen Werbelinks - Bitte <a href="index.php?topic=3013.0">Forenregeln</a> beachten! ))

       Copyright (c) 2003 XT-Commerce
       -----------------------------------------------------------------------------------------
       Released under the GNU General Public License
       ---------------------------------------------------------------------------------------*/


       // this javascriptfile get includes at the BOTTOM of every template page in shop
       // you can add your template specific js scripts here
    ?>
    <script src="<?php echo 'templates/'.CURRENT_TEMPLATE; ?>/javascript/jquery.js" type="text/javascript"></script>
    <script src="<?php echo 'templates/'.CURRENT_TEMPLATE; ?>/javascript/thickbox.js" type="text/javascript"></script>
    <script type="text/javascript">
    function pos_radio(){
      var radioCheck = false;
      var arrInputs = document.form.getElementsByTagName("input");
      for(var i=0; i<arrInputs.length; i++){
        if((arrInputs[i].type.toLowerCase() == "radio") && arrInputs[i].checked){
            radioCheck = true; break;
        }
      }
      if (radioCheck == false){
        alert('Bitte wählen Sie eine T-Shirt-Größe');
      }
      return radioCheck;
    }
    </script>
    <?php// BOF - web28 - 2010-07-09 - TABS/ACCORDION in product_info ?>
    <?php
    if (strstr($PHP_SELF, FILENAME_PRODUCT_INFO )) {
    ?>
    <script src="<?php echo 'templates/'.CURRENT_TEMPLATE; ?>/javascript/jquery-ui.js" type="text/javascript"></script>
    <script type="text/javascript">
            $(function() {
                    $("#tabbed_product_info").tabs();
                    $("#accordion_product_info").accordion({ autoHeight: false });
            });
    </script>
    <noscript>
            <link rel="stylesheet" href="<?php echo 'templates/'.CURRENT_TEMPLATE; ?>/css/no_javascript.css" type="text/css" media="screen" />
    </noscript>
    <?php
    }
    ?>
    <?php// EOF - web28 - 2010-07-09 - TABS/ACCORDION in product_info ?>
    die product_options_selection.html:

    Code: PHP  [Auswählen]
    {if $options!=''}
    <div id="radios">
      {foreach name=outer item=options_data from=$options}
      <div class="radio">
      <b>{$options_data.NAME}:  </b>
      {foreach key=key_data name=key_data item=item_data from=$options_data.DATA}
        <input id="{$item_data.ID}" type="radio" name="id[{$options_data.ID}]" value="{$item_data.ID}" />
        <label for="{$item_data.ID}">{$item_data.TEXT} {if $item_data.PRICE!=''}( {$item_data.PREFIX}{$item_data.PRICE} ){/if}</label>
      {/foreach}
      </div>
      {/foreach}
    </div>
    {/if}
    und die product_info_v1.html:

    Code: PHP  [Auswählen]
    {config_load file="$language/lang_$language.conf" section="product_info"}
    {$FORM_ACTION|replace:'>':' onSubmit="return pos_radio()">'}
    <h1>{$PRODUCTS_NAME}</h1>
    [...]
     
    hab ich irgendwas übersehen?
    achja, "templates_c" auch mehrmals geleert, falls das eine Rolle spielt.
    LG

    h-h-h

    • modified Team
    • Beiträge: 4.562
    MODUL: product_options_selection.html mit jQuery
    Antwort #22 am: 30. April 2011, 22:20:45
    Link zum testen?

    Gruß

    h-h-h

    EDIT: Auch per Mail bzw. Kontaktformular.

    memocorex

    • Frisch an Board
    • Beiträge: 51
    MODUL: product_options_selection.html mit jQuery
    Antwort #23 am: 30. April 2011, 22:27:28
    kann ich dein kontaktformular verwenden um dir den link zu schicken?
    Seite ist nämlich noch offline

    memocorex

    • Frisch an Board
    • Beiträge: 51
    MODUL: product_options_selection.html mit jQuery
    Antwort #24 am: 03. Mai 2011, 21:08:45
    Naja gut ich werde wohl die Vorauswahl wieder einbauen müssen, besser ein falsches Attribut als keines.

    mfg

    Mehmet

    dermarcus72

    • Frisch an Board
    • Beiträge: 67
    Re: MODUL: product_options_selection.html mit jQuery
    Antwort #25 am: 27. September 2011, 15:39:51
    Welchen Code muss ich ändern wenn ich...

    a.) Nicht vorhandende / ausverkaufte Attribute (Lagerampel) entweder durchgestrichen angezeigt, oder unsichtbar haben will.

    b.) Den vollen Preis und nicht + xxx.Euro bei verschiedenen Preisvarianten haben will.

    Gruß

    der Marcus

    h-h-h

    • modified Team
    • Beiträge: 4.562
    Re: MODUL: product_options_selection.html mit jQuery
    Antwort #26 am: 27. September 2011, 15:49:47
    Das erklärt sich doch von selbst, bei diesem Produkt-Attributs-Template müssen genau die selben Anpassungen gemacht werden, wie in den Standard-Varianten.
    Die Variablen dazu stehen in den passenden Threads, für die Lagerampel habe ich die Variablen nicht im Kopf. Bitte such mal im Forum, es ist egal um welches Attribut-Template es geht.

    Gruß h-h-h

    dermarcus72

    • Frisch an Board
    • Beiträge: 67
    Re: MODUL: product_options_selection.html mit jQuery
    Antwort #27 am: 27. September 2011, 16:52:45
    Hab's gefunden.  :-D

    Danke !! :mrgreen:

    denkbrett

    • Fördermitglied
    • Beiträge: 31
    Re: MODUL: product_options_selection.html mit jQuery
    Antwort #28 am: 21. Oktober 2011, 09:35:26
    Hallo

    ich würde das gerne als Accordion darstellen.

    Könnte mir da jemand weiterhelfen ?

    gruß
    denkbrett

    bully807

    • Neu im Forum
    • Beiträge: 49
    Re: MODUL: product_options_selection.html mit jQuery
    Antwort #29 am: 24. November 2013, 09:29:13
    Hallo h-h-h,

    ich habe dein MOdul in unseren Testshop eingebaut und es funktioniert hervorragend auch in Kombination mit dem Price und Bild aktualisierungs Modul.

    Ich habe jetzt versucht anstatt des Textes und des Preises in den Buttons Bilder der Attribute anzeigen zu lassen leider funktioniert es mit
    Code: PHP  [Auswählen]
    {if $item_data.IMAGE}{$item_data.IMAGE}{/if}
    nicht

    es wird nur der Pfad ála "2_att1-1.jpg" ausgegeben.

    auf welche Variable muss ich zugreifen damit dort das Bild des Attributes angezeigt wird????

    Vielen Dank.
    8 Antworten
    1794 Aufrufe
    31. August 2020, 16:34:47 von eronweb
    5 Antworten
    4774 Aufrufe
    07. September 2009, 09:01:21 von DokuMan