Plugin Directory

Changeset 2839370


Ignore:
Timestamp:
12/26/2022 01:46:52 PM (2 years ago)
Author:
sebastopolys
Message:

Support for float ints

Location:
maldita-inflacion
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • maldita-inflacion/tags/1.0.0/readme.txt

    r2818251 r2839370  
    6262* Error de WP API se muestra en pantalla
    6363
     64=1.0.2=
     65* Valor TDC con decimales en paginas de edicion de producto
    6466
    6567
  • maldita-inflacion/tags/1.0.0/src/backend/malinf-malinfAdminpage.php

    r2809228 r2839370  
    2121        $hd = '<div id="malinf-bk" class="wrap">
    2222        <h1>Maldita inflacion</h1>
    23         <h2>Convierte los precios automaticamente a valor dolar blue</h2>';
     23        <h2>Convierte los precios automaticamente a valor dolar blue/oficial o manualmente</h2>';
    2424        return  $hd;
    2525    }
  • maldita-inflacion/tags/1.0.0/src/backend/malinfWelcomePage.html

    r2809334 r2839370  
    9595
    9696<p>
    97   &bull; <em><a href="https://wordpress.org/support/plugin/maldita-inflacion/">Abre un ticket de soporte</a> </em>
     97  &bull; <em><a href="https://wordpress.org/support/plugin/maldita-inflacion/" target="_blank">Abre un ticket de soporte</a> </em>
    9898</p>
    9999<p>
    100   &bull;<em>Este plugin ha sido desarrollado sin ninguna retribucion. Si puedes contribuir con una <a href="https://paypal.me/sebastopolys/" target="_blank">donacion paypal aqui </a> sera de gran ayuda</em>
     100  &bull; <em><a href="https://digitalek.com/contacto/" target="_blank">Contacta al autor de este plugin: </a> </em>
     101</p>
     102<p>
     103  &bull;<em><a href="https://paypal.me/sebastopolys/" target="_blank">Aporta al desarrollo del plugin con una donacion</a></em>
    101104</p>
    102105
  • maldita-inflacion/tags/1.0.0/src/prices/malinf-malinfHookprice.php

    r2809228 r2839370  
    5959            // mode           
    6060            if($b =='api'){
    61                 $dummy = intval($meta)*$val;
     61                $dummy = $meta*$val;
    6262            }
    6363            if($b =='manual'){
    64                 $dummy = intval($meta)*intval($bak->manual);
     64                $dummy = $meta*$bak->manual;
    6565            }
    6666            if($b =='disabled'||null==$b) return;   
  • maldita-inflacion/tags/1.0.0/src/prices/malinf-malinfMetaprice.php

    r2809228 r2839370  
    1919            'value'             => get_post_meta( get_the_ID(), 'malinf_meta', true ),
    2020            'label'             => 'Valor TDC',
    21             'description'       => 'Precio expresado en unidades del tipo de cambio'
     21            'type'              => 'number',
     22            'desc_tip'          => 'true',
     23            'description'       => 'Precio expresado en unidades del tipo de cambio',
     24            'custom_attributes' => array(
     25                'step'  => 'any',
     26                'min'   => '0'
     27            )
    2228        ) );
    2329    $ot.= '</div>';
     
    2733    public function savemeta( $id, $post ){
    2834       if( !empty( sanitize_key($_POST['malinf_meta']) ) ) {
    29             if(update_post_meta( $id, 'malinf_meta', sanitize_key($_POST['malinf_meta'] )));
    30         } else {
    31             if(delete_post_meta( $id, 'malinf_meta' ));
    32         }     
     35            if ( is_string( $_POST['malinf_meta'] ) )
     36                //$_POST=str_replace(',','.',$_POST);
     37                $valTDC = floatval($_POST['malinf_meta']);
     38                update_post_meta( $id, 'malinf_meta', $valTDC );
     39        }
     40        else {
     41            delete_post_meta( $id, 'malinf_meta' );
     42        }   
    3343    }
    3444}
  • maldita-inflacion/trunk/malinfConfig.php

    r2809228 r2839370  
    2323        }
    2424    }
    25 
    26 
    27    
     25       
    2826    public static function plname(){
    2927        self::$plname = 'Maldita Inflacion';       
  • maldita-inflacion/trunk/readme.txt

    r2818251 r2839370  
    6262* Error de WP API se muestra en pantalla
    6363
     64=1.0.2=
     65* Valor TDC con decimales en paginas de edicion de producto
    6466
     67
  • maldita-inflacion/trunk/src/backend/malinf-malinfAdminpage.php

    r2809228 r2839370  
    2121        $hd = '<div id="malinf-bk" class="wrap">
    2222        <h1>Maldita inflacion</h1>
    23         <h2>Convierte los precios automaticamente a valor dolar blue</h2>';
     23        <h2>Convierte los precios automaticamente a valor dolar blue/oficial o manualmente</h2>';
    2424        return  $hd;
    2525    }
  • maldita-inflacion/trunk/src/prices/malinf-malinfHookprice.php

    r2809228 r2839370  
    5959            // mode           
    6060            if($b =='api'){
    61                 $dummy = intval($meta)*$val;
     61                $dummy = $meta*$val;
    6262            }
    6363            if($b =='manual'){
    64                 $dummy = intval($meta)*intval($bak->manual);
     64                $dummy = $meta*$bak->manual;
    6565            }
    6666            if($b =='disabled'||null==$b) return;   
  • maldita-inflacion/trunk/src/prices/malinf-malinfMetaprice.php

    r2809228 r2839370  
    1919            'value'             => get_post_meta( get_the_ID(), 'malinf_meta', true ),
    2020            'label'             => 'Valor TDC',
    21             'description'       => 'Precio expresado en unidades del tipo de cambio'
     21            'type'              => 'number',
     22            'desc_tip'          => 'true',
     23            'description'       => 'Precio expresado en unidades del tipo de cambio',
     24            'custom_attributes' => array(
     25                'step'  => 'any',
     26                'min'   => '0'
     27            )
    2228        ) );
    2329    $ot.= '</div>';
     
    2733    public function savemeta( $id, $post ){
    2834       if( !empty( sanitize_key($_POST['malinf_meta']) ) ) {
    29             if(update_post_meta( $id, 'malinf_meta', sanitize_key($_POST['malinf_meta'] )));
    30         } else {
    31             if(delete_post_meta( $id, 'malinf_meta' ));
    32         }     
     35            if ( is_string( $_POST['malinf_meta'] ) )
     36                //$_POST=str_replace(',','.',$_POST);
     37                $valTDC = floatval($_POST['malinf_meta']);
     38                update_post_meta( $id, 'malinf_meta', $valTDC );
     39        }
     40        else {
     41            delete_post_meta( $id, 'malinf_meta' );
     42        }   
    3343    }
    3444}
Note: See TracChangeset for help on using the changeset viewer.