storeSettings = new StoreSettings(); $this->cartItems = $cartItems; $this->cartItems = Helper::loadBundleChild($this->cartItems, ['*']); } public function render() { ?>

renderItems(); ?> renderTotal(); ?>
renderCheckoutButton(); ?>
0, 'post_id' => 0, 'fulfillment_type' => '', 'other_info' => [ 'payment_type' => '', ], 'quantity' => 0, 'price' => 0, 'unit_price' => 0, 'line_total' => 0, 'subtotal' => 0, 'line_total_formatted' => '$0', 'object_id' => 0, 'title' => '', 'post_title' => '', 'coupon_discount' => 0, 'cost' => 0, 'featured_media' => '', 'view_url' => '', 'variation_type' => '', 'shipping_charge' => 0, 'itemwise_shipping_charge' => 0, ] ]; $this->renderList($dummy); } public function renderList($items = []) { $items = empty($items) ? $this->cartItems : $items; ?>
renderEmpty(); ?>
currentCartItem, 'title', ''); ?>
  • renderImage(); ?> renderDetails(); ?>
    renderSummary(); ?>
  • currentCartItem, 'featured_media'); $title = Arr::get($this->currentCartItem, 'title', __('Product Image', 'fluent-cart')); if (!$image) { $image = Vite::getAssetUrl('images/placeholder.svg'); } ?>
    <?php echo esc_attr($title); ?>
    renderTitles(); $this->renderItemPrice(); $this->renderQuantity(); (new CartItemRenderer($this->currentCartItem))->renderChildVariants(); ?>
    currentCartItem, 'post_title', ''); $variationTitle = Arr::get($this->currentCartItem, 'title', ''); $variationType = Arr::get($this->currentCartItem, 'variation_type', 'simple'); $aria_label = sprintf( /* translators: 1: Post or product title */ esc_attr__('View %1$s', 'fluent-cart'), esc_attr($postTitle) ); ?>

    -

    currentCartItem, 'unit_price', 0)); $quantity = Arr::get($this->currentCartItem, 'quantity', 1); ?>
    currentCartItem, 'quantity', 0); $productId = Arr::get($this->currentCartItem, 'post_id'); $this->product = Product::query()->with(['detail'])->find($productId); $soldIndividually = false; if ($this->product) { $soldIndividually = $this->product->soldIndividually(); } if ($soldIndividually) { return; } ?>
    renderItemTotal(); ?> renderRemove(); ?>
    currentCartItem, 'quantity', 0); $totalPrice = Arr::get($this->currentCartItem, 'unit_price', 0) * $quantity; if (Arr::get($this->currentCartItem, 'other_info.payment_type', 'onetime') == 'subscription') { if (Arr::get($this->currentCartItem, 'other_info.manage_setup_fee') == 'yes') { $signupFee = Arr::get($this->currentCartItem, 'other_info.signup_fee', 0); if (Arr::get($this->currentCartItem, 'other_info.setup_fee_per_item', 'no') == 'yes') { $signupFee = Arr::get($this->currentCartItem, 'other_info.signup_fee', 0) * $quantity; } $totalPrice += $signupFee; } } $totalPrice = Helper::toDecimal($totalPrice); $aria_label = sprintf( /* translators: 1: Total price */ __('Total price for this item: %1$s', 'fluent-cart'), $totalPrice ); ?>
    getItemsAmountSubtotal(true, true); $aria_label = sprintf( /* translators: 1: Total price */ __('Total cart price: %1$s', 'fluent-cart'), esc_attr($subtotal) ); ?>
    :
    renderEmptyCartIcon(); $this->renderEmptyCart( $emptyMessage, $continueShoppingUrl, $continueShoppingLabel, $continueShoppingAriaLabel ); ?>
    storeSettings->getShopPage(); $continueShoppingLabel ??= __('Continue Shopping', 'fluent-cart'); $continueShoppingAriaLabel ??= __('Browse products and continue shopping', 'fluent-cart'); ?>