Post by palynch » Fri Apr 22, 2011 3:48 am

I meant... this might be a good solution (parameter) to this FREE SHIPPING delima. So i am not a programmer by all means. Is my idea a simple task or more complicated O0

Newbie

Posts

Joined
Wed Mar 03, 2010 10:28 am

Post by Qphoria » Fri Apr 22, 2011 3:51 am

Well its a good addition but doesn't solve the issue. I will add it

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by smorelli » Mon Apr 25, 2011 11:02 pm

This may be a whole separate question, but I'm running into this issue. I have an item set to free shipping, then when the customer goes to checkout, it goes straight to the payment options and bypasses shipping which is fine except the customer no longer has the option to change their shipping to address. That option normally displays on the shipping portion of the checkout procedure.

New member

Posts

Joined
Wed Jan 27, 2010 6:28 am

Post by Qphoria » Thu Apr 28, 2011 7:19 pm

smorelli wrote:This may be a whole separate question, but I'm running into this issue. I have an item set to free shipping, then when the customer goes to checkout, it goes straight to the payment options and bypasses shipping which is fine except the customer no longer has the option to change their shipping to address. That option normally displays on the shipping portion of the checkout procedure.
Your item isn't set to free shipping.. you have "Required Shipping = NO". You are describing the exact problem I am trying to address with this thread. There is no way to have individual free shipping without losing the ability to have a shipping address

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by internet54 » Fri May 06, 2011 2:47 pm

I ran into this problem today.
I have items that are not charged for shipping and other that require UPS to ship out.
The easiest solution was to allow the free shipping module to be active with a price set at 0.00.
I also have my UPS module active.

What happens with the code below is that the free shipping option never shows up if something in the cart requires shipping and has a weight value of more than zero. This code does not block the other shipping modules from showing up.

This is a quick fix and coded fast. I'm sure it could be coded better, but I don't want to bother with diving into the system more.

file: catalog/model/shipping/free.php

Code: Select all

<?php
//modified version of free shipping to not show if a product purchased weighs something.
//this version requires the option of 'requires shipping' to be set to no if the product shouldn't be charged for shipping.

class ModelShippingFree extends Model {
	function getQuote($address) {
		
		//get products to find shipping weight
		$ok = true;
		
		$thecartitems = array();
		
		//separate the options from the products
		foreach ($_SESSION['cart'] as $k => $v) {
			$k = explode(':', $k);
			$thecartitems[] = $k[0];
		}
		
		//find weight if requires shipping
		foreach ($thecartitems as $k => $v) {
			$itmsql = mysql_query("SELECT weight FROM product WHERE shipping = '1' AND product_id = '$v'");
			$itmrst = mysql_fetch_assoc($itmsql);
			if ($itmrst['weight'] > 0) {
				$ok = false;
				break;
			}
		}
		
		if ($ok) {
			$this->load->language('shipping/free');
			
			if ($this->config->get('free_status')) {
			$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "zone_to_geo_zone WHERE geo_zone_id = '" . (int)$this->config->get('free_geo_zone_id') . "' AND country_id = '" . (int)$address['country_id'] . "' AND (zone_id = '" . (int)$address['zone_id'] . "' OR zone_id = '0')");
			
			if (!$this->config->get('free_geo_zone_id')) {
				$status = TRUE;
			} elseif ($query->num_rows) {
				$status = TRUE;
			} else {
				$status = FALSE;
			}
			} else {
				$status = FALSE;
			}
	
			if ($this->cart->getSubTotal() < $this->config->get('free_total')) {
				$status = FALSE;
			}
			
			$method_data = array();
		
			if ($status) {
				$quote_data = array();
				
			$quote_data['free'] = array(
				'id'           => 'free.free',
				'title'        => $this->language->get('text_description'),
				'cost'         => 0.00,
				'tax_class_id' => 0,
					'text'         => $this->currency->format(0.00)
			);
	
			$method_data = array(
				'id'         => 'free',
				'title'      => $this->language->get('text_title'),
				'quote'      => $quote_data,
					'sort_order' => $this->config->get('free_sort_order'),
				'error'      => FALSE
			);
			}
		
			return $method_data;
		}
	}
}
?>

New member

Posts

Joined
Sat Oct 10, 2009 3:53 am

Post by lovinit » Thu May 12, 2011 8:35 am

Will this work with 1.4.9.4?

Many thanks

New member

Posts

Joined
Wed Apr 21, 2010 2:51 am

Post by Qphoria » Thu May 12, 2011 9:36 am

Yes

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by lovinit » Thu May 12, 2011 9:50 am

Qphoria wrote:Yes
Hmm! Not sure what I've done wrong - I've uploaded the new files but the free shipping extension still looks the same - no new settings. I'm sure its my fault but any ideas?

Scratch that! I'm a fool and know exactly what I did wrong!

Thanks

New member

Posts

Joined
Wed Apr 21, 2010 2:51 am

Post by lovinit » Thu May 12, 2011 10:13 am

The Geo Zone doesn't appear to be working in the Free Shipping extension now. I've set it to a UK zone only for the free shipping but it is giving the free shipping option regardless of what country the address is in. Is this a limitation of the new version?

New member

Posts

Joined
Wed Apr 21, 2010 2:51 am

Post by Qphoria » Thu May 12, 2011 11:23 am

lovinit wrote:The Geo Zone doesn't appear to be working in the Free Shipping extension now. I've set it to a UK zone only for the free shipping but it is giving the free shipping option regardless of what country the address is in. Is this a limitation of the new version?
Checked the code and checked the functionality on my demo site using this. It works fine for me.
I set it for UK only geozone
If i use my USA address I don't see it.
If i use my UK address I see it.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by lovinit » Thu May 12, 2011 7:53 pm

Qphoria wrote: Checked the code and checked the functionality on my demo site using this. It works fine for me.
I set it for UK only geozone
If i use my USA address I don't see it.
If i use my UK address I see it.
I can't get it to work. I've tried un-installing the extension and re-installing but the free shipping still shows on countires not included in the Geo Zone selected.

Another odd thing is that if I disable the Free Shipping extension, it still shows the option at checkout. The only way I can stop it showing is to uninstall the extension.

I have a renamed admin folder (which is what caused my initial problem when I uploaded the folders without changing the admin folder name fisrt) - could this have anything to do with it?

Many thanks

New member

Posts

Joined
Wed Apr 21, 2010 2:51 am

Post by Qphoria » Thu May 12, 2011 9:39 pm

You be smokin some seriously good stuff :)

status, geozones, etc.. all working fine for me

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by lovinit » Thu May 12, 2011 9:53 pm

I thought it was just down to lack of sleep last night!! I thought it would be fine today with a fresh pair of eyes (and brain!) but alas no! I'll have to go through it with a fine tooth comb again later.

New member

Posts

Joined
Wed Apr 21, 2010 2:51 am

Post by speedingorange » Mon Jun 20, 2011 10:49 pm

I am having some fun, did not realise this tweak was included in 1.4.9.5 when I updated.

I have been using free shipping and weight based shipping,

I previously set all "free shipping items" to 0.00 weight and set the cost of zero weight to £0.00. Worked fine.

I used Free shipping to give free shipping on all orders over £80.00

after updating all my products that where £10.00 yet included free shipping no longer work (they display the " no shipping method" error). I really need to fix this, I have a lot of products that use this method and are under the £80.00 free shipping threshold and no longer can be purchased!

Anyone managed to get this working?

Cheers
James

[EDIT] Have narrowed it down to weight based shipping not accepting a value of anything less than £0.01 as a valid value. Can anyone tell me where the code is to change this so that it allows a value of 0 again?

[EDIT EDIT]

Thought I had found a workaround by using flat rate shipping to offer £0.00 charge on the sub £80.00 free shipping products. However this meant that people in other geo zones could also get free shipping that I would need to charge a surcharge to!
Last edited by speedingorange on Mon Jun 20, 2011 11:19 pm, edited 1 time in total.

Active Member

Posts

Joined
Tue Feb 23, 2010 7:33 pm

Post by Qphoria » Mon Jun 20, 2011 11:18 pm

speedingorange wrote:I am having some fun, did not realise this tweak was included in 1.4.9.5 when I updated.

I have been using free shipping and weight based shipping,

I previously set all "free shipping items" to 0.00 weight and set the cost of zero weight to £0.00. Worked fine.

I used Free shipping to give free shipping on all orders over £80.00

after updating all my products that where £10.00 yet included free shipping no longer work (they display the " no shipping method" error). I really need to fix this, I have a lot of products that use this method and are under the £80.00 free shipping threshold and no longer can be purchased!

Anyone managed to get this working?

Cheers
James

[EDIT] Have narrowed it down to weight based shipping not accepting a value of anything less than £0.01 as a valid value. Can anyone tell me where the code is to change this so that it allows a value of 0 again?
This is a bug.. it was addressed in the 1.4.9.5 official bug thread and a patch for the file was created

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by speedingorange » Mon Jun 20, 2011 11:29 pm

Have applied the fix and it still does not work, I hope i described it correctly.

My free shipping value is £80.00 as set in the free shipping module, and it is set to apply to everything.

I used weight based shipping with a weight of 0.00:0.00, to give free shipping or shipping at no cost on selected items of less than £80.00.

This no longer works, the patch files seem to address a slightly different issue.

Cheers
James
Qphoria wrote:
speedingorange wrote:I am having some fun, did not realise this tweak was included in 1.4.9.5 when I updated.

I have been using free shipping and weight based shipping,

I previously set all "free shipping items" to 0.00 weight and set the cost of zero weight to £0.00. Worked fine.

I used Free shipping to give free shipping on all orders over £80.00

after updating all my products that where £10.00 yet included free shipping no longer work (they display the " no shipping method" error). I really need to fix this, I have a lot of products that use this method and are under the £80.00 free shipping threshold and no longer can be purchased!

Anyone managed to get this working?

Cheers
James

[EDIT] Have narrowed it down to weight based shipping not accepting a value of anything less than £0.01 as a valid value. Can anyone tell me where the code is to change this so that it allows a value of 0 again?
This is a bug.. it was addressed in the 1.4.9.5 official bug thread and a patch for the file was created

Active Member

Posts

Joined
Tue Feb 23, 2010 7:33 pm

Post by Qphoria » Tue Jun 21, 2011 12:13 am

speedingorange wrote:Have applied the fix and it still does not work, I hope i described it correctly.

My free shipping value is £80.00 as set in the free shipping module, and it is set to apply to everything.

I used weight based shipping with a weight of 0.00:0.00, to give free shipping or shipping at no cost on selected items of less than £80.00.

This no longer works, the patch files seem to address a slightly different issue.

Cheers
James
That sounds like it is related to the weight based shipping, not free or flat

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by speedingorange » Tue Jun 21, 2011 12:16 am

I assumed it was related due to your last post on this thread here: http://forum.opencart.com/viewtopic.php?t=19450

Active Member

Posts

Joined
Tue Feb 23, 2010 7:33 pm

Post by Lao » Tue Jul 05, 2011 4:30 pm

It's exactly what I was looking for in the thread I opened here:
viewtopic.php?f=114&t=35401&p=171099&e=171099

The first solution provided by Q works like a charm!

Thank you!
Lao Mayer

I'm using Open Cart 1.5.4.1 on http://www.importpieseauto.ro


User avatar
Lao
Active Member

Posts

Joined
Tue Nov 23, 2010 3:31 pm
Location - Craiova, Romania

Post by GhostHunt » Thu Aug 25, 2011 9:20 am

Q,

I am on OC 1.4.9.6.

I am using weight based shipping and "free shipping" coupon. Two items in the order. They are Product A weight 5lbs
and Product B weight 100lbs.

The "free shipping" coupon is set to only trigger for for Product A weight 5lbs.
The "free shipping" module is set to "No" Product B is not eligible for Free Shipping for anything over 1.00
for all GEO zones.

However the "free shipping" coupon is still being picked up and applied to the entire
order. Did I miss something? I tried changing the sort order several different ways with no luck.

Product Model Quantity Price Total
Product A A 1 $159.00 $159.00
Product B B 1 $573.00 $573.00

Sub-Total: $732.00
Coupon (FREE SHIPPING): -$140.00
Residential Delivery Zone 1 (Weight: 100.00lb): $140.00
Illinois Tax: $45.75
Total: $777.75

New member

Posts

Joined
Thu Mar 18, 2010 8:58 am
Who is online

Users browsing this forum: No registered users and 6 guests