Sunday 17 April 2011 9:01:35 am
This post is relatively old, anyway... I wanted to integrate an input field too, allowing clients to define the quantity directly from the product page and.. here's the way: the kernel/shop/basket.php has it already pre-defined...
...
if ( $http->hasPostVariable( "Quantity" ) )
{
$quantity = (int)$http->postVariable( "Quantity" );
if ( $quantity <= 0 )
{
$quantity = 1;
}
}
else
{
$quantity = 1;
}
... ...just need to add the input field inside the form
...
<input type="text" name="Quantity" size="2" value="1" />
... Might save some time to some others.. that's it!
loredanaebook.it
|