Plugin Directory

Changeset 862816


Ignore:
Timestamp:
02/22/2014 03:18:22 AM (12 years ago)
Author:
orillacart
Message:

Shipping rates bug fix.

Location:
orillacart/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • orillacart/trunk/com_shop/helpers/standart_shipping.php

    r812827 r862816  
    328328
    329329            if ($country) {
    330                 $wherecountry = '( ' . $conditions[$r->params->get('country', 0)][1] . ' FIND_IN_SET( "' . $country . '", shipping_rate_country ) OR shipping_rate_country="0" OR shipping_rate_country="" OR shipping_rate_country IS NULL)';
     330                $wherecountry = $conditions[$r->params->get('country', 0)][0].' ( ' . $conditions[$r->params->get('country', 0)][1] . ' FIND_IN_SET( "' . $country . '", shipping_rate_country ) OR shipping_rate_country="0" OR shipping_rate_country="" OR shipping_rate_country IS NULL)';
    331331            } else {
    332                 $wherecountry = '( ' . $conditions[$r->params->get('country', 0)][1] . ' FIND_IN_SET( "' . $params->get('shop_country') . '", shipping_rate_country ) )';
     332              //  $wherecountry = $conditions[$r->params->get('country', 0)][0].' ( ' . $conditions[$r->params->get('country', 0)][1] . ' FIND_IN_SET( "' . $params->get('shop_country') . '", shipping_rate_country ) )';
    333333            }
    334334
     
    343343            WHERE sr.carrier = {$r->method_id}
    344344                       
    345                         " . $conditions[$r->params->get('country', 0)][0] . " {$wherecountry}
     345                        {$wherecountry}
    346346                        {$wherestate}
    347347                        AND c.type='shipping'
    348348            " . $conditions[$r->params->get('volume', 0)][0] . "
    349                         ( " . $conditions[$r->params->get('volume', 0)][1] . " (shipping_rate_volume_start <= '{$volume}' AND  shipping_rate_volume_end >= '{$volume}') OR (shipping_rate_volume_end = 0) )
     349                        ( " . $conditions[$r->params->get('volume', 0)][1] . " (shipping_rate_volume_start <= '{$volume}' AND  (shipping_rate_volume_end >= '{$volume}' OR shipping_rate_volume_end = 0) ) )
    350350            " . $conditions[$r->params->get('total', 0)][0] . "
    351                         (" . $conditions[$r->params->get('total', 0)][1] . " (shipping_rate_ordertotal_start <= '{$order_subtotal}' AND  shipping_rate_ordertotal_end >= '{$order_subtotal}')  OR (shipping_rate_ordertotal_end = 0))
     351                        (" . $conditions[$r->params->get('total', 0)][1] . " (shipping_rate_ordertotal_start <= '{$order_subtotal}' AND  (shipping_rate_ordertotal_end >= '{$order_subtotal}' OR shipping_rate_ordertotal_end = 0) ))
    352352            " . $conditions[$r->params->get('weight', 0)][0] . "
    353                         (" . $conditions[$r->params->get('weight', 0)][1] . " (shipping_rate_weight_start <= '{$weighttotal}' AND  shipping_rate_weight_end >= '{$weighttotal}')  OR (shipping_rate_weight_end = 0))
     353                        (" . $conditions[$r->params->get('weight', 0)][1] . " (shipping_rate_weight_start <= '{$weighttotal}' AND  ( shipping_rate_weight_end >= '{$weighttotal}'  OR shipping_rate_weight_end = 0)))
    354354            " . $conditions[$r->params->get('width', 0)][0] . "
    355                          (" . $conditions[$r->params->get('width', 0)][1] . " (shipping_rate_width_start <= '" . $totaldimention['totalwidth'] . "' AND  shipping_rate_width_end >= '" . $totaldimention['totalwidth'] . "')  OR (shipping_rate_width_end = 0))
     355                         (" . $conditions[$r->params->get('width', 0)][1] . " (shipping_rate_width_start <= '" . $totaldimention['totalwidth'] . "' AND  (shipping_rate_width_end >= '" . $totaldimention['totalwidth'] . "'  OR shipping_rate_width_end = 0)))
    356356                                   
    357357                         " . $conditions[$r->params->get('length', 0)][0] . "
    358                          (" . $conditions[$r->params->get('length', 0)][1] . " (shipping_rate_length_start <= '" . $totaldimention['totallength'] . "' AND  shipping_rate_length_end >= '" . $totaldimention['totallength'] . "')  OR (shipping_rate_length_end = 0))
     358                         (" . $conditions[$r->params->get('length', 0)][1] . " (shipping_rate_length_start <= '" . $totaldimention['totallength'] . "' AND  (shipping_rate_length_end >= '" . $totaldimention['totallength'] . "'  OR shipping_rate_length_end = 0)))
    359359           
    360360                          " . $conditions[$r->params->get('height', 0)][0] . "
    361                          (" . $conditions[$r->params->get('height', 0)][1] . " (shipping_rate_height_start <= '" . $totaldimention['totalheight'] . "' AND  shipping_rate_height_end >= '" . $totaldimention['totalheight'] . "')  OR (shipping_rate_height_end = 0))
     361                         (" . $conditions[$r->params->get('height', 0)][1] . " (shipping_rate_height_start <= '" . $totaldimention['totalheight'] . "' AND  (shipping_rate_height_end >= '" . $totaldimention['totalheight'] . "' OR shipping_rate_height_end = 0)))
    362362                     
    363363                         
    364364                         
    365365                        ORDER BY sr.shipping_rate_priority,shipping_rate_value ";
    366             
     366           
    367367            $db->setQuery($sql);
    368368
  • orillacart/trunk/main.php

    r861174 r862816  
    33/*
    44  Plugin Name: OrillaCart
    5   Version: 1.0.21
     5  Version: 1.0.22
    66  Description: ecommerce solution for WordPress
    77  Plugin URI: http://orillacart.com
  • orillacart/trunk/readme.txt

    r861174 r862816  
    8585
    8686== Changelog ==
     87= 1.0.22 - 22.02.2014 =
     881. Shipping rates bug fix.
    8789
    8890= 1.0.21 - 19.02.2014 =
Note: See TracChangeset for help on using the changeset viewer.