Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / How to make perweightunit option disappears when freeoptions is activated?

How to make perweightunit option disappears when freeoptions is activated?

Locked

Views: 1,234

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
13 Dec 2009, 6:49 AM
#1
mermaidlisa avatar

mermaidlisa

New Zenner

Join Date:
Dec 2009
Location:
Singapore
Posts:
27
Plugin Contributions:
0

How to make perweightunit option disappears when freeoptions is activated?

I've been searching the forum for awhile but couldn't find the answer.

I'm aware that the freeoptions shipping module is supposed to show together with other shipping modules. And someone has mentioned we could modify something in the perweightunit module to make it disappear when freeoptions is activated. But I'm not sure how to do this. I'm new to this coding thing :cry:

Please please advise!!! Thanks for a mil!!

13 Dec 2009, 4:12 PM
#2
mermaidlisa avatar

mermaidlisa

New Zenner

Join Date:
Dec 2009
Location:
Singapore
Posts:
27
Plugin Contributions:
0

Re: How to make perweightunit option disappears when freeoptions is activated?

I feel that I should add in some details. I'm from Singapore and Singapore post office has 2 options for postage, Normal postage and Register postage

If a customer order more than $100, I wish the check out page could be something like:
[ ] Free Normal postage
[ ] Register postage ($8.00)

If a customer order more than $150, the checkout page should be like
[ ] Free Normal Postage
[ ] Free Register postage

I have cloned the freeoptions module (for Free Normal postage and Free Register postage), but not sure how to enable other shipping modules when these are activated. Currently, for order above $150, my checkout page is like this:
[ ] Free Normal postage
[ ] Free Register postage
[ ] Normal Postage ($5.00)
[ ] Register postage ($8.00)
This looks kinda confusing right....

Any guidline to modify the shipping module please please please. Thanks a lot.

14 Dec 2009, 9:32 AM
#3
mermaidlisa avatar

mermaidlisa

New Zenner

Join Date:
Dec 2009
Location:
Singapore
Posts:
27
Plugin Contributions:
0

Re: How to make perweightunit option disappears when freeoptions is activated?

i have figured it out. here's the solution for those who need it too =)

in includes/modules/shipping/perunitweight.php, add in this code

//disable normal postage when free normal postage is offered
if ($_SESSION['cart']->total >=100 ) {
$this->enabled = false;
}

This will do the tricks!

15 Dec 2009, 2:26 AM
#4
ajeh avatar

ajeh

Oba-san

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

Re: How to make perweightunit option disappears when freeoptions is activated?

Thanks for the update and posting the solution that worked for you ... :smile:

16 Dec 2009, 6:46 AM
#5
rainyplace avatar

rainyplace

New Zenner

Join Date:
Nov 2009
Location:
QLD, Australia
Posts:
42
Plugin Contributions:
0

Re: How to make perweightunit option disappears when freeoptions is activated?

this is great !!! but i added it and it still shows the other options when free post is offered on cart total of >$100

Is there a particular place it should be put in the perunitweight.php. i added it at the bottom, just before the ?>

also i put '100' in the admin>modules>shipping>freeoptions>Total >=

Have i done it correctly?

Cheers,
Grant,

20 Dec 2009, 9:05 AM
#6
rainyplace avatar

rainyplace

New Zenner

Join Date:
Nov 2009
Location:
QLD, Australia
Posts:
42
Plugin Contributions:
0

Re: How to make perweightunit option disappears when freeoptions is activated?

i just figured it out on my third attempt coming back to it.

I have cloned 3 table rates and was putting the code in the perunitweight file (which i don't use) and not in the table rate files.