Jump to content

Add extra fee to the downloadable products using shipping fee


Recommended Posts

Hello, i want to add an extra fee in a downloadable products shop, but i can't, because with the downloadable products there isn't shipping cost and i can't add handling charges or other fees.

So i would like to activate shipping costs with downloadable products.

I think that i should edit 1 or 2 lines of code of order.php but i can't find it, i have tried to make some modifications in this part of the code of order.php but the shipping costs only are showed when you buy physical products, and i want to activate shipping costs as an extra fee in downloadable products!


I have tried to change the "0" for "1" but doesn't work...

/* Bypass payment step if total is 0 */
function checkFreeOrder()
{
global $cart;

if ($cart->getOrderTotal() <= 0)
{
$order = new FreeOrder();
$order->validateOrder(intval($cart->id), _PS_OS_PAYMENT_, 0, Tools::displayError('Free order', false));
Tools::redirect('history.php');
}
}


/**
* Set id_carrier to 0 (no shipping price)
*
*/
function setNoCarrier()
{
global $cart;
$cart->id_carrier = 0;
$cart->update();
}


Anone could help me? a lot of thanks!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...