Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / Store pickup combined with free shipping over amount!

Store pickup combined with free shipping over amount!

Locked

Views: 1,006

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
16 Aug 2010, 12:34 PM
#1
erikallan avatar

erikallan

New Zenner

Join Date:
Dec 2008
Location:
Stockholm
Posts:
29
Plugin Contributions:
0

Store pickup combined with free shipping over amount!

Hello

I have the following shipping modules installed:

  • Flat (with a fixed amout for shipping)
  • Store pickup

Under Modules->Order Total->ot_shipping i have enabled the "Free Shipping For Orders Over" a fixed amount.

The problem is. When the total amount is over the "free limit", the store pickup option disappears on the checkout_shipping page. If the amount is under, the option shows. The result is that my customers are not able to select store pickup when they order over the free limit amount... :yuck:

Any suggestions? (We use version 1.3.8 with the latest patches)

/Erik

16 Aug 2010, 3:38 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Store pickup combined with free shipping over amount!

Instead of using the Order Totals Module for the Shipping ot_shipping you could use the Modules ... Shipping ... Free Shipping Options freeoptions ...

Set the Total to be >= 100 ...

Now, this will only appear as one of the shipping choices when the Order is greater or equal to $100.00 ...

This will allow Flat Rate flat and Store Pickup storepickup to show at the same time ...

18 Aug 2010, 9:55 AM
#3
eightnote avatar

eightnote

New Zenner

Join Date:
Jul 2010
Posts:
2
Plugin Contributions:
0

Re: Store pickup combined with free shipping over amount!

Hi Ajeh,

I have troubles with a simulair situation.
Im using the following shipping modules;

  • Flat rate1
  • Flat rate2 (copied version of Flat rate1)
  • Store pickup
  • Freeoptions (limit set at total > 100)

They all work fine, but there is one problem,
If this module kicks in if a order is bigger then 100, the flatrates also show.
and i dont want that to happen, it looks so stupid.
The store pickup module does have to show

Now i cant figure out how to write an exception in the flatrate modules
I tried this:

//	  BOF If there is a freeoptions action, flat rate is blocked	
	if ($this->enable = (MODULE_SHIPPING_FREEOPTIONS_STATUS == 'True')){
		$this->enable = ((MODULE_SHIPPING_FLAT_STATUS == 'False') ? true : false) ;
	  }else{
	  $this->enabled = ((MODULE_SHIPPING_FLAT_STATUS == 'True') ? true : false);
	  }
//	  EOF If there is a freeoptions action, flat rate is blocked

But it didn't work.

Can you give me some leads to figure this one out?
Thanks in advance!

Eightnote

18 Aug 2010, 1:27 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Store pickup combined with free shipping over amount!

You would need to the customize the Flat Rate modules so that if the amount of the Order is >= 100 then the $this->enabled in the Flat Rate Modules would be set to false so that they do not show ...

18 Aug 2010, 2:28 PM
#5
eightnote avatar

eightnote

New Zenner

Join Date:
Jul 2010
Posts:
2
Plugin Contributions:
0

Re: Store pickup combined with free shipping over amount!

Hi Ajeh

Just when i read your reply i solved the problem
This is what i've done using zen-cart 1.3.9d

Shipping modules installed
flat
flat2 (clone of flat)
freeoptions (total-100)
storepickup

Code implemented in , flat & flat2
/includes/modules/shipping/flat.php
/includes/modules/shipping/flat2.php

on line 49 (fresh install) i added this code;

// BOF if order qualify for freeoption, block this shipping option 
	$chk_freeoption_amount = $db->Execute("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_FREEOPTIONS_TOTAL_MIN'");
    $order_value=$chk_freeoption_amount->fields['configuration_value'];    
	
	if ((!$chk_freeoption_amount->RecordCount() == 0) AND ($order->info['total'] >= $order_value)){
		 $this->enabled = false;
		
	} else {
      $this->enabled = true;
    }
 	// EOF if order qualify for freeoption, block this shipping option

This code checks if Freeoptions module is installed

if no -> do nothing special
if yes -> AND the amount set in the freeoptions module Total is equal or bigger then the current cart, block this shipping method from presenting itself.

THE RESULT

If the set Total in freeoptions is equal or bigger than the current basket total i only see the shipping options

Free Shipping
Store Pickup

The big advantage by coding this way is that is does'nt matter if you have the freeoptions module installed or not.

I hope that the explanation is clear so everyone can use this.
Thanks for thinking with me anyway

Eightnote

18 Aug 2010, 2:32 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Store pickup combined with free shipping over amount!

Thanks for the update on what the code was that worked for you ...

NOTE: Be sure that your shipping modules still work in the Admin and be sure to test them