Hide UPS Ground [Solved]
22 posts
• Page 1 of 2 • 1, 2
Hide UPS Ground [Solved]
Is it possible to hide UPS Ground when a product is eligible for free shipping?
Last edited by NoJoke on Thu Jan 26, 2012 12:53 am, edited 3 times in total.
- NoJoke
- Posts: 162
- Joined: Thu Oct 13, 2011 9:37 pm
Re: Hide UPS Ground
Is there anyway to complete this or am I hoping to high?
- NoJoke
- Posts: 162
- Joined: Thu Oct 13, 2011 9:37 pm
Re: Hide UPS Ground
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.
- NoJoke
- Posts: 162
- Joined: Thu Oct 13, 2011 9:37 pm
Re: Hide UPS Ground
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 2:39 am, edited 1 time in total.
-

OpenCart Addons - Posts: 511
- Joined: Thu Nov 24, 2011 2:51 am
Re: Hide UPS Ground
would this still work if i am not using the subtotal and it as a per item basis?
- NoJoke
- Posts: 162
- Joined: Thu Oct 13, 2011 9:37 pm
Re: Hide UPS Ground
I changed the code to do what I think I want it to do for me, however, even if the code above is impletmented the option does name does dissappear but not the price. If there is no free ship the shipping option name is gone.
- NoJoke
- Posts: 162
- Joined: Thu Oct 13, 2011 9:37 pm
Re: Hide UPS Ground
Hey NoJoke,
What module are you using to get free shipping on a certain product?
Joel.
What module are you using to get free shipping on a certain product?
Joel.
-

OpenCart Addons - Posts: 511
- Joined: Thu Nov 24, 2011 2:51 am
Re: Hide UPS Ground
I am using cart version 1.4.9.6 and it comes with the software and it is just the free shipping module that is in the extensions.
- NoJoke
- Posts: 162
- Joined: Thu Oct 13, 2011 9:37 pm
Re: Hide UPS Ground
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
-

OpenCart Addons - Posts: 511
- Joined: Thu Nov 24, 2011 2:51 am
Re: Hide UPS Ground
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.
- NoJoke
- Posts: 162
- Joined: Thu Oct 13, 2011 9:37 pm
Re: Hide UPS Ground
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)) {
Replace With:
- 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 3:23 am, edited 2 times in total.
-

OpenCart Addons - Posts: 511
- Joined: Thu Nov 24, 2011 2:51 am
Re: Hide UPS Ground
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.
How are you selecting them? Are you just selecting that no shipping is required on those products?
-

OpenCart Addons - Posts: 511
- Joined: Thu Nov 24, 2011 2:51 am
Re: Hide UPS Ground
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)?
- NoJoke
- Posts: 162
- Joined: Thu Oct 13, 2011 9:37 pm
Re: Hide UPS Ground
Ah I see what you mean, give me a minute and I'll update the previous edit to include the proper changes.
Joel.
Joel.
-

OpenCart Addons - Posts: 511
- Joined: Thu Nov 24, 2011 2:51 am
Re: Hide UPS Ground
See the changes in the above post. This should turn off UPS Ground if a product qualifies for free shipping.
This is assuming the origin is US and the code is 03 (Which I believe is ground shipping).
This is assuming the origin is US and the code is 03 (Which I believe is ground shipping).
-

OpenCart Addons - Posts: 511
- Joined: Thu Nov 24, 2011 2:51 am
Re: Hide UPS Ground
I implemented the code above and it removes all of the UPS shipping options not just ground
- NoJoke
- Posts: 162
- Joined: Thu Oct 13, 2011 9:37 pm
Re: Hide UPS Ground
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.
-

OpenCart Addons - Posts: 511
- Joined: Thu Nov 24, 2011 2:51 am
Re: Hide UPS Ground
That works.. thanks for the help I appreciate it
- NoJoke
- Posts: 162
- Joined: Thu Oct 13, 2011 9:37 pm
Re: Hide UPS Ground
No problem.
Sorry for all the messages back and forth. Like I said, my brain isn't cooperating right now.
Joel.
Sorry for all the messages back and forth. Like I said, my brain isn't cooperating right now.
Joel.
-

OpenCart Addons - Posts: 511
- Joined: Thu Nov 24, 2011 2:51 am
Re: Hide UPS Ground [Solved? Maybe]
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.
- NoJoke
- Posts: 162
- Joined: Thu Oct 13, 2011 9:37 pm
22 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 1 guest














