Changeset 490468
- Timestamp:
- 01/16/2012 05:35:04 AM (14 years ago)
- Location:
- e-commerce-multi-currency-support
- Files:
-
- 6 edited
- 6 copied
-
tags/0.2 (copied) (copied from e-commerce-multi-currency-support/trunk)
-
tags/0.2/js-css (copied) (copied from e-commerce-multi-currency-support/trunk/js-css)
-
tags/0.2/js-css/currency.js (modified) (1 diff)
-
tags/0.2/license.txt (copied) (copied from e-commerce-multi-currency-support/trunk/license.txt)
-
tags/0.2/readme.txt (copied) (copied from e-commerce-multi-currency-support/trunk/readme.txt) (2 diffs)
-
tags/0.2/widgets (copied) (copied from e-commerce-multi-currency-support/trunk/widgets)
-
tags/0.2/widgets/currency_chooser_widget.php (modified) (4 diffs)
-
tags/0.2/wpsc-currency-changer.php (copied) (copied from e-commerce-multi-currency-support/trunk/wpsc-currency-changer.php) (1 diff)
-
trunk/js-css/currency.js (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/widgets/currency_chooser_widget.php (modified) (4 diffs)
-
trunk/wpsc-currency-changer.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
e-commerce-multi-currency-support/tags/0.2/js-css/currency.js
r490337 r490468 5 5 $j(function () { 6 6 $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 9 10 }); 10 //$j("#checkout_total").html('test'); 11 11 12 }); 12 13 -
e-commerce-multi-currency-support/tags/0.2/readme.txt
r490337 r490468 3 3 Tags: e-commerce, shop, cart, featured product,featured,sticky product, ecommerce, currency 4 4 Requires at least: 2.9 5 Tested up to: 2.96 Stable tag: 0. 15 Tested up to: 3.1.1 6 Stable tag: 0.2 7 7 8 8 … … 17 17 18 18 == Changelog == 19 = 0.2 = 20 - currency code can appear now in the selector drop-down 21 - submit button can be switched on and off 19 22 = 0.1 = 20 23 - fork the wp-e-commerce-multi-currency-magic plugin -
e-commerce-multi-currency-support/tags/0.2/widgets/currency_chooser_widget.php
r490337 r490468 28 28 $output .='<select name="currency_option" style="width:200px;">'; 29 29 foreach($countries as $country){ 30 $country_code = ''; 31 if ($instance['show_code'] == 1) $country_code =" (".$country['code'].")"; 30 32 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>"; 32 34 }else{ 33 $output .="<option value=".$country['id'].">".$country['country']. "</option>";35 $output .="<option value=".$country['id'].">".$country['country'].$country_code."</option>"; 34 36 } 35 37 } 36 38 $output .="</select><br />"; 37 39 $output .='<input type="hidden" value="change_currency_country" class="button-primary" name="wpsc_admin_action" />'; 38 /* 40 39 41 if($instance['show_reset'] == 1){ 40 42 $output .='<input type="submit" value="'.__('Reset Price to ','wpsc').$_SESSION['wpsc_base_currency_code'].'" name="reset" />'; 41 43 } 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 } 44 47 $output .='</form>'; 45 48 if($instance['show_conversion'] == 1){ … … 66 69 $instance['show_conversion'] = $new_instance['show_conversion']; 67 70 $instance['show_reset'] = $new_instance['show_reset']; 71 $instance['show_submit'] = $new_instance['show_submit']; 72 $instance['show_code'] = $new_instance['show_code']; 68 73 69 74 return $instance; … … 75 80 $show_conversion =$instance['show_conversion']; 76 81 $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 77 90 if($show_conversion == 1){ 78 91 $checked = 'checked="checked"'; … … 85 98 $show_reset_check = ''; 86 99 } 100 if($show_submit == 1){ 101 $show_submit_check = 'checked="checked"'; 102 }else{ 103 $show_submit_check = ''; 104 } 87 105 ?> 88 106 <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> 89 107 <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> 90 109 <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 92 112 93 113 } -
e-commerce-multi-currency-support/tags/0.2/wpsc-currency-changer.php
r490337 r490468 4 4 Plugin URI: http://misha.beshkin.lv 5 5 Description: 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. 16 Version: 0.2 7 7 Author: Misha Beshkin 8 8 Author URI: http://misha.beshkin.lv -
e-commerce-multi-currency-support/trunk/js-css/currency.js
r490337 r490468 5 5 $j(function () { 6 6 $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 9 10 }); 10 //$j("#checkout_total").html('test'); 11 11 12 }); 12 13 -
e-commerce-multi-currency-support/trunk/readme.txt
r490337 r490468 3 3 Tags: e-commerce, shop, cart, featured product,featured,sticky product, ecommerce, currency 4 4 Requires at least: 2.9 5 Tested up to: 2.96 Stable tag: 0. 15 Tested up to: 3.1.1 6 Stable tag: 0.2 7 7 8 8 … … 17 17 18 18 == Changelog == 19 = 0.2 = 20 - currency code can appear now in the selector drop-down 21 - submit button can be switched on and off 19 22 = 0.1 = 20 23 - fork the wp-e-commerce-multi-currency-magic plugin -
e-commerce-multi-currency-support/trunk/widgets/currency_chooser_widget.php
r490337 r490468 28 28 $output .='<select name="currency_option" style="width:200px;">'; 29 29 foreach($countries as $country){ 30 $country_code = ''; 31 if ($instance['show_code'] == 1) $country_code =" (".$country['code'].")"; 30 32 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>"; 32 34 }else{ 33 $output .="<option value=".$country['id'].">".$country['country']. "</option>";35 $output .="<option value=".$country['id'].">".$country['country'].$country_code."</option>"; 34 36 } 35 37 } 36 38 $output .="</select><br />"; 37 39 $output .='<input type="hidden" value="change_currency_country" class="button-primary" name="wpsc_admin_action" />'; 38 /* 40 39 41 if($instance['show_reset'] == 1){ 40 42 $output .='<input type="submit" value="'.__('Reset Price to ','wpsc').$_SESSION['wpsc_base_currency_code'].'" name="reset" />'; 41 43 } 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 } 44 47 $output .='</form>'; 45 48 if($instance['show_conversion'] == 1){ … … 66 69 $instance['show_conversion'] = $new_instance['show_conversion']; 67 70 $instance['show_reset'] = $new_instance['show_reset']; 71 $instance['show_submit'] = $new_instance['show_submit']; 72 $instance['show_code'] = $new_instance['show_code']; 68 73 69 74 return $instance; … … 75 80 $show_conversion =$instance['show_conversion']; 76 81 $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 77 90 if($show_conversion == 1){ 78 91 $checked = 'checked="checked"'; … … 85 98 $show_reset_check = ''; 86 99 } 100 if($show_submit == 1){ 101 $show_submit_check = 'checked="checked"'; 102 }else{ 103 $show_submit_check = ''; 104 } 87 105 ?> 88 106 <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> 89 107 <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> 90 109 <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 92 112 93 113 } -
e-commerce-multi-currency-support/trunk/wpsc-currency-changer.php
r490337 r490468 4 4 Plugin URI: http://misha.beshkin.lv 5 5 Description: 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. 16 Version: 0.2 7 7 Author: Misha Beshkin 8 8 Author URI: http://misha.beshkin.lv
Note: See TracChangeset
for help on using the changeset viewer.