Plugin Directory

Changeset 868737


Ignore:
Timestamp:
03/03/2014 06:45:10 PM (12 years ago)
Author:
orillacart
Message:

Shipping rates precision fix.

Location:
orillacart/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • orillacart/trunk/com_shop/installer.php

    r856599 r868737  
    725725
    726726            }
    727 
     727           
     728           
     729           
     730            if (version_compare($params->get('db_version'), '1.1.8', '<')) {
     731           
     732                $db->setQuery("ALTER TABLE `#_shop_shipping_rate` CHANGE `shipping_rate_weight_start` `shipping_rate_weight_start` DECIMAL( 10, 4 ) NOT NULL ;");
     733                if (!$db->getResource()) {
     734                    trigger_error($db->getErrorString(), E_USER_ERROR);
     735                    exit;
     736                }
     737           
     738                $db->setQuery("ALTER TABLE `#_shop_shipping_rate` CHANGE `shipping_rate_weight_end` `shipping_rate_weight_end` DECIMAL( 10, 4 ) NOT NULL ;");
     739                if (!$db->getResource()) {
     740                    trigger_error($db->getErrorString(), E_USER_ERROR);
     741                    exit;
     742                }
     743               
     744                $db->setQuery("ALTER TABLE `#_shop_shipping_rate` CHANGE `shipping_rate_volume_start` `shipping_rate_volume_start` DECIMAL( 10, 4 ) NOT NULL ;");
     745                if (!$db->getResource()) {
     746                    trigger_error($db->getErrorString(), E_USER_ERROR);
     747                    exit;
     748                }
     749               
     750                $db->setQuery("ALTER TABLE `#_shop_shipping_rate` CHANGE `shipping_rate_volume_start` `shipping_rate_volume_start` DECIMAL( 10, 4 ) NOT NULL ;");
     751                if (!$db->getResource()) {
     752                    trigger_error($db->getErrorString(), E_USER_ERROR);
     753                    exit;
     754                }
     755               
     756                $db->setQuery("ALTER TABLE `#_shop_shipping_rate` CHANGE `shipping_rate_volume_end` `shipping_rate_volume_end` DECIMAL( 10, 4 ) NOT NULL ;");
     757                if (!$db->getResource()) {
     758                    trigger_error($db->getErrorString(), E_USER_ERROR);
     759                    exit;
     760                }
     761               
     762                $db->setQuery("ALTER TABLE `#_shop_shipping_rate` CHANGE `shipping_rate_ordertotal_start` `shipping_rate_ordertotal_start` DECIMAL( 10, 4 ) NOT NULL ;");
     763                if (!$db->getResource()) {
     764                    trigger_error($db->getErrorString(), E_USER_ERROR);
     765                    exit;
     766                }
     767               
     768                $db->setQuery("ALTER TABLE `#_shop_shipping_rate` CHANGE `shipping_rate_ordertotal_end` `shipping_rate_ordertotal_end` DECIMAL( 10, 4 ) NOT NULL ;");
     769                if (!$db->getResource()) {
     770                    trigger_error($db->getErrorString(), E_USER_ERROR);
     771                    exit;
     772                }
     773               
     774                $db->setQuery("ALTER TABLE `#_shop_shipping_rate` CHANGE `shipping_rate_value` `shipping_rate_value` DECIMAL( 10, 4 ) NOT NULL ;");
     775                if (!$db->getResource()) {
     776                    trigger_error($db->getErrorString(), E_USER_ERROR);
     777                    exit;
     778                }
     779               
     780                $db->setQuery("ALTER TABLE `#_shop_shipping_rate` CHANGE `shipping_rate_package_fee` `shipping_rate_package_fee` DECIMAL( 10, 4 ) NOT NULL ;");
     781                if (!$db->getResource()) {
     782                    trigger_error($db->getErrorString(), E_USER_ERROR);
     783                    exit;
     784                }
     785               
     786                $db->setQuery("ALTER TABLE `#_shop_shipping_rate` CHANGE `shipping_rate_length_start` `shipping_rate_length_start` DECIMAL( 10, 4 ) NOT NULL ;");
     787                if (!$db->getResource()) {
     788                    trigger_error($db->getErrorString(), E_USER_ERROR);
     789                    exit;
     790                }
     791               
     792                $db->setQuery("ALTER TABLE `#_shop_shipping_rate` CHANGE `shipping_rate_length_end` `shipping_rate_length_end` DECIMAL( 10, 4 ) NOT NULL ;");
     793                if (!$db->getResource()) {
     794                    trigger_error($db->getErrorString(), E_USER_ERROR);
     795                    exit;
     796                }
     797               
     798                $db->setQuery("ALTER TABLE `#_shop_shipping_rate` CHANGE `shipping_rate_width_start` `shipping_rate_width_start` DECIMAL( 10, 4 ) NOT NULL ;");
     799                if (!$db->getResource()) {
     800                    trigger_error($db->getErrorString(), E_USER_ERROR);
     801                    exit;
     802                }
     803               
     804                $db->setQuery("ALTER TABLE `#_shop_shipping_rate` CHANGE `shipping_rate_width_end` `shipping_rate_width_end` DECIMAL( 10, 4 ) NOT NULL ;");
     805                if (!$db->getResource()) {
     806                    trigger_error($db->getErrorString(), E_USER_ERROR);
     807                    exit;
     808                }
     809               
     810                $db->setQuery("ALTER TABLE `#_shop_shipping_rate` CHANGE `shipping_rate_height_start` `shipping_rate_height_start` DECIMAL( 10, 4 ) NOT NULL ;");
     811                if (!$db->getResource()) {
     812                    trigger_error($db->getErrorString(), E_USER_ERROR);
     813                    exit;
     814                }
     815               
     816                $db->setQuery("ALTER TABLE `#_shop_shipping_rate` CHANGE `shipping_rate_height_end` `shipping_rate_height_end` DECIMAL( 10, 4 ) NOT NULL ;");
     817                if (!$db->getResource()) {
     818                    trigger_error($db->getErrorString(), E_USER_ERROR);
     819                    exit;
     820                }
     821               
     822            }
     823           
     824           
     825           
     826       
    728827            //update the parameters after we alter the database
    729828
  • orillacart/trunk/com_shop/params.php

    r856599 r868737  
    5151//Downloads
    5252
    53     public $db_version = "1.1.7";
     53    public $db_version = "1.1.8";
    5454    public $is_installed = false;
    5555    public $page_id = null;
  • orillacart/trunk/main.php

    r865299 r868737  
    33/*
    44  Plugin Name: OrillaCart
    5   Version: 1.0.23
     5  Version: 1.0.24
    66  Description: ecommerce solution for WordPress
    77  Plugin URI: http://orillacart.com
Note: See TracChangeset for help on using the changeset viewer.