Forum Replies Created
-
AuthorPosts
-
JasonParticipant
Any help with this please?
JasonParticipantI just doubled checked our settings.
We are using the fields that are for Free WCV.
I don’t remember seeing these options before – we’ve been developing since version 1.9.0, so were these newly added?
How would you recommend I update this? I was using an action to update the user meta.
Will I need to update these meta for each user:
_wcv_commission_type _wcv_commission_percent
Thanks
JasonParticipantSorry – reviving this topic again.
The site has gone live now and the money is currently held by the site owner (not the vendor) and the refund button is still grey.
Is there something missing that disables automatic IPN refunds?
JasonParticipantHi guys,
Further digging actually uncovered that it wasn’t the mass pay that was causing problems – but rather an issue with how commissions is calculated with WC Vendors Pro.
Can we move this topic to the WCV Pro forum section?
On the hook
wcv_commission_rate
WCV Pro adds another filter called$this->wcvendors_pro_commission_controller, 'process_commission'
We have tiered packages for users, that is tied to a membership and custom commission rates.
So we basically expect the users Commission override set in their profile to override everything else, but in the WCV Pro function, the function has no way to disable the “Global commissions” that is set on the WCV Pro “Commissions” tab.
How do we disable this? Is it a bug?
I commented out the function for now as it messed up commission due and shipping totals.
Attached is a screenshot of the WCV Pro page in question – if left blank – it errors and users will get zero commission.
February 3, 2017 at 3:48 pm in reply to: Moved Registration page – "Apply to vendor" disappears #55073JasonParticipantHi Ben,
I’m actually asking for those lines to be removed from your plugin because they break that action hook.
Theme authors can use any combo they want.
January 20, 2017 at 7:42 am in reply to: Moved Registration page – "Apply to vendor" disappears #53696JasonParticipantHi guys,
Do you plan to make any changes to this? It would really be helpful to have an editable template and to allow use of the “action=register”, as part of themes.
JasonParticipantOk – another update.
… Added handling fee + conversion, and a new hook to show on “checkout” page.
Enjoy.
// Add this to your themes function.php add_filter('woocommerce_cart_item_name', 'wcv_shipping_cart_item', 1, 3); add_filter('woocommerce_checkout_cart_item_quantity', 'wcv_shipping_cart_item', 1, 3); function wcv_shipping_cart_item($title = null, $cart_item = null, $cart_item_key = null) { $settings = get_option('woocommerce_wcv_pro_vendor_shipping_settings'); $customer_address = array( 'country' => WC()->customer->get_shipping_country(), 'state' => WC()->customer->get_shipping_state() ); $package = array( 'destination' => $customer_address ); $shipping = new WCVendors_Pro_Shipping_Method(); $rate = $shipping->get_shipping_rate( $cart_item[ 'product_id' ], $cart_item[ 'data' ]->post->post_author, $package, $settings ); $qty = ( $rate->qty_override == 'yes' ) ? 1 : $cart_item[ 'quantity' ]; $cost = $rate->fee * $qty; // Product handling fee. $product_fee = $shipping->get_fee( $rate->product_fee, $cost ) * $qty; $cost += $product_fee; $cart = $cart_item_key && is_cart() && ( current_filter() === 'woocommerce_cart_item_name' ); $checkout = $cart_item_key && is_checkout() && ( current_filter() === 'woocommerce_checkout_cart_item_quantity' ); if ( $cart || $checkout ) { echo $title . '<br /><span class="postage-fee">Postage Fee: ' . wc_price( $cost ) . '</span>'; } else { echo $title; } } //wcv_shipping_cart_item()
JasonParticipantHi,
Thanks so much for the snippet – I needed this to show how much each seller was charging for postage 🙂
Updated the code to take into check item quantity, to be transparent with cost to customers.
// Add this to your themes function.php add_filter('woocommerce_cart_item_name', 'wcv_shipping_cart_item', 1, 3); function wcv_shipping_cart_item($title = null, $cart_item = null, $cart_item_key = null) { $settings = get_option('woocommerce_wcv_pro_vendor_shipping_settings'); $customer_address = array( 'country' => WC()->customer->get_shipping_country(), 'state' => WC()->customer->get_shipping_state() ); $package = array( 'destination' => $customer_address ); $rate = WCVendors_Pro_Shipping_Method::get_shipping_rate( $cart_item[ 'product_id' ], $cart_item[ 'data' ]->post->post_author, $package, $settings ); $qty = ( $rate->qty_override == 'yes' ) ? 1 : $cart_item[ 'quantity' ]; $cost = $rate->fee * $qty; if ($cart_item_key && is_cart()) { echo $title . '<br /><span class="shipping-fee">Shipping Fee: ' . wc_price( $cost ) . '</span>'; } else { echo $title; } } //wcv_shipping_cart_item()
Not taken into account handling fee – but used the calculations found in
calculate_shipping()
inwc-vendors-pro/admin/class-wcvendors-pro-shipping.php
JasonParticipantVery sorry – didn’t realise there was a filter called wcv_pro_dashboard_urls
apply_filters( 'wcv_pro_dashboard_urls', $this->dashboard_pages );
I shall use this instead. Thanks!
JasonParticipantThanks for the commit 🙂
Error on line 189:
apply_filters( 'wcvendors_commission_all_due_where', $query );
Should be $where and not $query.
Otherwise looks good to me. The other
wcvendors_commission_all_due_sql
is a welcomed addition 🙂Thanks!
JasonParticipantOk, thats great. Dont mind what prefix it has – as long as it makes it into the next release, I’m happy 🙂
JasonParticipantOk great – thanks for clarifying that 🙂
Any idea on the automatic refunds side? Does it work with Sandbox or only Live?
JasonParticipantReplying to this post too – I am the 2nd Developer on this project.
-
AuthorPosts