Remove shipping fare when fare = 0

29.09.2011 08:47
#1
ggsoft
Joomshopping forum user no avatar
Name: Gourgnier Thomas
29.09.2011
Posts: 6
Quote
Remove shipping fare when fare = 0

Hello,

I have product that are sold with no shipping (numerical content) and other with shipping. I manage it using the shipping weight to 0 for numerical content.
But when the total amount for shipping is 0.00, joomshopping still display the shipping cost selection page. I would like to remove it.
In the same way, when there is only one shipping, it would be better to avoid this page as there is no point to select it.

Thank you


Joomla: 1.7
JoomShopping: 3.2.7
PHP: 5.2.13
MySQL: 5.0.67
Website Url: www.ggsoft.fr
 
23.10.2011 14:52
#2
ggsoft
Joomshopping forum user no avatar
Name: Gourgnier Thomas
29.09.2011
Posts: 6
Quote
Aw: Remove shipping fare when fare = 0

I added these lines in file /components/com_jshopping/controllers/checkout.php , line 451 to bypass shipping when total shipping is equal to 0.


if ( $shippings[$key]->calculeprice == 0 ) {
$this->_setMaxStep(5);
$cart->setShippingId(0);
$cart->setShippingPrice(0);
$this->setRedirect(SEFLink('index.php?option=com_jshopping&controller=checkout&task=step5',0,1,$jshopConfig->use_ssl));
return 0;
}



Joomla: 1.7
JoomShopping: 3.2.7
PHP: 5.2.13
MySQL: 5.0.67
Website Url: www.ggsoft.fr
 
Copyrights MAXXmarketing GmbH. All Rights Reserved