get_product_detail_view($product_id) : []); $user_id = get_current_user_id(); $is_fav = $shop && $user_id > 0 ? $shop->is_favorite($user_id, $product_id) : false; $options = $product['options'] ?? []; $has_options = !empty($options); $price_range = $product['price_range'] ?? []; $params = $product['params'] ?? []; $services = $product['services'] ?? []; $pay_modo = $product['pay_modo'] ?? '0'; $scores = class_exists('\AKSRT\Shop\ProductReview') ? \AKSRT\Shop\ProductReview::get_instance()->get_product_scores($product_id) : []; $reviews = class_exists('\AKSRT\Shop\ProductReview') ? \AKSRT\Shop\ProductReview::get_instance()->get_reviews($product_id, ['per_page' => 5]) : ['items' => [], 'total' => 0]; $author_id = (int) get_post_field('post_author', $product_id); $author = $author_id > 0 ? get_userdata($author_id) : null; ?>

-

$group) : ?>
0 ? '¥' . esc_html(number_format($ship_fee, 2)) : esc_html__('包邮', 'aksrt'); ?>
display_name); ?>

'aksrt_product', 'posts_per_page' => 6, 'post_status' => 'publish', 'post__not_in' => [$product_id], 'ignore_sticky_posts' => true, 'no_found_rows' => true, 'update_post_meta_cache' => false, 'update_post_term_cache' => false, 'tax_query' => !empty($product['categories']) ? [[ 'taxonomy' => 'aksrt_product_cat', 'field' => 'term_id', 'terms' => wp_list_pluck($product['categories'], 'term_id'), ]] : [], 'orderby' => 'rand', ]); while ($related_q->have_posts()) { $related_q->the_post(); $card = $shop->build_product_card_view((int) get_the_ID()); if (!empty($card['id'])) { $related_items[] = $card; } } wp_reset_postdata(); } ?>