Plugin Directory

Changeset 490468


Ignore:
Timestamp:
01/16/2012 05:35:04 AM (14 years ago)
Author:
beshkin
Message:

tagging version 0.2

Location:
e-commerce-multi-currency-support
Files:
6 edited
6 copied

Legend:

Unmodified
Added
Removed
  • e-commerce-multi-currency-support/tags/0.2/js-css/currency.js

    r490337 r490468  
    55$j(function () {
    66    $j("#wpsc-mcs-widget-form select").change(function(){
    7         $j("#wpsc-mcs-widget-form").submit();
    8         console.log('test');
     7        if (!$j("#wpsc-mcs-widget-form input[type=submit]").length)
     8            $j("#wpsc-mcs-widget-form").submit();
     9
    910    });
    10     //$j("#checkout_total").html('test');
     11
    1112});
    1213
  • e-commerce-multi-currency-support/tags/0.2/readme.txt

    r490337 r490468  
    33Tags: e-commerce, shop, cart, featured product,featured,sticky product, ecommerce, currency
    44Requires at least: 2.9
    5 Tested up to: 2.9
    6 Stable tag: 0.1
     5Tested up to: 3.1.1
     6Stable tag: 0.2
    77
    88
     
    1717
    1818== Changelog ==
     19= 0.2 =
     20- currency code can appear now in the selector drop-down
     21- submit button can be switched on and off
    1922= 0.1 =
    2023- fork the wp-e-commerce-multi-currency-magic plugin
  • e-commerce-multi-currency-support/tags/0.2/widgets/currency_chooser_widget.php

    r490337 r490468  
    2828        $output .='<select name="currency_option" style="width:200px;">';
    2929            foreach($countries as $country){
     30                $country_code = '';
     31                if ($instance['show_code'] == 1) $country_code =" (".$country['code'].")";
    3032                if($_SESSION['wpsc_currency_code'] == $country['id']){
    31                     $output .="<option selected='selected' value=".$country['id'].">".$country['country']."</option>";
     33                    $output .="<option selected='selected' value=".$country['id'].">".$country['country'].$country_code."</option>";
    3234                }else{
    33                     $output .="<option value=".$country['id'].">".$country['country']."</option>";
     35                    $output .="<option value=".$country['id'].">".$country['country'].$country_code."</option>";
    3436                }
    3537            }
    3638        $output .="</select><br />";
    3739        $output .='<input type="hidden" value="change_currency_country" class="button-primary" name="wpsc_admin_action" />';
    38         /*
     40
    3941        if($instance['show_reset'] == 1){
    4042            $output .='<input type="submit" value="'.__('Reset Price to ','wpsc').$_SESSION['wpsc_base_currency_code'].'"  name="reset" />';
    4143        }
    42         $output .='<input type="submit" value="'.__('Convert','wpsc').'" class="button-primary" name="submit" />';
    43         */
     44        if($instance['show_submit'] == 1){
     45            $output .='<input type="submit" value="'.__('Convert','wpsc').'" class="button-primary" name="submit" />';
     46        }
    4447        $output .='</form>';
    4548        if($instance['show_conversion'] == 1){
     
    6669        $instance['show_conversion'] = $new_instance['show_conversion'];
    6770        $instance['show_reset'] = $new_instance['show_reset'];
     71        $instance['show_submit'] = $new_instance['show_submit'];
     72        $instance['show_code'] = $new_instance['show_code'];
    6873
    6974        return $instance;
     
    7580        $show_conversion =$instance['show_conversion'];
    7681        $show_reset =$instance['show_reset'];
     82        $show_submit =$instance['show_submit'];
     83        $show_code =$instance['show_code'];
     84        if ($show_code == 1) {
     85            $show_code_check = 'checked="checked"';
     86        }else{
     87            $show_code_check = '';
     88        }
     89
    7790        if($show_conversion == 1){
    7891            $checked = 'checked="checked"';
     
    8598            $show_reset_check = '';
    8699        }
     100        if($show_submit == 1){
     101            $show_submit_check = 'checked="checked"';
     102        }else{
     103            $show_submit_check = '';
     104        }
    87105        ?>
    88106        <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" /></label></p>
    89107        <p><label for="<?php echo $this->get_field_id('show_conversion'); ?>"><?php _e('Show Conversion Rate:'); ?> <input  id="<?php echo $this->get_field_id('show_conversion'); ?>" name="<?php echo $this->get_field_name('show_conversion'); ?>" type="checkbox" value="1" <?php echo $checked; ?> /></label></p>
     108        <p><label for="<?php echo $this->get_field_id('show_code'); ?>"><?php _e('Show currency code:'); ?> <input  id="<?php echo $this->get_field_id('show_code'); ?>" name="<?php echo $this->get_field_name('show_code'); ?>" type="checkbox" value="1" <?php echo $show_code_check; ?> /></label></p>
    90109        <p><label for="<?php echo $this->get_field_id('show_reset'); ?>"><?php _e('Show Reset Button:'); ?> <input  id="<?php echo $this->get_field_id('show_reset'); ?>" name="<?php echo $this->get_field_name('show_reset'); ?>" type="checkbox" value="1" <?php echo $show_reset_check; ?> /></label></p>
    91         <?php
     110        <p><label for="<?php echo $this->get_field_id('show_submit'); ?>"><?php _e('Show Submit Button:'); ?> <input  id="<?php echo $this->get_field_id('show_submit'); ?>" name="<?php echo $this->get_field_name('show_submit'); ?>" type="checkbox" value="1" <?php echo $show_submit_check; ?> /></label></p>
     111        <?php
    92112   
    93113    }
  • e-commerce-multi-currency-support/tags/0.2/wpsc-currency-changer.php

    r490337 r490468  
    44Plugin URI: http://misha.beshkin.lv
    55Description: A plugin that provides a currency converter tool integrated into the WordPress Shopping Cart. This is trunk from wp-e-commerce-multi-currency-magic plugin.
    6 Version: 0.1
     6Version: 0.2
    77Author: Misha Beshkin
    88Author URI: http://misha.beshkin.lv
  • e-commerce-multi-currency-support/trunk/js-css/currency.js

    r490337 r490468  
    55$j(function () {
    66    $j("#wpsc-mcs-widget-form select").change(function(){
    7         $j("#wpsc-mcs-widget-form").submit();
    8         console.log('test');
     7        if (!$j("#wpsc-mcs-widget-form input[type=submit]").length)
     8            $j("#wpsc-mcs-widget-form").submit();
     9
    910    });
    10     //$j("#checkout_total").html('test');
     11
    1112});
    1213
  • e-commerce-multi-currency-support/trunk/readme.txt

    r490337 r490468  
    33Tags: e-commerce, shop, cart, featured product,featured,sticky product, ecommerce, currency
    44Requires at least: 2.9
    5 Tested up to: 2.9
    6 Stable tag: 0.1
     5Tested up to: 3.1.1
     6Stable tag: 0.2
    77
    88
     
    1717
    1818== Changelog ==
     19= 0.2 =
     20- currency code can appear now in the selector drop-down
     21- submit button can be switched on and off
    1922= 0.1 =
    2023- fork the wp-e-commerce-multi-currency-magic plugin
  • e-commerce-multi-currency-support/trunk/widgets/currency_chooser_widget.php

    r490337 r490468  
    2828        $output .='<select name="currency_option" style="width:200px;">';
    2929            foreach($countries as $country){
     30                $country_code = '';
     31                if ($instance['show_code'] == 1) $country_code =" (".$country['code'].")";
    3032                if($_SESSION['wpsc_currency_code'] == $country['id']){
    31                     $output .="<option selected='selected' value=".$country['id'].">".$country['country']."</option>";
     33                    $output .="<option selected='selected' value=".$country['id'].">".$country['country'].$country_code."</option>";
    3234                }else{
    33                     $output .="<option value=".$country['id'].">".$country['country']."</option>";
     35                    $output .="<option value=".$country['id'].">".$country['country'].$country_code."</option>";
    3436                }
    3537            }
    3638        $output .="</select><br />";
    3739        $output .='<input type="hidden" value="change_currency_country" class="button-primary" name="wpsc_admin_action" />';
    38         /*
     40
    3941        if($instance['show_reset'] == 1){
    4042            $output .='<input type="submit" value="'.__('Reset Price to ','wpsc').$_SESSION['wpsc_base_currency_code'].'"  name="reset" />';
    4143        }
    42         $output .='<input type="submit" value="'.__('Convert','wpsc').'" class="button-primary" name="submit" />';
    43         */
     44        if($instance['show_submit'] == 1){
     45            $output .='<input type="submit" value="'.__('Convert','wpsc').'" class="button-primary" name="submit" />';
     46        }
    4447        $output .='</form>';
    4548        if($instance['show_conversion'] == 1){
     
    6669        $instance['show_conversion'] = $new_instance['show_conversion'];
    6770        $instance['show_reset'] = $new_instance['show_reset'];
     71        $instance['show_submit'] = $new_instance['show_submit'];
     72        $instance['show_code'] = $new_instance['show_code'];
    6873
    6974        return $instance;
     
    7580        $show_conversion =$instance['show_conversion'];
    7681        $show_reset =$instance['show_reset'];
     82        $show_submit =$instance['show_submit'];
     83        $show_code =$instance['show_code'];
     84        if ($show_code == 1) {
     85            $show_code_check = 'checked="checked"';
     86        }else{
     87            $show_code_check = '';
     88        }
     89
    7790        if($show_conversion == 1){
    7891            $checked = 'checked="checked"';
     
    8598            $show_reset_check = '';
    8699        }
     100        if($show_submit == 1){
     101            $show_submit_check = 'checked="checked"';
     102        }else{
     103            $show_submit_check = '';
     104        }
    87105        ?>
    88106        <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" /></label></p>
    89107        <p><label for="<?php echo $this->get_field_id('show_conversion'); ?>"><?php _e('Show Conversion Rate:'); ?> <input  id="<?php echo $this->get_field_id('show_conversion'); ?>" name="<?php echo $this->get_field_name('show_conversion'); ?>" type="checkbox" value="1" <?php echo $checked; ?> /></label></p>
     108        <p><label for="<?php echo $this->get_field_id('show_code'); ?>"><?php _e('Show currency code:'); ?> <input  id="<?php echo $this->get_field_id('show_code'); ?>" name="<?php echo $this->get_field_name('show_code'); ?>" type="checkbox" value="1" <?php echo $show_code_check; ?> /></label></p>
    90109        <p><label for="<?php echo $this->get_field_id('show_reset'); ?>"><?php _e('Show Reset Button:'); ?> <input  id="<?php echo $this->get_field_id('show_reset'); ?>" name="<?php echo $this->get_field_name('show_reset'); ?>" type="checkbox" value="1" <?php echo $show_reset_check; ?> /></label></p>
    91         <?php
     110        <p><label for="<?php echo $this->get_field_id('show_submit'); ?>"><?php _e('Show Submit Button:'); ?> <input  id="<?php echo $this->get_field_id('show_submit'); ?>" name="<?php echo $this->get_field_name('show_submit'); ?>" type="checkbox" value="1" <?php echo $show_submit_check; ?> /></label></p>
     111        <?php
    92112   
    93113    }
  • e-commerce-multi-currency-support/trunk/wpsc-currency-changer.php

    r490337 r490468  
    44Plugin URI: http://misha.beshkin.lv
    55Description: A plugin that provides a currency converter tool integrated into the WordPress Shopping Cart. This is trunk from wp-e-commerce-multi-currency-magic plugin.
    6 Version: 0.1
     6Version: 0.2
    77Author: Misha Beshkin
    88Author URI: http://misha.beshkin.lv
Note: See TracChangeset for help on using the changeset viewer.