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); ?>
    $this->currentCartItem, 'cart' => null, 'product' => $this->product, 'variant' => null, ]; } public function renderDetails() { ?>
    renderTitles(); $this->renderItemPrice(); $this->renderQuantity(); (new CartItemRenderer($this->currentCartItem))->renderChildVariants(); do_action('fluent_cart/cart/line_item/line_meta', $this->getEventInfo()); ?>
    currentCartItem, 'post_title', ''); // The Cart model already resolves & appends variation_display_title on // every cart item (Cart::getCartDataAttribute), so just read it. $variationTitle = (string) Arr::get($this->currentCartItem, 'variation_display_title', 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, 'line_meta.original_unit_price', Arr::get($this->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); $displayUnitPrice = Arr::get( $this->currentCartItem, 'line_meta.original_unit_price', Arr::get($this->currentCartItem, 'unit_price', 0) ); $totalPrice = $displayUnitPrice * $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 ); ?>
    getItems(); $grossTotal = 0; foreach ($cartItems as $item) { $paymentType = Arr::get($item, 'other_info.payment_type', ''); $qty = max(1, (int) Arr::get($item, 'quantity', 1)); $displayUnitPrice = (int) Arr::get( $item, 'line_meta.original_unit_price', Arr::get($item, 'unit_price', 0) ); if ($paymentType === 'subscription') { if ((int) Arr::get($item, 'other_info.trial_days', 0) > 0) { $grossTotal += (int) Arr::get($item, 'other_info.signup_fee', 0); } else { $grossTotal += $displayUnitPrice * $qty + (int) Arr::get($item, 'other_info.signup_fee', 0); } } else { $grossTotal += $displayUnitPrice * $qty; } } $subtotal = Helper::toDecimal($grossTotal); $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'); ?>