[TYPO3-commerce] Strange code in pi1

Michael Knabe typo3 at mfkhh.de
Mon May 23 16:30:18 CEST 2011


Hi folks,

I'm just trying to clean up the code in tx_commerce_pi1 and stumbled
about a strange piece of code in the init-method:

	// Merge default vars, if other prefix_id
	if ($this->prefixID <> 'tx_commerce_pi1') {
		$tx_commerce_vars = t3lib_div::_GP('tx_commerce');
		if (is_array($tx_commerce_vars)) {
			foreach($tx_commerce_vars as $key => $value) {
				if (empty($this->piVars[$key])) {
					$this->piVars[$key] = $value;
				}
			}
		}
	}

It overwrites the get-variables with gp-values prefixed with tx_commerce
if the prefixID is not set to pi1. To me this looks like an ugly hack
that should be removed. However I wasn't able to find out if this is
used anywhere.
SVN shows that this feature was added by Ingo in 2008. Can anyone
(preferably Ingo of cause) explain why and where this is needed so I can
try to refactor it?

Cheers, Michael


More information about the TYPO3-project-commerce mailing list