[TYPO3-shop] shipping rules based on amount of products

Brian Bendtsen bb at bellevuevej.dk
Thu Feb 24 14:15:54 CET 2011


Hi

I need to have these shipping rules in my shop

When 10 or more items are in the basket the shipping fee should be 50, 
unless one or more products from a certain sysfolder has been chosen, 
the shipping fee will also be 50 regardless of amout of products.

The shipping fee can never be more than 50.

I have made this in ts:

   plugin.tt_products.shipping {
     radio = 1
     10.title = Postdanmark
     10.price.type = price
     10.price.WherePIDMinPrice.177 = 50
     10.calculationScript = fileadmin/ext/tt_products/calcShipping.php
   }

The script is very simple

if ($this->basket->calculatedArray['count'] > 9) {;
  $this->basket->calculatedArray['priceTax']['shipping'] = 50;	
  } else {
  $this->basket->calculatedArray['priceTax']['shipping'] = 0;
}

The problem is, when I have 10 or more items in the basket and one is 
from the sysFolder 177, then the shipping fee is 100, so the fees are 
added.

How do I prevent this?

/Brian Bendtsen


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