'ids',
'limit' => get_theme_mod('adventeqa_latest_item_num', '9'),
);
$adventeqa_products_products = wc_get_products( $adventeqa_products_args );
if( !empty($adventeqa_products_products) ):
foreach( $adventeqa_products_products as $i ) :
$adventeqa_products_product = wc_get_product( $i );
$adventeqa_products_product_id = $i;
$adventeqa_products_product_orig_price = "";
$adventeqa_products_product_sale_price = "";
$adventeqa_products_product_on_sale = false;
$adventeqa_products_product_currency = "";
$adventeqa_products_product_type = "";
$adventeqa_products_product_name = "";
$adventeqa_products_product_desc = "";
$adventeqa_products_product_sale_amount = (int)0;
$adventeqa_products_product_variations = "";
$adventeqa_products_product_variation_name = "";
$adventeqa_products_product_variation_value = array();
$adventeqa_products_product_has_variations = "no";
$adventeqa_products_product_variation_array = array();
$adventeqa_products_product_orig_price = $adventeqa_products_product->get_regular_price();
$adventeqa_products_product_sale_price = $adventeqa_products_product->get_sale_price();
$adventeqa_products_product_on_sale = $adventeqa_products_product->is_on_sale();
$adventeqa_products_product_currency = get_woocommerce_currency_symbol();
$adventeqa_products_product_type = $adventeqa_products_product->get_type();
$adventeqa_products_product_image = wp_get_attachment_image_src( $adventeqa_products_product->get_image_id(), 'full' );
$adventeqa_products_product_name = $adventeqa_products_product->get_name();
$adventeqa_products_product_desc = $adventeqa_products_product->get_short_description();
if( $adventeqa_products_product->is_type( 'variable' ) ){
$adventeqa_products_product_has_variations = "yes";
$adventeqa_products_product_variations = $adventeqa_products_product->get_available_variations();
foreach( $adventeqa_products_product_variations as $i ){
$adventeqa_products_product_variation_array[$i["variation_id"]] = array();
foreach( $i["attributes"] as $key => $value){
$adventeqa_products_product_variation_name = str_replace('attribute_','',$key);
$adventeqa_products_product_variation_value[] = $value;
$adventeqa_products_product_variation_array[$i["variation_id"]]['value'] = $value;
}
//$adventeqa_products_product_variation_id[] = $i["variation_id"];
$adventeqa_products_product_variation_array[$i["variation_id"]]["display_price"] = $i["display_price"];
$adventeqa_products_product_variation_array[$i["variation_id"]]["display_regular_price"] = $i["display_regular_price"];
}
}
if( "" != $adventeqa_products_product_sale_price ){
$adventeqa_products_product_sale_amount = ( ( floor($adventeqa_products_product_orig_price * 100) - floor($adventeqa_products_product_sale_price * 100) ) / 100 );
}
?>