Hallo allerseits,
ich habs jetzt tatsächlich geschafft die Commerce Extension zum laufen zu bewegen. Nun fehlt mir noch eine Kleinigkeit um glücklich zu sein .
Ich müsste an die Bestätigungsmail nen Anhang dranhängen. Ich habe erstmal alle Posts hier durchgeschaut, aber nichts passendes gefunden.
Ich vermute mal dass das ganze in der "class_1.tx_commerce_pi3_1.php" oder der entsprechenden Datei im anderen Template Ordner passieren muss.
Hier mal der Codeabschnitt. Ich hoffe es ist auch der richtige:
/**
* Generates one Mail
* @param string $orderUid The Order UID
* @param array $orderData Collected Order Data form PI3
* @return MailContent
*/
function generateMail($orderUid, $orderData,$userMarker = array()) {
$content='';
$markerArray=$userMarker;
$markerArray['###ORDERID###']=$orderUid;
$markerArray['###ORDERDATE###']=date($this->conf['generalMail.']['orderDate_format'],$orderData['tstamp']);
$markerArray['###COMMENT###']=$orderData['comment'];
$markerArray['###LABEL_PAYMENTTYPE###']= $this->pi_getLL('payment_paymenttype_' .$orderData['paymenttype'],$orderData['paymenttype']);
/**
* Since The first line of the mail is the Suibject, trim the template
*/
$template = ltrim($this->cObj->getSubpart($this->templateCode, '###MAILCONTENT###'));
/*
*added replacing marker for New Users
*@author Volker Graubaum
*@since 01.05.06
*/
$templateUser = '';
if(is_array($this->userData)){
$templateUser = trim($this->cObj->getSubpart($template, '###NEW_USER###'));
$templateUser = $this->cObj->substituteMarkerArray($templateUser,$this->userData,'###|###',1);
}
$content = $this->cObj->substituteSubpart($template,'###NEW_USER###',$templateUser);
$basketContent = $this->makeBasketView(
$GLOBALS['TSFE']->fe_user->tx_commerce_basket,
'###BASKET_VIEW###',
t3lib_div::intExplode(',', $this->conf['regularArticleTypes'])
);
$content = $this->cObj->substituteSubpart($content,'###BASKET_VIEW###',$basketContent);
// Get The addresses
$deliveryAdress='';
if ($orderData['cust_deliveryaddress']) {
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'tt_address', 'uid='.$orderData['cust_deliveryaddress']);
if ($data= $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
$data = $this->parseRawData($data,$this->conf['delivery.']['sourceFields.']);
$deliveryAdress = $this->makeAdressView($data,'###DELIVERY_ADDRESS###');
}
}
$content = $this->cObj->substituteSubpart($content,'###DELIVERY_ADDRESS###',$deliveryAdress);
$billingAdress = '';
if ($orderData['cust_invoice']) {
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'tt_address', 'uid='.$orderData['cust_invoice']);
if ($data= $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
$data = $this->parseRawData($data,$this->conf['billing.']['sourceFields.']);
$billingAdress = $this->makeAdressView($data,'###BILLING_ADDRESS###');
$markerArray['###CUST_NAME###']=$data['NAME'];
}
}
$content = $this->cObj->substituteSubpart($content,'###BILLING_ADDRESS###',$billingAdress);
/**
* Hook for processing Marker Array
* Inspired by tt_news
* @since 21.01.2006
*
*/
$hookObjectsArr = array();
if (is_array ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi3/class.tx_commerce_pi3.php']['generateMail'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi3/class.tx_commerce_pi3.php']['generateMail'] as $classRef) {
$hookObjectsArr[] = &t3lib_div::getUserObj($classRef);
}
}
foreach($hookObjectsArr as $hookObj) {
if (method_exists($hookObj, 'ProcessMarker')) {
$markerArray=$hookObj->ProcessMarker($markerArray,$this);
}
}
$markerArray = array_merge((array)$markerArray,(array)$additionalMarker);
$markerArray = array_merge((array)$markerArray,(array)$this->languageMarker);
$content = $this->cObj->substituteMarkerArray($content, $markerArray);
return ltrim($content);
}
Hab nur leider keine Ahnung wie das gehen soll.
Kann bitte jemand helfen?
Grüße