WordPress.org

Ready to get started?Download WordPress

Forums

WP e-Commerce
[resolved] My Currency doesn't show up (8 posts)

  1. moziq
    Member
    Posted 1 year ago #

    Hey Bro, does anyone know why my currency doesn't shown in my theme?
    When I change the currency into Indonesian, why the currecy symbol (IDR) doesn't shown?

    http://wordpress.org/extend/plugins/wp-e-commerce/

  2. Justin Sainton
    Member
    Plugin Author

    Posted 1 year ago #

    It should be showing - the database has that value for the currency symbol. Possibly a theme or plugin filtering the value?

  3. moziq
    Member
    Posted 1 year ago #

    Hey it's on database, Thank's bro.

    But I have another question, is it possible to remove "decimal separator" behind the price?? If it's possible how can I do that?

  4. Justin Sainton
    Member
    Plugin Author

    Posted 1 year ago #

    Definitely.

    You could write a quick plugin to do it, or in a pinch, just add the following to your theme's functions.php if you're not a dev.

    function moz_kill_decimals( $args ) {
    
         $args['display_decimal_point'] = false;
    
         return $args;
    }
    
    add_filter( 'wpsc_toggle_display_currency_code', 'moz_kill_decimals' );
  5. moziq
    Member
    Posted 1 year ago #

    Hey it's work to, but it's only remove "decimal price" on wp-ecommerce, in my theme the decimal still show up.

    But your way guide me into another decimal sets for the theme, and I found this still on Function.php:

    function boutique_price(){
    	global $post, $boutique_active_plugin_name, $wpdb;
    	$price = 0;
    	switch ($boutique_active_plugin_name){
    ...
    ...
    ...
    ...
    		case 'wp_ecommerce':
    			$price = get_post_meta( $post->ID, '_wpsc_special_price', true ) ? get_post_meta( $post->ID, '_wpsc_special_price', true ) : get_post_meta( $post->ID, '_wpsc_price', true );
    			$price = apply_filters( 'et_wp_ecommerce_price_format', number_format( $price, 0 ), $price );
    		break;
    	}
    	return $price;
    }

    sets the value on

    number_format( $price, 0 ), $price );

    from "2" to "0"

    Thank Bro..

  6. Justin Sainton
    Member
    Plugin Author

    Posted 1 year ago #

    Glad that works for you - alternatively, this single line should work as well.

    add_filter( 'wpsc_modify_decimals' , '__return_zero' );

  7. strang3r
    Member
    Posted 1 year ago #

    what should you change for replacing comma with decimal?. in botIque theme?. Because if you change it from the plugin it doesnt work.

  8. daveedgar
    Member
    Posted 1 year ago #

    Could anyone help me with this?

    I need to hide the price on my wp-e commerce products so u can use it to have customers get a quote instead of buying an item. i think this is the string of code here i need to edit but not sure what to put to hide the price.

    $price = get_post_meta( $product_id, '_wpsc_price', true );

    Thanks in advance

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic