WordPress.org

Forums

WooCommerce - excelling eCommerce
Total_sale, highest amount (1 post)

  1. Webplus
    Member
    Posted 1 year ago #

    Been trying to get the informations from total_sale, with the highest amount for ages now. and i haven't been able to get anything. Thought that i could do something along this way

    global $product, $woocommerce_loop, $post;

    $args = array('post_type' => 'product',
    'orderby' => 'total_sales',
    'order' => 'asc',
    'limit' => '1');

    $loop = new WP_Query( $args );
    foreach( $loop as $pooosts) : ?>

    <div class="pFocus">
    <div class="focus-inner">
    <?php
    **add code with highest_amounthere ****
    ?>
    </div>
    </div>
    <?php endforeach; ?>

    But that does absolute not help me anything. I hope there is someone out there that can help me get this.. SO i can write the correct thing out with the highest amount.

    What i want it to write out, is picture, price sale price.. and such stuff.. and the link to the page.. I might be going in the wrong direction.. Please help me!

    PS the site is not up yet

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce - excelling eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.