Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / My cloned flat and freeoptions modules don't work

My cloned flat and freeoptions modules don't work

Locked

Views: 1,056

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
22 Sep 2008, 9:10 PM
#1
breadfan avatar

breadfan

New Zenner

Join Date:
Jul 2007
Posts:
52
Plugin Contributions:
0

My cloned flat and freeoptions modules don't work

Hi.

First of all, sorry for the lengthy explanation, I just want to make it clear.

I have created copies of flat.php and freeoptions.php shipping modules and renamed them to sp_flat.php and sp_freeoptions.php respectively.

I have also changed all "flat" and "FLAT" to "sp_flat" and "SP_FLAT" in sp_flat.php,
and I have changed all "freeoptions" and "FREEOPTIONS" to "sp_freeoptions" and "SP_FREEOPTIONS" in sp_freeoptions.

Other than that, the files have their original content.

Then I go to Zen Cart administration and set Shipping Cost 60.00 in sp_flat and Total >= 2000.00 in sp_freeoptions.

Up until here, everything seems fine, but...

When I log on to my shop, I do some shopping and after I go to checkout, the original flat and freeoptions (which are still activated) work find, but the new cloned models don't work. After I select one of these new options, the "Next step" button redirects me to the same page and not to the next step :(

Does anybody have any idea about what could be wrong?

The point of having the cloned modules is that I need a "by Courier" shipping method and "by Slovak Postal Service" shipping method, both with freeoptions (but each with different values).

23 Sep 2008, 2:31 AM
#2
ajeh avatar

ajeh

Oba-san

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

Re: My cloned flat and freeoptions modules don't work

It is your naming convention ...

sp_flat will clash with flat ...

use flatsp or spflat without the underscore so all:
flat become flatsp
FLAT become FLATSP

and all will start working for you ...

The main point is, don't leave flat by itself on either side of the underscore or it gets spliced up and in conflict with the flat.php file ...

23 Sep 2008, 2:32 AM
#3
ajeh avatar

ajeh

Oba-san

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

Re: My cloned flat and freeoptions modules don't work

Note: this is true with freeoptions as well ...

freeoptionssp or spfreeoptions will correct the issue ...

23 Sep 2008, 2:51 AM
#4
breadfan avatar

breadfan

New Zenner

Join Date:
Jul 2007
Posts:
52
Plugin Contributions:
0

Re: My cloned flat and freeoptions modules don't work

Thank you very much, I would have never thought that the underscore has so much importance. I'm gonna try it out right now...as if my night wasn't sleepless enough already :D

But still, thank you very much :thumbsup:

23 Sep 2008, 3:15 AM
#5
ajeh avatar

ajeh

Oba-san

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

Re: My cloned flat and freeoptions modules don't work

Note: the shipping directory for the modules is autoloading ... this means any file in there loads and you do not want to leave extra copies, backups etc.

If you have to leave a file copy such as trying to rename a file like flat_sp.php to flat_sp_old.php ... instead call it flat_sp.php_OLD so that the extention is not php ...

Granted the better thing to do is to not load any files there that cannot be installed ... or you will get errors in the Admin, at the very least ...

23 Sep 2008, 3:35 AM
#6
breadfan avatar

breadfan

New Zenner

Join Date:
Jul 2007
Posts:
52
Plugin Contributions:
0

Re: My cloned flat and freeoptions modules don't work

Don't worry, I didn't leave any trash behind ;) Your solution works like a dream and my payment and shipping is all set :)

23 Sep 2008, 3:45 AM
#7
ajeh avatar

ajeh

Oba-san

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

Re: My cloned flat and freeoptions modules don't work

Thanks for the update that everything is now working properly ... :smile:

Good luck with your site ...