Jump to content

$shipping->quote() parameters: what are they for?

Recommended Posts

I never understood the meaning and purpose of the quote() function parameters on shipping.php class:

class shipping {
    function quote($method = '', $module = '') {

neither the sub-uses on shipping modules, for example:

class usps {

    function quote($method = '') {

Ok, in this example I can see using of $method parm:

if (($method == '' && in_array($type, $this->types)) || $method == $type) {
        if (strpos($type, "Flat Rate")) $type_flat = $type . ', subject to verification';
        else $type_flat = $type;
               $methods[] = array('id' => $type,
                               'title' => $type_flat,
                               'cost' => ($cost + MODULE_SHIPPING_USPS_HANDLING) * $shipping_num_boxes);

But, excuse me, I can't imagine the meaning. Can anybody explain us what's the meaning and when is useful to use it?


Thanks a lot, seriously: your answer can alleviat a dude in my mind from several years ago!  (excuse my English) :D

Edited by katapofatico

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now