Zen Cart Logo
Forums / Addon Shipping Modules / Need another freeoptions module to add to shipping

Need another freeoptions module to add to shipping

Views: 764

Results 1 to 4 of 4
27 May 2012, 11:03 PM
#1
gotlogos avatar

gotlogos

New Zenner

Join Date:
Nov 2010
Posts:
84
Plugin Contributions:
0

Need another freeoptions module to add to shipping

I am needing to add a shipping module based on one available already in zen cart- freeoptions.

I use this to offer free shipping to my customers once they reach a certain order total. The way I have freeoptions set up is I only allow the free shipping to appear if the weight is also 13ozs and under. So, basically they get free first class shipping but not free Priority if that is what is needed to ship their package.

I want to make a change that offers reduced and partially free shipping if they are over 13ozs. I want to offer a flat rate Priority charge of 2.00-2.50 if their cart total is over a certain amount AND weight is over a certain amount, then they are presented with the REDUCED Priority option. If both conditions were true before they were simply presented with our flat-rate Priority option, but we want to instead, in this situation, offer a reduced flat rate Priority option.

27 May 2012, 11:14 PM
#2
ajeh avatar

ajeh

Oba-san

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

Re: Need another freeoptions module to add to shipping

Copy the files:
/includes/modules/shipping/freeoptions.php
/includes/languages/english/modules/shipping/freeoptions.php

to the files:
/includes/modules/shipping/freeoptions2.php
/includes/languages/english/modules/shipping/freeoptions2.php

Edit the files:
/includes/modules/shipping/freeoptions2.php
/includes/languages/english/modules/shipping/freeoptions2.php

and change all:
freeoptions to freeoptions2
FREEOPTIONS to FREEOPTIONS2

Edit the code:

// final check for display of Free Options
      if ($this->ck_freeoptions_total or $this->ck_freeoptions_weight or $this->ck_freeoptions_items) {
        $this->enabled = true;
      } else {
        $this->enabled = false;
      }

to read:

// final check for display of Free Options
      if ($this->ck_freeoptions_total and $this->ck_freeoptions_weight or $this->ck_freeoptions_items) {
        $this->enabled = true;
      } else {
        $this->enabled = false;
      }
27 May 2012, 11:29 PM
#3
gotlogos avatar

gotlogos

New Zenner

Join Date:
Nov 2010
Posts:
84
Plugin Contributions:
0

Re: Need another freeoptions module to add to shipping

Thanks Ajeh--I just got through reading your cloning tutorial in another thread and I got it on first try...many, many thanks...I had just come back here to update : )

For others possibly attempting this...I used Notepad and did the search and replace but you have to be careful to make it case sensitive...it was a snap actually.

27 May 2012, 11:49 PM
#4
ajeh avatar

ajeh

Oba-san

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

Re: Need another freeoptions module to add to shipping

Thanks for the update that you have this working now ... :smile: