/home/ejrndhmu/.trash/wp-content/themes/instaorder/template-parts/productbox-shop.php
<?php
/**
 * Template part for displaying a product box feed
 *
 * @package InstaOrder
 * @author Taufik Hidayat (taufik@fiqhidayat.com);
 */

$thumb = get_the_post_thumbnail_url(get_the_ID());
$regular_price = intval(get_post_meta(get_the_ID(), 'product_price', true));
$promo = get_post_meta(get_the_ID(), 'product_promo', true);
$promo_price = intval(get_post_meta(get_the_ID(), 'product_promo_price', true));
if( $promo == 'on' ){
	$prices = sprintf(
		'<span class="price">Rp %s</span> <span class="price_slik">Rp %s</span>',
		number_format($promo_price,0,',','.'),
		number_format($regular_price,0,',','.')
	);
}else{
	$prices = sprintf(
		'<span class="price">Rp %s</span>',
		number_format($regular_price,0,',','.')
	);
}
?>

<article class="productbox-shop productbox">
    <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
        <div class="content">
            <div class="thumb product-image">
                <img class="lazy" data-src="<?php echo $thumb; ?>" alt="<?php echo get_the_title(); ?>">
            </div>
            <div class="title">
                <h3><?php echo get_the_title(); ?></h3>
                <div class="cart-icon">
    				<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" width="16px" height="16px"><path fill="#444" d="M352 160v-32C352 57.42 294.579 0 224 0 153.42 0 96 57.42 96 128v32H0v272c0 44.183 35.817 80 80 80h288c44.183 0 80-35.817 80-80V160h-96zm-192-32c0-35.29 28.71-64 64-64s64 28.71 64 64v32H160v-32zm160 120c-13.255 0-24-10.745-24-24s10.745-24 24-24 24 10.745 24 24-10.745 24-24 24zm-192 0c-13.255 0-24-10.745-24-24s10.745-24 24-24 24 10.745 24 24-10.745 24-24 24z"></path></svg>
    			</div>
            </div>
            <div class="pricing">
                <?php echo $prices; ?>
            </div>
        </div>
    </a>
</article>