Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo
  • Hook Reference
  • Docs Home

Packages

  • Deposits-for-WooCommerce
    • Bookings
    • Cart
    • Order
    • Other
    • Payment-Plans
      • Views
    • Products
    • Settings

Classes

  • DFW_Manage_Cart

Class DFW_Manage_Cart

Manage the product item data in the cart

Package: Deposits-for-WooCommerce\Cart
Category: Classes
Author: Tyche Softwares
Since: 1.0
Located at includes/class-dfw-manage-cart.php

Methods summary

public
# __construct( )

Constructor function

Constructor function

Since

1.o
public
# dfw_display_deposits_form( )

Add options to select deposit or full payment on product front end page

Add options to select deposit or full payment on product front end page

Since

1.0
public array
# dfw_add_cart_item_data( array $cart_item_meta, integer $product_id )

Add meta information to cart item

Add meta information to cart item

Parameters

$cart_item_meta
Meta data of the item added to cart
$product_id
Product id

Returns

array
$cart_item_meta

Since

1.0

Hook

woocommerce_add_cart_item_data
public
# dfw_get_cart_item_from_session( array $cart_item, array $values, array $cart_item_key )

Get Cart item data from session

Get Cart item data from session

Parameters

$cart_item
Item added to the cart
$values
$cart_item_key

Since

1.0

Hook

woocommerce_get_cart_item_from_session
public array
# dfw_add_cart_item( array $cart_item )

Adjust the price of the product based on deposits

Adjust the price of the product based on deposits

Parameters

$cart_item
Cart item meta data

Returns

array
$cart_item

Since

1.0

Hook

woocommerce_add_cart_item
public array
# dfw_get_product_data( mixed $other_data, mixed $cart_item )

Display meta under product name in the cart

Display meta under product name in the cart

Parameters

$other_data
Meta to display under product name
$cart_item
Cart item meta data

Returns

array
$other_data

Since

1.0

Hook

woocommerce_get_item_data
public
# dfw_get_item_price( float $output, mixed $cart_item, mixed $cart_item_key )

Display the correct item price

Display the correct item price

Parameters

$output
Item Price
$cart_item
Cart item meta data
$cart_item_key

Since

1.0

Hook

woocommerce_cart_item_price
public
# dfw_display_item_subtotal( $output, mixed $cart_item, mixed $cart_item_key )

Show the amount payable based on payment plan or fixed amount

Show the amount payable based on payment plan or fixed amount

Parameters

$output
to display under item subtotal
$cart_item
$cart_item Cart item meta data
$cart_item_key

Since

1.0

Hook

woocommerce_cart_item_subtotal
public
# dfw_display_cart_totals_before( )

Display the payable amount & future payments in the cart totals

Display the payable amount & future payments in the cart totals

Since

1.0

Hook

woocommerce_cart_totals_before_order_total
public
# dfw_get_remaining_amount( )

Get the remaining amount after paying deposit

Get the remaining amount after paying deposit

Since

1.0
public
# dfw_get_future_payments( )

Get the future payment amount after paying deposit

Get the future payment amount after paying deposit

Since

1.0
public
# dfw_add_order_item_meta( integer $item_id, mixed $cart_item )

Add meta information of deposit amount & payment plans to order items

Add meta information of deposit amount & payment plans to order items

Parameters

$item_id
$cart_item

Since

1.0
public
# dfw_new_order_item( integer $item_id, mixed $item, integer $order_id )

Add order item meta while placing the order

Add order item meta while placing the order

Parameters

$item_id
Cart Item ID
$item
$order_id
Order ID

Since

1.2

Hook

woocommerce_new_order_item
API documentation generated by ApiGen