Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages | Examples

tx_commerce_pi3 Class Reference

Inheritance diagram for tx_commerce_pi3:

tx_commerce_pibase List of all members.

Public Member Functions

 init ($conf)
 main ($content, $conf)
 renderSteps ($content)
 getBillingAddress ($withTitle=1)
 getDeliveryAddress ()
 handlePayment ($paymentObj=NULL)
 getListing ($template=false)
 finishIt ($paymentObj=NULL)
 FinishItRenderGoodBadMarker ($markerArray)
 checkStock ()
 getBasketSum ($type= 'WEB')
 getAddress ($addressType)
 validateAddress ($addressType)
 checkUserName ($username)
 getPaymentData ()
 getPaymentType ($id=false)
 getInputForm ($config, $step, $parseList=true)
 handleAddress ($type)
 getField ($value, $type, $field)
 getInputField ($fieldName, $fieldConfig, $fieldValue, $step)
 getSingleInputField ($fieldName, $fieldConfig, $step)
 getSelectInputField ($fieldName, $fieldConfig, $fieldValue= '', $step= '')
 getCheckboxInputField ($fieldName, $fieldConfig, $fieldValue= '', $step= '')
 parseFieldList ($fieldConfig)
 canMakeCheckout ()
 sendUserMail ($orderUid, $orderData)
 sendAdminMail ($orderUid, $orderData)
 generateMail ($orderUid, $orderData, $userMarker=array())
 parseRawData ($data=array(), $TS)

Public Attributes

 $prefixId = 'tx_commerce_pi3'
 $scriptRelPath = 'pi3/class.tx_commerce_pi3.php'
 $extKey = 'commerce'
 $imgFolder = ''
 $templateCode = ''
 $dbFieldData = array()
 $formError = array()
 $staticInfo
 $currentStep = ''
 $orderId
 $currency = ''
 $debug = FALSE
 $userMailOK
 $adminMailOK
 $finishItOK = true
 $CheckOutsteps = array()

Detailed Description

tx_commerce includes


Member Function Documentation

tx_commerce_pi3::canMakeCheckout  ) 
 

Returns wether a checkout is allowed or not. It can return different types of results. Possible keywords are:

  • noarticles => User has not articles in basket
  • nopayment => User has no payment type selected
  • nobilling => User is in step 'finish' but no billing address was set

Returns:
TRUE if checkout is possible, otherwise it returns on of keywords listed above

tx_commerce_pi3::checkStock  ) 
 

check if all Articles of Basket are in stock

tx_commerce_pi3::checkUserName username  ) 
 

tx_commerce_pi3::finishIt paymentObj = NULL  ) 
 

Finishing Page from Checkout

Returns:
string HTML-Content
global $TYPO3_CONF_VARS;

Real finishing starts here !

Hook for generating The OrderId

Dertermine the Sysfolder, wher to place all datasests Default (if bo hook us used, the Commerce default folder)

: Change to ISO3 field in static currency to get rid of relation to uid Those could be changed in new static_currencies Versions in the future

Send the emails

Do the output

tx_commerce_pi3::FinishItRenderGoodBadMarker markerArray  ) 
 

Fills the MarkerArray with the correct markers, regarding the success of the order currently a dummy, will bi filed in future with more error codes

Parameters:
array $markerArray
Returns:
array $markerArray

tx_commerce_pi3::generateMail orderUid,
orderData,
userMarker = array()
 

Generates one Mail

Parameters:
string $orderUid The Order UID
array $orderData Collected Order Data form PI3
Returns:
MailContent
Since The first line of the mail is the Suibject, trim the template

Hook for processing Marker Array Inspired by tt_news

Since:
21.01.2006

tx_commerce_pi3::getAddress addressType  ) 
 

Returns a string that contains the address data of the specified type. The type can be 'billing' or 'delivery'.

Parameters:
string $addressType: The type of the address that should be exported from the session
string $newLine: The string that is used a splitter between the single lines
Returns:
String with address

tx_commerce_pi3::getBasketSum type = 'WEB'  ) 
 

This method returns an general overview about the basket content. It contains

  • price for all articles (sum net)
  • the price for shipping and package
  • the netto sum
  • the sum for tax
  • the end sum (gross)

Returns:
String with basket sum
Hook for processing Marker Array Inspired by tt_news
Since:
21.01.2006

tx_commerce_pi3::getBillingAddress withTitle = 1  ) 
 

Creates a form for collection the billing address data.

Build pre selcted Radio Boxes

Hook for processing Marker Array Inspired by tt_news

Since:
21.01.2006

tx_commerce_pi3::getCheckboxInputField fieldName,
fieldConfig,
fieldValue = '',
step = ''
 

Returns a checkbox

Parameters:
string $fieldname: The name of the field
array $fieldConf: The configuration for this field (normally from TypoScript)
string $fieldValue: The current value of this field (Normally fetched from piVars)
string $step: name of the step
Returns:
a single checkbox

tx_commerce_pi3::getDeliveryAddress  ) 
 

Creates a form for collection the delivery address data.

Hook for processing Marker Array Inspired by tt_news

Since:
21.01.2006

tx_commerce_pi3::getField value,
type,
field
 

tx_commerce_pi3::getInputField fieldName,
fieldConfig,
fieldValue,
step
 

Returns a single input form field.

tx_commerce_pi3::getInputForm config,
step,
parseList = true
 

Creates a form from a table where the fields can prefilled, configured via TypoScript.

tx_commerce_pi3::getListing template = false  ) 
 

Method to list the content of the basket including all articles, sums and addresses.

Parameters:
Template for rendering
TS Coding with Sacha

Hook for processing Marker Array Inspired by tt_news

Since:
21.01.2006

tx_commerce_pi3::getPaymentData  ) 
 

tx_commerce_pi3::getPaymentType id = false  ) 
 

Returns the payment type. The type is extracted from the basket object. The type is stored in the basket as a special article.

Parameters:
boolean $id: switch for returning the id or classname
Returns:
A string that determines the payment type ('creditcard', 'invoice' or whatever if not $id is set, otherwise returns the id of the paymentarticle

tx_commerce_pi3::getSelectInputField fieldName,
fieldConfig,
fieldValue = '',
step = ''
 

Returns a selectbox

tx_commerce_pi3::getSingleInputField fieldName,
fieldConfig,
step
 

Returns a single textfield

tx_commerce_pi3::handleAddress type  ) 
 

Hook for processing feUserData

Author:
Volker Graubaum ( typo3@e-netconsulting.de )
Since:
29.12.2007

tx_commerce_pi3::handlePayment paymentObj = NULL  ) 
 

This method handles all the stuff concerning the payment.

Parameters:
object $paymentObj: The payment object
Returns:
Substituted template
Hook for processing Marker Array Inspired by tt_news
Since:
21.01.2006

tx_commerce_pi3::init conf  ) 
 

Init Method, autmatically called $this->main

Parameters:
string $conf TypoConfiguration
Hook for handling own steps and information
Since:
27.04.2006

Reimplemented from tx_commerce_pibase.

tx_commerce_pi3::main content,
conf
 

Main Method, automatically called by TYPO3 wher inserting the plugin

Parameters:
string $content from Parent Page
array $conf TS-Configuration
Returns:
string HTML-Content
Set basket to readonly, if set in Extension Configuration

Hook for handling own steps and information

Since:
27.04.2006
Return if checkout is not allowed. Currently the method always returns TRUE right now. Some functionality has to be implemented in future.

tx_commerce_pi3::parseFieldList fieldConfig  ) 
 

Creates a list of array keys where the last character is removed from it but only if the last character is a dot (.)

tx_commerce_pi3::parseRawData data = array(),
TS
 

parses raw data array from db and replace keys with matching values (select fields) like country in address data

Parameters:
$data array address data
$TS array TypoScript for addresshandling for this type
Returns:
$data array address data

tx_commerce_pi3::renderSteps content  ) 
 

This method renders the step layout into the checkout process It replaces the subpart ##CHECKOUT_STEPS###

Parameters:
string $content
Returns:
string $content
Author:
Ingo Schmitt <is@marketing-factory.de>

tx_commerce_pi3::sendAdminMail orderUid,
orderData
 

Sends Admin Mail

Since:
12th November 2005 Also performes a charset Conversion for the mail, including Sender
Parameters:
Order ID
Order Data returns true if success
Since:
2005 12th November Noved to plainMailEncoded
Check if charset ist set by TS Otherwise set to default Charset Checck if mailencoding ist set otherwise set to 8bit

Convert Text to charset

Check if user Mail is set

tx_commerce_pi3::sendUserMail orderUid,
orderData
 

Sends the Information Mail to the user

Since:
12th November 2005 Also performes a charset Conversion for the mail
Parameters:
Order ID
Order Data returns true if success
if use has email in the formular, use this

Check for no injection codes

Since:
2005 12th November Noved to plainMailEncoded
Check if charset ist set by TS Otherwise set to default Charset Checck if mailencoding ist set otherwise set to 8bit

Convert Text to charset

tx_commerce_pi3::validateAddress addressType  ) 
 

Checks if an address in the SESSION is valid


Member Data Documentation

tx_commerce_pi3::$adminMailOK
 

tx_commerce_pi3::$CheckOutsteps = array()
 

tx_commerce_pi3::$currency = ''
 

Reimplemented from tx_commerce_pibase.

tx_commerce_pi3::$currentStep = ''
 

tx_commerce_pi3::$dbFieldData = array()
 

tx_commerce_pi3::$debug = FALSE
 

If set to TRUE some debug message will be printed.

tx_commerce_pi3::$extKey = 'commerce'
 

Reimplemented from tx_commerce_pibase.

tx_commerce_pi3::$finishItOK = true
 

tx_commerce_pi3::$formError = array()
 

tx_commerce_pi3::$imgFolder = ''
 

Reimplemented from tx_commerce_pibase.

tx_commerce_pi3::$orderId
 

Order ID of the Order Is generated by HOOK generateOrderId if available, otherwise is generated by uniqid

tx_commerce_pi3::$prefixId = 'tx_commerce_pi3'
 

tx_commerce_pi3::$scriptRelPath = 'pi3/class.tx_commerce_pi3.php'
 

tx_commerce_pi3::$staticInfo
 

tx_commerce_pi3::$templateCode = ''
 

tx_commerce_pi3::$userMailOK
 


The documentation for this class was generated from the following file:
Generated on Sun Jan 13 23:12:24 2008 for tx_commerce by  doxygen 1.4.4