Post by nemmon » Thu Oct 15, 2009 10:40 pm

Hello,

I am working on a cart where if a customer orders more than $100.00 in products, I want to give them free shipping, if they order 99.99 they get charged a set fee. ($5.99) how can I apply this?

New member

Posts

Joined
Wed Apr 29, 2009 7:55 am

Post by Qphoria » Thu Oct 15, 2009 11:26 pm

why not look at the Free Shipping module?

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by nemmon » Sat Oct 17, 2009 9:04 pm

Hey Q,
I will, but, what I am trying to figure out is, how to I specify the condition:

If product order <99.99
Shipping 5.95
else
FreeShipping

I hope I am making sense.
Thanks

New member

Posts

Joined
Wed Apr 29, 2009 7:55 am

Post by Qphoria » Sat Oct 17, 2009 10:04 pm

As I said.. LOOK at the free shipping module. It already does this.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by nemmon » Wed Oct 21, 2009 6:23 am

Hey Q,

I did, sorry for my ignorance. :)
Now, I setup 100.00 on the subtotal field.

Now, when I try to order products that are less than: $100.00 I get this error:

Error: Shipping Method required. If I add another product and I exceed $100.00, the free shipping kicks in.

Please help :)

New member

Posts

Joined
Wed Apr 29, 2009 7:55 am

Post by nemmon » Wed Oct 21, 2009 6:29 am

Figured it out. Enabled the flat rate... :)

Ooooooops...

:)

New member

Posts

Joined
Wed Apr 29, 2009 7:55 am

Post by Sera » Wed Oct 21, 2009 5:41 pm

sorry but where can I find the free shipping module?

New member

Posts

Joined
Wed Oct 21, 2009 4:45 am

Post by Qphoria » Wed Oct 21, 2009 7:06 pm

Admin->Extension->Shipping

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Sera » Wed Oct 21, 2009 7:31 pm

ok thank you.
I aktivate flat rate shipping (for orders under 100€) and the free shipping module with 100.00 in the subtotal field.
BUT now I have both shipping methods when a clients order is over 100€. Can I take a change so the client only see the free shipping and not both methods?

New member

Posts

Joined
Wed Oct 21, 2009 4:45 am

Post by Qphoria » Thu Oct 22, 2009 5:15 am

To do what you want, you can force the shipping module to autochoose freeshipping:

EDIT: catalog/model/shipping/free.php

FIND:

Code: Select all

$method_data = array(
        'id'         => 'free',
        'title'      => $this->language->get('text_title'),
        'quote'      => $quote_data,
				'sort_order' => $this->config->get('free_sort_order'),
        'error'      => FALSE
);
AFTER, ADD:

Code: Select all

//Q: If this free shipping is available, override all other shipping modules and force this one.
			$this->session->data['shipping_method'] = $quote_data['free'];
			$this->session->data['comment'] = (isset($this->session->data['comment'])) ? $this->session->data['comment'] : '';
			if(!isset($this->session->data['guest'])) {
				$this->response->redirect(HTTPS_SERVER . 'index.php?route=checkout/payment'));
			}
This fools the cart by forcing free shipping and quickly redirecting the page. This will only work for registered checkout, since the guest checkout has the shipping and payment on the same page and I can't bypass the page

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Sera » Fri Oct 23, 2009 2:47 am

ok thank you

Sera

New member

Posts

Joined
Wed Oct 21, 2009 4:45 am

Post by deeve » Fri Dec 04, 2009 7:48 pm

Can the same result be achieved based on product quantity rather than Total cost?
I'm using your Zone Shipping Mod, Q in 1.3.4

Thanks.

Active Member

Posts

Joined
Tue Oct 20, 2009 4:31 pm

Post by k2tec » Mon Apr 12, 2010 8:42 pm

I am using 1.4.6 and I put this code

Code: Select all

//Q: If this free shipping is available, override all other shipping modules and force this one.
        $this->session->data['shipping_method'] = $quote_data['free'];
         $this->session->data['comment'] = '';
         $this->response->redirect(HTTPS_SERVER . 'index.php?route=checkout/payment');
but it also skipped my pickup at store.
Is it possible to show checkout shipping with the other shipping possibillities?

User avatar
Active Member

Posts

Joined
Mon Apr 12, 2010 8:06 pm

Post by Qphoria » Mon Apr 12, 2010 8:59 pm

It shows them all by default. The code above just forces the free shipping option if the subtotal is over 100.00
If you just want to show the options, then you just need to enable the free shipping module in the backend and set the total amount to 100

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by k2tec » Mon Apr 12, 2010 9:42 pm

Thanks for the fast reply.
Maybe I was not clear enough.
But what I want is above $ 100 free shipping and still pickup at store. And flate rate not visible.
When I install those 3 shipping methods and the amount is above 100 it still shows al 3
With the code it is going directly to the payment options that is not what I want.
I try-out the if statement in catalog\model\shipping flate.php but it did not worked out

User avatar
Active Member

Posts

Joined
Mon Apr 12, 2010 8:06 pm

Post by Qphoria » Mon Apr 12, 2010 9:47 pm

Then you need to change add some code to flat rate module that hides the flat rate option

1. EDIT: catalog/model/payment/flat.php

2. FIND:

Code: Select all

if ($status) {
3. BEFORE, ADD:

Code: Select all

if ($this->cart->getSubtotal() > 100.00) {
    $status = false;
}

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by k2tec » Mon Apr 12, 2010 10:45 pm

Ok thanks,

but i think it has to by
1. EDIT: catalog/model/shipping/flat.php

2. FIND:

Code: Select all

if (!$this->config->get('flat_geo_zone_id')) {
        		$status = TRUE;
      		} elseif ($query->num_rows) {
        		$status = TRUE;
      		} else {
        		$status = FALSE;
      		}

3. below, ADD:

Code: Select all

if ($this->cart->getSubtotal() > $this->config->get('free_total')) {
              $status = false;
            }

User avatar
Active Member

Posts

Joined
Mon Apr 12, 2010 8:06 pm

Post by Qphoria » Tue Apr 13, 2010 12:15 am

Semantics. That makes no difference. As long as it is before the if ($status) { line, that is all that matters.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by k2tec » Tue Apr 13, 2010 4:17 am

Thanks a lot it works great

User avatar
Active Member

Posts

Joined
Mon Apr 12, 2010 8:06 pm

Post by deeve » Tue Apr 20, 2010 3:49 pm

Is there an easy way to enable free shipping after set amount + an expedited option as well?

Active Member

Posts

Joined
Tue Oct 20, 2009 4:31 pm
Who is online

Users browsing this forum: No registered users and 212 guests