Antwort
 
LinkBack Themen-Optionen Thema bewerten Ansicht
  #1  
Alt 13.07.07, 14:52
Forum Aktivist
 
Registriert seit: 18.01.07
Beiträge: 64
Frage

tt_products 2.5.2: Berechnungsskript


Hallo,

bei der Arbeit mit dem Shopsystem tt_products 2.5.2 habe ich folgendes problem:

im warenkorb liegen 3 artikel zu je 12 Euro (inkl. MWSt). Dahinter steht (richtigerweise) 36 Euro. dann wird die lieferung und art der bezahlung aufgelistet. ganz unten steht dann die gesamtsumme in brutto und netto. (hier im beispiel: netto 69,66 und brutto 81,33).
es gibt keine versandkosten und keine bearbeitungsgebühr. also ist anscheinend die berechnung falsch. dazu habe ich schon im internet gefunden, dass ich das berechnungsskript ändern muss.

eine dokumentation zum berechnungsskript habe ich aber nirgendw gefunden :sad:
nur hier ein kleiner einstieg. kann mir jemand das berechnungsskript erklären und mir evtl. auch noch sagen, was ich ändern muss?

für jede hilfe bin ich dankbar

Viele Grüße

µaTh
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
Mit Zitat antworten
  #2  
Alt 13.07.07, 16:11
Benutzerbild von christiana83
Forum Stammgast
 
Registriert seit: 04.07.06
Ort: Gotha
Alter: 25
Beiträge: 405
christiana83 eine Nachricht über ICQ schicken christiana83 eine Nachricht über Skype™ schicken

Hi,

also mit dem TS:
Typoscript-Code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
plugin.tt_products.shipping {

radio = 1
10.title =Nachname
10.image.file =
10.price.1 = 12.90
10.calculationScript = fileadmin/scripts/products_calcScript.inc
10.price.type = count
10.percentOfTotalShipping = 0

}

stellst du nur die Versandoptionen ein. Quasi, dass Nachnahme 12,90 nochmal auf den Gesamtpreis addieren soll in diesem Beispiel.

dann gibts im Ordner t3conf/ext/tt_products/pi noch ein Berechnungsscript für deinen Shop.

Die berechnen allerdings noch mit einer Gebühr (fee) in einer bestimmten Höhe, weshalb das nicht hinhaut.
Ich hab das script deswegen ins fileadmin kopiert (siehe TS) und den Wert auf "0" gesetzt, dann hats getimmt. Das Script kannst du übrigens noch beliebig erweitern(z.B. Versandkosten unter 20€ gratis etc.), wenn du ein wenig php kannst.

PHP-Code:
<?php
/*

products_comp_calcScript.php


Calculation script for use with the default products.inc script

The script is based on the assumption that you're going to add a fee for using MasterCard/Eurocard, VISA or Diners Club.
MasterCard and VISA demands 5.75 % percent of the total amount in transaction fee. To compensate for this and let the customer pay the fee, this script calculates how much you need to add to the total in order to fully compensate.
To compensate 5,75% you must add 6.10%, then 5,75 % percent of that total is exactly the same as the amount of the fee.

TypoScript properties:

.feeTax     = enter sales-tax percentage for the fee, if any
.feePercent = the percent to be compensated for, default is 5.75 %

*/


$baseAmount $this->basket->calculatedArray['priceTax']['goodstotal']+$this->basket->calculatedArray['priceTax']['shipping'];        // The fee is calculated from the total of the goods AND shipping
$feePercent doubleval($confScript['feePercent'] ? $confScript['feePercent'] : 0);        // Fee percent is by default 5.75 %
    # Calculate conpensating percentage by:   100/(1-pFee/100)-100 = pComp, where pFee is the percentage, eg. Mastercard is taking (5,75%) and pComp will thus be 6.1 %
$compPercent 100/(1-$feePercent/100)-100;        // The compensation percentage.

$this->basket->calculatedArray['priceNoTax']['payment'] = $baseAmount/100*$compPercent;        // Add the amount to the no_tax total
$this->basket->calculatedArray['priceTax']['payment'] = $this->basket->calculatedArray['priceNoTax']['payment'] * (1+$this->basket->conf['payment.']['TAXpercentage']/100);        // ..and add the amount to the tax total + tax of the amount, if any


?>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
Mit Zitat antworten
  #3  
Alt 13.07.07, 17:09
Forum Aktivist
 
Registriert seit: 18.01.07
Beiträge: 64

einen riesen dank für deine superschnelle hilfe.
hat alles geklappt wie ich es mir vorgestellt habe.

dennoch habe ich eine kleine berichtigung für dein TS Script: calculationScript funktioniert nicht (oder bin ich einfach nur zu doof den richtigen pfad einzustellen?) und sicherheitshalber lösche ich vor der nutzung die ganzen alten daten aus shipping mit plugin.tt_products.shipping>

also hiernochmal mein (verbessertes?) TS:
Typoscript-Code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
plugin.tt_products.shipping >
plugin.tt_products.shipping {
radio = 1
10.title =Nachname
10.image.file =
10.price.1 = 12,90
#10.calculationScript = fileadmin/dsv-jugend/templates/shopcalc.inc
10.price.type = count
10.percentOfTotalShipping = 0
}

besten dank nochmal
Viele Grüße

µaTh
__________________
TYPO 3.8
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
Mit Zitat antworten
  #4  
Alt 13.07.07, 17:14
Benutzerbild von christiana83
Forum Stammgast
 
Registriert seit: 04.07.06
Ort: Gotha
Alter: 25
Beiträge: 405
christiana83 eine Nachricht über ICQ schicken christiana83 eine Nachricht über Skype™ schicken

ich hab mir doch das File in das Verzeichnis reinkopiert und auch das Verzeichnis habe ich vorher erstellt
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
Mit Zitat antworten
  #5  
Alt 13.07.07, 17:15
Benutzerbild von christiana83
Forum Stammgast
 
Registriert seit: 04.07.06
Ort: Gotha
Alter: 25
Beiträge: 405
christiana83 eine Nachricht über ICQ schicken christiana83 eine Nachricht über Skype™ schicken

Ach ja, wenn du in den Object Browser schaust, da findest du alles, was ebreits zum Shipping und auch zum Payment voreingestellt ist und kannst alles bearbeiten oder löschen!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
Mit Zitat antworten
  #6  
Alt 13.07.07, 17:31
Forum Aktivist
 
Registriert seit: 18.01.07
Beiträge: 64

Zitat:
Zitat von christiana83 Beitrag anzeigen
ich hab mir doch das File in das Verzeichnis reinkopiert und auch das Verzeichnis habe ich vorher erstellt
jaja, das hab ich schon verstanden gehabt und auch gemacht. hat aber bei mir nicht funktioniert .... :sad:
__________________
TYPO 3.8
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
Mit Zitat antworten
Antwort

Lesezeichen

Themen-Optionen
Ansicht Thema bewerten
Thema bewerten:

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are an


Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
tt_products alona TYPO3 4.x Fragen und Probleme 0 23.01.08 12:14
tt_products und SEO? twomaze tt_products 0 08.09.07 16:09
tt_products und SEO x-behind tt_products 0 29.06.07 14:50
tt_products Kategorienanzeige fritzoderstirb tt_products 1 20.05.07 10:15
tt_products 2.5.1: Fileextension 'jpg' not allowed. (tt_products:1:image) timinafrica tt_products 2 15.12.06 12:28


Alle Zeitangaben in WEZ +1. Es ist jetzt 22:55 Uhr.


Powered by vBulletin® Version 3.7.3 (Deutsch)
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0