I know that /catalog/model/shipping/ups.php has the code in in that needs to be hidden. The code in that file that controls ups ground is :
What can I add to that to disable '03' if free shipping is enabled on a certain product that is checked out. Because I am going to be using the Free Shipping Module for free ground shipping on products and there is no need for both to be displayed if the product has free ground shipping.
Code: Select all
$service_code = array(
// US Origin
'US' => array(
'01' => $this->language->get('text_us_origin_01'),
'02' => $this->language->get('text_us_origin_02'),
'03' => $this->language->get('text_us_origin_03'),
What can I add to that to disable '03' if free shipping is enabled on a certain product that is checked out. Because I am going to be using the Free Shipping Module for free ground shipping on products and there is no need for both to be displayed if the product has free ground shipping.
Hey, you could always do this:
*Edit: Nevermind, realised this was only removing the language loading*
*Edit: Nevermind, realised this was only removing the language loading*
Last edited by OpenCart Addons on Mon Jan 23, 2012 10:39 am, edited 1 time in total.
Okay, I will take a look.
You will have to put the previous mentioned changes back, as they're only referencing the language loading. Didn't even realise it when I was writing it. Also, I was making reference to v1.5.1.3 so I'm not sure if anything has changed since v1.4.9.6
You will have to put the previous mentioned changes back, as they're only referencing the language loading. Didn't even realise it when I was writing it. Also, I was making reference to v1.5.1.3 so I'm not sure if anything has changed since v1.4.9.6
Basically I am using the free shipping module as free ground shipping, thus UPS ground does not need to be displayed if the product being checked out has free shipping.
Instead of using the subtotal method currently we are selecting the products that we want to have free shipping.
Instead of using the subtotal method currently we are selecting the products that we want to have free shipping.
In catalog / model / shipping / ups.php
Find:
Replace With:
Find:
Code: Select all
if ($this->config->get('ups_' . strtolower($this->config->get('ups_origin')) . '_' . $code)) {
Code: Select all
if (strtolower($this->config->get('ups_origin')) == 'us' && $code == '03') {
if ($this->config->get('free_product')) {
$products = unserialize($this->config->get('free_product'));
foreach ($this->cart->getProducts() as $product) {
if (in_array($product['product_id'], $products)) {
if ($this->config->get('free_inclusive')) {
$free_status = true;
break;
} else {
$status = false;
}
} else {
if (!$this->config->get('free_inclusive')) {
$free_status = true;
break;
} else {
$free_status = false;
break;
}
}
}
}
} else {
$free_status = false;
}
if ($this->config->get('ups_' . strtolower($this->config->get('ups_origin')) . '_' . $code) && !$free_status) {
Last edited by OpenCart Addons on Mon Jan 23, 2012 11:23 am, edited 2 times in total.
How are you selecting them? Are you just selecting that no shipping is required on those products?NoJoke wrote:Basically I am using the free shipping module as free ground shipping, thus UPS ground does not need to be displayed if the product being checked out has free shipping.
Instead of using the subtotal method currently we are selecting the products that we want to have free shipping.
In the module there is a box that says :" Choose specific products that this shipping method will apply to, based on the inclusive setting. Select no products to apply method to entire cart."
So i select the products that I want free shipping on and it allows it to display those with free shipping
Where is the above code being placed at ( which file)?
So i select the products that I want free shipping on and it allows it to display those with free shipping
Where is the above code being placed at ( which file)?
Hey NoJoke,
Sorry, it's getting late so my brain isn't functioning fully. I updated the code above, try replacing it with that.
I forgot to call an else statement that would define $free_status = false; if the code wasn't ground.
Joel.
Sorry, it's getting late so my brain isn't functioning fully. I updated the code above, try replacing it with that.
I forgot to call an else statement that would define $free_status = false; if the code wasn't ground.
Joel.
One quick thing that I am asking here.. it seems that when I am trying to set a zone to get this to not appear if they aren't in that zone isnt working.
It seems to be still allowing the free shipping for people that aren't in the zone. Not sure what is going on or if this has anything to do with that.
It seems to be still allowing the free shipping for people that aren't in the zone. Not sure what is going on or if this has anything to do with that.
Who is online
Users browsing this forum: No registered users and 2 guests