Zum Inhalt springen

tt_products 2.4.8 und die AGBs - ich dreh noch durch

Erstellt am 20. März 2006 · 9 Antworten · letzte Antwort am 16. Juli 2009

Tags: Frage

Andreas2000 ·

Hallo zusammen,

ich hab hier ein mittelgrosses Problem mit dem Shop - egal was ich auch schon probiert habe, ich schaffe es nicht, die AGBs zum Pflichtfeld zu machen.

Noch ein kleiner Hinweis: egal ob ich die INPUT Box anklicke oder nicht, das entsprechende Feld in der Tabelle sys_products_orders ist IMMER LEER!!!

Hier mal meine Constants aus dem Shop Template:

plugin.tt_products.file.templateFile = fileadmin/template/html/b2c_shop.tmpl
plugin.tt_products.domain = test.elsat.lan
plugin.tt_products.limit = 6
plugin.tt_products.limitImageSingle = 5
plugin.tt_products.maxW_list = 60
plugin.tt_products.maxW_single = 130
plugin.tt_products.maxW_popup = 500
plugin.tt_products.maxH_list = 100
plugin.tt_products.max_note_length = 200
plugin.tt_products.separateImage = 1
plugin.tt_products.clickEnlarge_list = 0
plugin.tt_products.selectColor = 0
plugin.tt_products.selectSize = 0
plugin.tt_products.selectGradings = 0
plugin.tt_products.selectAdditional = 0
plugin.tt_products.PIDitemDisplay = 54
plugin.tt_products.PIDbasket = 53
plugin.tt_products.PIDtracking = 50
plugin.tt_products.TAXpercentage = 20
plugin.tt_products.priceDecPoint = ,
plugin.tt_products.priceThousandPoint = .
plugin.tt_products.orderNumberPrefix = elT3o_
plugin.tt_products.orderEmail_from = fundgrube@elsat.lan
plugin.tt_products.orderEmail_fromName = ELSAT Fundgrube Testshop
plugin.tt_products.orderEmail_to = andreas.fragner@elsat.at
plugin.tt_products.orderEmail_subject = ELSAT International - Fundgrube - Bestellung
plugin.tt_products.orderEmail_htmlmail = 1
plugin.tt_products.clickIntoBasket = 1
plugin.tt_products.advanceOrderNumberWithInteger = 1,1
plugin.tt_products.alwaysAdvanceOrderNumber = 1
plugin.tt_products.PIDinfo = 56
plugin.tt_products.PIDstoreRoot = 14
plugin.tt_products.PIDfinalize = 57
plugin.tt_products.PIDagb = 18
plugin.tt_products.AGBattachment = fileadmin/media/pdf/AGB.pdf

hier noch das Setup aus dem Template:

plugin.tt_products.datasheetIcon.file = fileadmin/template/img/pdf_icon.gif
plugin.tt_products.shipping.10.title = Zustellung
plugin.tt_products.shipping.10.image >
plugin.tt_products.shipping.10.priceTax = 15
plugin.tt_products.shipping.10.excludePayment = 30
plugin.tt_products.shipping.TAXpercentage = 20
plugin.tt_products.shipping.20.title = Selbstabholung
plugin.tt_products.shipping.20.image >
plugin.tt_products.shipping.20.priceTax >
plugin.tt_products.shipping.20.excludePayment = 10,20
plugin.tt_products.shipping.40 >
plugin.tt_products.payment.TAXpercentage = 20
plugin.tt_products.payment.10.title = Vorauskasse
plugin.tt_products.payment.10.image >
plugin.tt_products.payment.10.calculationScript >
plugin.tt_products.payment.20.title = Nachnahme
plugin.tt_products.payment.30.title = Barzahlung bei Abholung
plugin.tt_products.payment.40 > 
plugin.tt_products.payment.50 >
plugin.tt_products.basketPic = fileadmin/template/img/basket.jpg
plugin.tt_products.requiredInfoFields = first_name,last_name,address,zip,city,country,email,telephone

und hier noch ein Auszug aus dem dazugehörigenm HTML Template:

          <tr>
            <td style="text-align: left; vertical-align: top;" colspan="2"><input type="checkbox" name="recs[personinfo][agb]" value="###PERSON_AGB###" /> <!--###LINK_AGB###-->Die Allgemeinen Geschäftsbedingungen<!--###LINK_AGB###--> habe ich gelesen und erkenne sie hiermit an.</td>
          </tr>
        </table>
      </td>
    </tr>
  </table>

  <table style="width: 99%;" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td style="text-align: center;"><input type="submit" class="submit" name="products_update" value="Zurück zum Warenkorb" /></td>
      <td style="text-align: center;"><input type="submit" class="submit" name="products_payment" value="Weiter zur Bezahlung" onclick="document.forms[0].action='###FORM_URL_FINALIZE###&type=1';" /><input type="hidden" name="products_cmd" value="cardno" /></td>

     
          </tr>
  </table>
club-basic ·

Also ich habe das über javascript gelösst.

<script language="JavaScript">
function chkFormular()
{
 if(document.shop_form.bestaetigung.checked == "")  {
   alert("Sie müssen die AGB's akzeptieren!");
   document.shop_form.bestaetigung.focus();
   return false;
  }
  }
</script>
<FORM method="post" action="###FORM_URL###" name="shop_form" id="registrationForm" onSubmit="return chkFormular();"> 


<div style="float:left; width:150px;">###GW1B### Sie bestätigen hiermit, dass Sie die AGB´s gelesen haben und diese akzeptieren.  ###GW1E###</div>
<div style="float:left; width:50px;"><input type="checkbox" name="bestaetigung"> <input type="hidden" name="recs[personinfo][agb]" value="1" /> <!-- <input type="checkbox" name="recs[personinfo][agb]" value="###PERSON_AGB###" /> --></div>
<div style="float:left; width:300px;">###GW1B###<!--###LINK_AGB###--> Zu den Allgemeinen Gesch&auml;ftsbedingungen <!--###LINK_AGB###--></div>
dave ·

Schon mal mit:

plugin.tt_products.requiredInfoFields = agb,[...die weiteren Pflichtfelder]

probiert?

Gruß
Dave

Andreas2000 ·
dave schrieb

Schon mal mit:

plugin.tt_products.requiredInfoFields = agb,[...die weiteren Pflichtfelder]

probiert?

Gruß
Dave

ja hab ich - aber da komm ich dann immer auf die "Es fehlen Eingaben Seite" - hat also auch nix gebracht.

Andreas2000 ·
club-basic schrieb

Also ich habe das über javascript gelösst.

<script language="JavaScript">
function chkFormular()
{
 if(document.shop_form.bestaetigung.checked == "")  {
   alert("Sie müssen die AGB's akzeptieren!");
   document.shop_form.bestaetigung.focus();
   return false;
  }
  }
</script>
<FORM method="post" action="###FORM_URL###" name="shop_form" id="registrationForm" onSubmit="return chkFormular();"> 


<div style="float:left; width:150px;">###GW1B### Sie bestätigen hiermit, dass Sie die AGB´s gelesen haben und diese akzeptieren.  ###GW1E###</div>
<div style="float:left; width:50px;"><input type="checkbox" name="bestaetigung"> <input type="hidden" name="recs[personinfo][agb]" value="1" /> <!-- <input type="checkbox" name="recs[personinfo][agb]" value="###PERSON_AGB###" /> --></div>
<div style="float:left; width:300px;">###GW1B###<!--###LINK_AGB###--> Zu den Allgemeinen Gesch&auml;ftsbedingungen <!--###LINK_AGB###--></div>

und was tun wenn der user java script im browser deaktiviert hat?

dave ·

ja hab ich - aber da komm ich dann immer auf die "Es fehlen Eingaben Seite" - hat also auch nix gebracht.

Was kommt denn für eine Meldung welche Felder nicht ausgefüllt sind?

Andreas2000 ·

So die Sache ist gelöst - ich musste lediglich im BASKET_INFO_TEMPLATE die die action des Submit Buttons umsetzen:

... onclick="document.forms[0].action='index.php?id=###PID_BASKET&type=1';"

Und als zweiter Contentinhalt wurde bei der Seite mit dem Warenkorb einfach "Warenkorb - Eingabe Bezahlung" gewählt.

pragmas ·

Habe das Problem erkannt und einfacher gelöst: Es liegt an der Delivery-Adresse, die ebenfalls vollständig sein muss. Hier fehlt aber die AGB-Eingabe.
Wenn Du einfach eine Hidden-Zeile im Formular einfügst, dann funktioniert es:

<input type="hidden" name="recs[delivery][agb]" value="1"/>
sachavorbeck ·

Hallo,

die Kombination aus Ergänzug von requiredInfoFields um agb,... und dem hidden value führt nun dazu, dass die AGB tatsächlich als Pflichtfeld behandelt werden.

Allerdings wird der Marker "ERROR_DETAILS" nicht entsprechend ausgefüllt. Das habe ich umschifft, indem ich den allgemeinen Hinweistext auf der Fehlerseite "BASKET_REQUIRED_INFO_MISSING" pauschal mit einem Hinweis auf das AGB-Feld versehen habe. Aber besonders elegant ist das natürlich nicht.

Ciao,
Sacha

Typo3micha ·

also ich hab es gerade mit der neuen Version getestet, folgender Fehler ist mir aufgefallen:

<input type="checkbox" name="recs[personinfo][agb]" value="###PERSON_AGB###" />

muß lauten:

<input type="checkbox" name="recs[personinfo][agb]" ###PERSON_AGB### />

ohne dem value="" weil das wird komplett ersetzt, warum auch immer 😉 , weiter ist mir aufgefallen, dass die AGB's nicht require sind wenn man die PIDagb nicht in den Constanten angibt, also PID setzen und schon funktionierts auch.

Micha