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

tx_commerce_articleCreator Class Reference

List of all members.

Public Member Functions

 tx_commerce_articleCreator ()
 existingArticles ($PA, $fObj)
 producibleArticles ($PA, $fObj)
 getValues ($index=0)
 getRows ($data, &$resultRows, &$counter, $headRow, $extraRowData=array(), $index=1, $row=array())
 calculateRowCount ()
 getHeadRow (&$colCount, $acBefore=NULL, $acAfter=NULL, $addTR=true)
 createArticles ($PA)
 updateArticles ($PA)
 createArticle ($PA, $key)
 createNewPriceCB ($PA, $fObj)
 createNewScalePricesCount ($PA, $fObj)
 createNewScalePricesSteps ($PA, $fObj)
 createNewScalePricesStartAmount ($PA, $fObj)
 deletePriceButton ($PA, $fObj)
 articleUid ($PA, $fObj)

Public Attributes

 $existingArticles = NULL
 $attributes = NULL
 $uid = 0
 $pid = 0
 $belib

Constructor & Destructor Documentation

tx_commerce_articleCreator::tx_commerce_articleCreator  ) 
 

Constructor


Member Function Documentation

tx_commerce_articleCreator::articleUid PA,
fObj
 

Returns a hidden field with the name and value of the current form element

tx_commerce_articleCreator::calculateRowCount  ) 
 

returns the number of articles that would be created with the number of attributes the product have.

Returns:
The number of rows

tx_commerce_articleCreator::createArticle PA,
key
 

Creates an article in the database and all needed releations to attributes and values. It also creates a new prices and assignes it to the new article.

Parameters:
array $PA: ...
string $key: The key in the POST var array
Returns:
articleUID Returns the new articleUid if success
Author:
Ingo Schmitt <is@marketing-factory.de>

tx_commerce_articleCreator::createArticles PA  ) 
 

Creates all articles that should be created (defined through the POST vars)

Parameters:
array $PA: ...
Returns:
void

tx_commerce_articleCreator::createNewPriceCB PA,
fObj
 

Creates a checkbox that has to be toggled for creating a new price for an article. The handling for creating the new price is inside the tcehooks

tx_commerce_articleCreator::createNewScalePricesCount PA,
fObj
 

Creates ...

tx_commerce_articleCreator::createNewScalePricesStartAmount PA,
fObj
 

Creates ...

tx_commerce_articleCreator::createNewScalePricesSteps PA,
fObj
 

Creates ...

tx_commerce_articleCreator::deletePriceButton PA,
fObj
 

Creates a delete button that is assigned to a price. If the button is pressed the price will be deleted from the article

tx_commerce_articleCreator::existingArticles PA,
fObj
 

Get all articles that already exist. Add some buttons for editing.

Parameters:
array $PA: ...
object $fObj: ...
Returns:
A HTML-table with the articles

tx_commerce_articleCreator::getHeadRow &$  colCount,
acBefore = NULL,
acAfter = NULL,
addTR = true
 

Returns the HTML code for the header row

Parameters:
integer $colCount: The number of columns we have
array $acBefore: The additional columns before the attribute columns
array $acAfter: The additional columns after the attribute columns
Returns:
The HTML header code

tx_commerce_articleCreator::getRows data,
&$  resultRows,
&$  counter,
headRow,
extraRowData = array(),
index = 1,
row = array()
 

Returns the html table rows for the article matrix

Parameters:
array $data: The data we should build the matrix from
array $resultRows: The resulting rows
integer $counter: The article counter
string $headRow: The header row (html for inserting after a number of articles)
array $extraRowData: some additional data like checkbox column
integer $index: The level inside the matrix
array $row: The current row data
Returns:

tx_commerce_articleCreator::getValues index = 0  ) 
 

This method builds up a matrix from the ct1 attributes with valuelist

Parameters:
integer $index: The index we're currently working on
Returns:
[type] ...

tx_commerce_articleCreator::producibleArticles PA,
fObj
 

Create a matrix of producible articles

Parameters:
[type] $PA: ...
[type] $fObj: ...
Returns:
A HTML-table with checkboxes and all needed stuff

tx_commerce_articleCreator::updateArticles PA  ) 
 

Updates all articles. This adds new attributes to all existing articles that where added to the parent product or categories.

Parameters:
array $PA: ...
Returns:
void


Member Data Documentation

tx_commerce_articleCreator::$attributes = NULL
 

tx_commerce_articleCreator::$belib
 

tx_commerce_articleCreator::$existingArticles = NULL
 

tx_commerce_articleCreator::$pid = 0
 

tx_commerce_articleCreator::$uid = 0
 


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