Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hey if anyone is actually maintaining this plugin then throw an update with
    following code in cryptocurrency-prices/includes/currencyall.class.php
    basically added document ready function

    
    <script type="text/javascript">
    jQuery(document).ready(funcction(){
        //get list of currencies
    
        var toCurrency = \''.$base_currency.'\';
    
        var apiUrl = \'https://api.coinmarketcap.com/v1/ticker/?convert=\'+\''.$base_currency.'\'+\'&limit='.$limit.'\';
    
        console.log(apiUrl);
    
        jQuery.get( apiUrl, function( data ) {
    
          //prepare dataset for datatable
    
          var dataSet = [];
    
          for (var currentCurrency in data){
    
            //console.log(data[currentCurrency]);
    
            var name = data[currentCurrency].name;
    
            var rank = data[currentCurrency].rank;
    
            var price_number = data[currentCurrency][\'price_'.mb_strtolower($base_currency).'\'];
    
            //var price = price_number.toLocaleString('.$locale.')+\' \'+toCurrency;
    
            var price = price_number.toLocaleString('.$locale.');
    
            var supply = parseInt(data[currentCurrency].available_supply).toLocaleString('.$locale.');
    
            var volume = parseInt(data[currentCurrency][\'24h_volume_'.mb_strtolower($base_currency).'\']+\' \').toLocaleString('.$locale.');
    
            if (data[currentCurrency].percent_change_24h > 0){
    
              var changeClass = "change-inc";
    
            } else {
    
              var changeClass = "change-dec";
    
            }
    
            var change = "<span class=\""+changeClass+"\">"+data[currentCurrency].percent_change_24h+\'%\'+"</span>";
    
            var marketCap = parseInt(data[currentCurrency][\'market_cap_'.mb_strtolower($base_currency).'\']).toLocaleString('.$locale.');
    
            var image = "<img class=\"lazy\" data-src=\"'.CP_URL.'images/coins32x32/"+data[currentCurrency].symbol.toLowerCase()+".png\" style=\"max-width:20px;\" />";
    
            
    
            dataSet.push([rank, image+\' \'+name, marketCap, price, volume, supply, change]);
    
          }
    
          
    
          //show datatable
    
          jQuery(".cp-cryptocurrencies-table").DataTable({
    
            data: dataSet,
    
            columns: [{ title: "#" },{ title: "Coin" }, { title: "Market Cap, '.$base_currency.'" }, { title: "Price, '.$base_currency.'" }, { title: "Volume (24h), '.$base_currency.'" }, { title: "Circulating supply" }, { title: "Change (24h)" }, ],
    
            "order": [ [0, \'asc\'] ],
    
            "pageLength": '.$perpage.',
    
            "lengthMenu": [ [10, 50, 100, 500, 1000, -1], [10, 50, 100, 500, 1000, "All"] ],
    
            drawCallback: function() {
    
              var lazy = jQuery(".cp-cryptocurrencies-table img").Lazy({
    
                chainable: false,
    
                defaultImage: \'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAopSURBVHjajFddjF1VFf723ufcc+7/3JnpzHTKtNPSmlJpMURBIKIi8UGCLwIvmqiB+GBMjH8xRBJ9wRgTY3gw8UF8UF+MCUaJidEEDYlgJQiU0pZC6XRK53/m/t9zzzn7nO2395kWNMUwk5177/lZ69trfetba4sLf/omij8B5AlEvASVr0H5VUAPoGQEo7uQlSD0GvN3etXmJ2VYPaHK8oBQommQSWSil6dqLY+Gr6bt7nNpt/esEOkGShVkSQ6TC2RpChMsQicaUBP0lzuvHv7Pn8kyGIWZYO7QI+H83BdUs3yT9DNIL+XdESH3+RAdiDJ/l2/O89q9Ydr6hh6K9WR943dxu/czkw3OQfjv6eP6AEzh3G81H6ndOPUDv5ntU16HF9tIBgoRv8b9MXQ04kYyqDBFqZYinIgQNiSCCTHr18pfC6KpL40urj4RrXcehzHR+wNgBDela9XFiZ9X9mWfV/7bLlrtCwrbFzJEPaYKCkJmjEBikbrsmZwPSUkgAq39HiYXI5TK2zX1gcb3/NbEPZ0zb3yZwXr9OgDENQ4YLoF0qnlk5qnqbOduJTsYrCtcOpli1BY0HiCoB1CBB6EIwmgHGKJEjCWHJY00Vv49xMYZg/lbAoLZQGU6uEPecvCvO+fi+3UsXxHqHQASzogudpIlYfOA/G11T/duhR2sn9E4/fs+om2NcoMAKoLk5EuCOdK5I1ieZMxCbg3B8/hMWTINiiYNLvy9j8snI0fm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ifxmVUg+63edAovHm2uK5Nzq3f8VjhxX51ZOReEdePSbkcnzbF+UVUzk6/fJnVJxyNxFmFiYxmqqjv8by6YzdJCyMudYjrnZlq3B+w0dzNkS1SfkdbSAleQW14eLm4oXXtu/8rCh52wLZ9Q8mtqaVJ0dL49sejFbLvzra/NfnKqUhUzBGEAYI52vQ8yEl1BKUpZruRsAXTjdKVXZQe2wbbyFbYwnSkWaHfbNz4tSF/q0PSCHekO9yft2TEUWYDSwbraTHH+y35757MPjno7PBckON2S92Bu5AEpR8lDm0IJTFSwynleV8I0ViRYqnppyC1I5n8dbotie3syPfgRjyaJO+z7OhFVKR8jA3+6PTo/v+8HZ86dtz6uxDk+pKLUjIhdHYUV/s9qbdIw4VRyIRIbr5PrOaHP3Llj78Y3jVZ9jynby//8PpNZvkqTRn29nBh3f0/scD0b2/Lrc+XRWbx0P0Z5SJAztJUzN1ktd2RnrqfC+beSYyrT9yCy9K5t6zfcG8t4//CDAAECtyy+agUVkAAAAASUVORK5CYII=\'                            
    
              });
    
              lazy.update(); 
    
            },
    
            responsive: true,
    
          });
    
        } );
    });
        </script>
    
    Thread Starter Nick12123

    (@nick12123)

    Thanks Steve i found the solution, kinda unprofessional but it is working.

    <?php
    
    $customer_orders = get_posts( apply_filters( 'woocommerce_my_account_my_orders_query', array(
    	'numberposts' => $order_count,
    	'meta_key'    => '_customer_user',
    	'meta_value'  => get_current_user_id(),
    	'post_type'   => wc_get_order_types( 'view-orders' ),
    	'post_status' => array_keys( wc_get_order_statuses() )
    ) ) );
    
    if ( $customer_orders ) : ?>
    
    	<table class="shop_table shop_table_responsive my_account_orders">
    
    		<tbody>
    			<?php foreach ( $customer_orders as $customer_order ) :
    				$order      = wc_get_order( $customer_order );
    				$item_count = $order->get_item_count();
    				?>
    				<tr class="order">
    						<?php 
    						$status      = new WC_Order_Status_Manager_Order_Status( $order->get_status() );
    		$name        = $status->get_name();
    		$comparename = 'Reviewing'; 
    		$Shipping = 'Shipping';
    							if ($name   == $comparename) {
    								echo wc_get_order_status_name( $order->get_status() );
    							}
    							if ($name   == $Shipping) {
    								echo wc_get_order_status_name( $order->get_status() );
    							}
    						 ?>
    				</tr>
    			<?php endforeach; ?>
    		</tbody>
    	</table>
    <?php endif; ?>
    Thread Starter Nick12123

    (@nick12123)

    my test website testech.tk/ … on my index page categories are shown on a post image but if I choose albums, pop, artist in a post then albums, pop, artist will be shown on that post … but I want to show pop instead of albums, pop, artist.

    Thread Starter Nick12123

    (@nick12123)

    thanks johann

    Thread Starter Nick12123

    (@nick12123)

    hey thanks for the reply but after playing with code i got the grid but it looks unstyled

    here’s the pic: https://drive.google.com/open?id=0B15-Fek9IBEpNTU4RlM1dXhtTFk&authuser=0

    here’s the new code :-

    <?php
    get_header();
    
    ?>
    
    <div class="container">
    	<?php
    		$category_ID = get_category_id('blog');
    		$args = array(
    			 'post_type' => 'post',
    			 'posts_per_page' => 5,
    			 'post__not_in' => $slider_arr,
    			 'cat' => '-' . $category_ID
    			 );
    		query_posts($args);
    		$x = 0;
    		while (have_posts()) : the_post(); ?>
    		<div class="container">
    	 <div class=" home_box">
            <div class="col m5">
              <div class="card">
                <div class="card-image">
                   <?php if ( has_post_thumbnail() ) {
      the_post_thumbnail("medium");
    }?>
                  <span class="card-title"><a href="<?php the_permalink(); ?>" class="white-text"> <?php the_title(); ?> </a></span>
                </div>
                <div class="card-content">
                  <p><?php the_content(); ?></p>
                </div>
                <div class="card-action">
                  <a href="<?php the_permalink(); ?> " class="button">Read More...</a>
                </div>
              </div>
            </div>
          </div>
     </div>
    </div>
    
    	<?php endwhile;
    
    	get_footer();
    ?>

    here’s the new css :-

    .home_box { display: block;
    	float: left;
    	overflow: hidden;
    	padding: 18px 10px;
    	-webkit-perspective: 500;
    	-moz-perspective: 500;
    	-ms-perspective: 500;
    	perspective: 500;
    	}

    iso far i tried to play with margines but i cant make the 1st box work

Viewing 5 replies - 1 through 5 (of 5 total)