wkrecords Posted November 9, 2002 Posted November 9, 2002 is there a way to mark diff shipping rates for us, and out of us?
Ajeh Posted November 9, 2002 Posted November 9, 2002 You can add conditions to the shipping modules based on just about anything. I have set them up to appear/disappear based on various criteria. In this example, I use a function to determine if Free Shipping should be the only module showing based on cart content. Just setup an IF or case paramater to handle whether or not this is set: This is /includes/modules/shipping/flat.php // BOF: WebMakers.com Added: Free Payments and Shipping if ( tep_get_free_shipper($this->code) ) { $this->enabled = MODULE_SHIPPING_FLAT_STATUS; } // EOF: WebMakers.com Added: Free Payments and Shipping
wkrecords Posted November 9, 2002 Author Posted November 9, 2002 but for mine i have the ratio with 10:1.99,20:2.99 etc how would i do that and what should i edit?
Ajeh Posted November 9, 2002 Posted November 9, 2002 I am sorry, I thought you were trying to setup the modules so that when a customer is from one place you see one set of shipping modules and when from another you would see another set of shipping modules. You can, however, use this to do something similar. Make a copy of the current shipping module and rename it. Have one set to the US rates and the other for outside of the US. Then, based on customer address use the IF statement idea I showed you to determine which shipping module actually shows. This would allow you to maintain two sets of rates and only one set appears when the customer is checking out based on address.
wkrecords Posted November 9, 2002 Author Posted November 9, 2002 but how do i make sure it would have the outside module show for non us customers and the us module show for us customers?
Ajeh Posted November 10, 2002 Posted November 10, 2002 You would do a check to see what the country is for the current address. Then, you have two shipping modules ... like table.php and tableuk.php Then, add a function to validate the shipping address and return true or false for US. function tep_get_valid_address_us or something like that. If it returns true, then the table.php will run. If not, it will be hidden. Set the other shipping module so when it returns false that it will show, otherwise when true, it will be hidden.
wkrecords Posted November 10, 2002 Author Posted November 10, 2002 how would i do that? im not that great at php
Recommended Posts
Archived
This topic is now archived and is closed to further replies.