Closed bobbingwide closed 10 months ago
Yasmin has found two other plugins to try:
plus there's:
She suggests trying them in the order listed above. The solution needs to be compatible with WooCommmerce 7.4.0 and above.
Deposits & Partial Payments for WooCommerce by Acowebs works with the standard templates but not the VGC theme.
In a standard theme the user gets told about the Deposit and Future payments on:
Bayna - Deposits & Partial Payments for WooCommerce doesn't appear to have a default percentage field. It may be in the Pro version.
In a standard theme the user gets told about the Deposit and Future payments on:
Notes
deposit-mode=check_full
not deposit_mode=check_deposit
.It doesn't work at all in a Windows installation a symlinked plugin.
WooCommerce deposits was orignally purchased from WooCommerce.
Advanced Partial/Deposit Payment For Woocommerce
Supports Partial by default.
Default partial type: Percentage or Fixed
Displays multiple Warning messages in the admin page
Warning: Undefined array key "mepp_text_translation_string_payment_date" in C:\apache\htdocs\wordpress\wp-content\plugins\advanced-partial-payment-or-deposit-for-woocommerce\inc\class_admin_menu.php on line 110
In a standard theme the user gets told about the Deposit and Future payments on:
Notes
Deposits and Partial Payments for WooCommerce partially works on the Cart display.
The deposit total doesn't include the Add-Ons.
The filter functions for woocommerce_get_item_data are
: 10 AWCDP_Front_End::awcdp_get_item_data;2 display_addon_info_in_cart;2
We should try setting the priority for display_addon_info_in_cart
to 9.
That didn't work other than moving the Deposit Amount and Future payments below the Product Addons. The Deposit Amount was still based on the base product price, not the price including the addons.
This product price is set when the product is added to the cart.
We need to look at the hooks attached to woocommerce_add_cart_item_data
.
Attached hooks are
: 10 AWCDP_Front_End::awcdp_add_cart_item_data;3 calculate_price_on_cart_addition;2
Try setting the priority for calculate_price_on_cart_addition
to 9
That didn't work since the VGC theme uses $cart_item_data['custom_price']
instead of the product price.
It would appear that we need to override the product price that's used by the plugin.
One way to achieve this might be to add another hook that adjusts the figures determined by awcdp_add_cart_item_data
,
or change woocommerce_add_cart_item_data
and leave it a priority 10, or increase it to 11 to be on the safe side.
No, that doesn't work since awcdp_add_cart_item_data
only sets the the cart item data to
[awcdp_deposit] => Array
[enable] => (boolean) 1
at this time. The values are updated later on.
Try adding a hook for woocommerce_add_to_cart
to set a different value for the cart item's ['awcdp_deposit']
['original_price']
( originally set by awcdp_save_original_price()
) to the value for the cart item's ['custom_price']
.
That worked. This screenshot shows 2 products in the cart.
It may not be necessary to display the Deposit Amount and Future Payments in the Product column as
On my local Checkout the order looks like this.
Again, the Deposit Amount and Future Payments details lines aren't really necessary when there's only one product in the cart
The order-received page shows the same stuff
Note there are two payments based on the order number
I don't yet know what happens after the first partial payment has been made. It depends on the current processes regarding payment.
The latest requirements ( Feb 2023 ) are:
Use the Deposits & Partial Payments for WooCommerce plugin, by Acowebs
The following changes to the default processing are to be applied in the VGC theme.
original_price
from the custom_price
in the cart item dataI changed my test product to 25% deposit. I also set the sale date from 1st to 2nd March 2023. The figure of 25% overrides the default 10%.
I changed one Halls product to not support deposits ( Enable Deposit -> No )
Note: The Deposits fields ( Enable Deposit, Deposit type and Deposit Amount ) are not available in Bulk Edit. Enable Deposit will have to be set manually for each products in the Halls brand.
I needed to change the General settings > Default selection to Pay deposit in order to get it to work.
For the time being I've reset the default to Pay full until the Halls products are individually updated to Enable Deposit No
The first version is configured so that all products which support deposits are added as Pay Deposit. The requirement is, for products which support deposits, to allow the user to decide when they add the product to the cart.
This would require changes to the single product display:
In a default theme the plugin displays a radio button before the Add to cart button.
This sets an input field of name awcdp_deposit_option
to yes
or no
, depending on the radio button selected.
The plugin hooks into
add_action( 'woocommerce_before_add_to_cart_button', array( $this, 'awcdp_get_deposit_container' ), 999 );
to provide two add to cart buttons and logic
If we add a call to do_action( 'woocommerce_before_add_to_cart_button' )
in woocommerce/content-single-product.php
just before the Add to cart button then the plugin displays the radio buttons.
Since this is invoking the plugin's standard logic the plugin's settings for Default selection, and overrides for individual products are respected.
Adding the product to the cart produces the expected results in the cart. This carries forward to checkout.
to dynamically calculate the deposit in the browser.
This is not necessary.
for the server end to correctly detect the payment amount selected
The plugin does this.
.... We just need to consider styling the radio buttons.
... We just need to consider styling the radio buttons.
This can be done by removing the frontent stylesheet enqueued by the plugin and adding a bottom margin to the section that displays the Cart total.
when the user selects the Pay deposit radio button the deposit percentage appears It disappears again if the Pay full amount radio button is chosen.
when the user selects the Pay deposit radio button the deposit percentage appears
If the default is Pay deposit then it appears immediately. This is the screen capture from testing in Live.
Delivered in v1.5.1
The WooCommerce Deposits plugin allows the store owner to mark items as deposit items which customers can then place deposits on, rather than paying in full.
With the current theme this product doesn't work at all. WooCommerce support suggested trying Storefront. I'm pretty certain it would have worked with Storefront. But then none of the optional addon logic would have worked.
Observations
wc-ajax=update_order_review
processing which unblocks the payment method radio buttons and the Place order button.