[Typo3-shop] Different shipment price for products

Franz Holzinger franz at fholzinger.com
Sun Apr 17 09:46:38 CEST 2005


Hello Rolf,

in class.tx_ttproducts.php in the function getBasket
you have the line
----------------------
// Shipping
	$this->calculatedSums_tax["shipping"]=doubleVal($this->basketExtra["shipping."]["priceTax"]);
if ($this->basketExtra["shipping."]["priceTax."]["1"] != NULL)
{
	$this->calculatedSums_tax["shipping"]=$priceShippingTax;
}
------------------

and before your have
---------------------
while(list(,$v)=each($pageArr))	{
	if (is_array($productsArray[$v]))	{
		reset($productsArray[$v]);
		$itemsOut="";
		while(list(,$row)=each($productsArray[$v]))	{
---------------------------
a loop which goes through all products on all pages.

----------
$calculatedBasketItem["totalWeight"] = 
$calculatedBasketItem["weight"]*$calculatedBasketItem["count"];
--------------
calculates the weight of all products

So you can use the variables from above to calculate your price, however 
in PHP in a way like 
$this->calculatedSums_tax["shipping"]=$calculatedBasketItem["totalWeight"] 
* my factor;

Franz


> Hi Franz
> 
> hmmm...not my strong suit... :(
> 
> Is it possible to use the "Weight"? Cant figure out how to use that..
> 
> Rolf
> 
> Franz Holzinger wrote:
> 
>>
>>This still needs programming effort.
>>
>>products_comp_calcScript.inc
>>and the usage of specialPreparation
>>
>>$this->calculatedSums_tax["shipping"] = calculate something by
>>selecting the info for all products in the basket from the database



More information about the TYPO3-project-tt-products mailing list