Forum Replies Created
-
AuthorPosts
-
vincentParticipant
Hi !
I reactivated everything and (I don’t know why) it seems to work now.
Thanks for the support. I think we can close the ticket.
vincentParticipantHi !
As you can see in the message I posted on June the 20th, I already tried to add those codes in “code snippet”. I had to remove them as I had duplicated orders (with paiments approved or failed) and no impact on the sub orders.vincentParticipantThis reply has been marked as private.vincentParticipantThis reply has been marked as private.vincentParticipantThis reply has been marked as private.vincentParticipantHi ! I have set a message with my admin access to private but I’m not sure you received it and I don’t see it on this page. Is it normal or do I need to send it back to you ?
For the moment, each time I try to use your code snippet, WordPress tells me there is a critical error.
Thanks
vincentParticipantHi !
– For the commission calculation, we can consider it solved as with a “minus” it works as desired.
– For the second subject (suborders have the same status as orders as I don’t have any shipping on the platform and only digital products), the code provided breaks the ordering system.
=> First order I received arrived three times in the system with 2 failures. On the vendor side, there was no sync.
=> Second order arrived twice with both paiments accepted (I had to pay back the customer for one of the two orders). Sync also didn’t work.Once I desactivated the code, ordering system worked as before so the issue came from it.
vincentParticipantOK, so for the fixed commission, I juste entered “-0.30” instead of “0.30” and for the variable commission, “0.70” instead of “0.30”.
In the last order, it seems to have worked without any found issue in the back office nor in the vendor dashboard.For the order status, I added this code as a code snippet as I’m receiving the paiment and I only manage digital products without ship rates :
add_action( ‘woocommerce_order_status_completed’, ‘wcmp_order_status_completed’ );
function wcmp_order_status_completed( $order_id ) {
global $WCMp;
$suborder_details = $WCMp->order->get_suborders($order_id);
foreach ($suborder_details as $key => $value) {
$suborder_fetch = array(
‘ID’ => $value->get_id(),
‘post_status’ => ‘wc-completed’,
);
wp_update_post( $suborder_fetch );
}
}add_action( ‘woocommerce_order_status_processing’, ‘wcmp_order_status_processing’ );
function wcmp_order_status_processing( $order_id ) {
global $WCMp;
$suborder_details = $WCMp->order->get_suborders($order_id);
foreach ($suborder_details as $key => $value) {
$suborder_fetch = array(
‘ID’ => $value->get_id(),
‘post_status’ => ‘wc-processing’,
);
wp_update_post( $suborder_fetch );
}
}The idea is that when the order becomes completed, the suborders become completed too without any intervention needed from the vendors. Am I right or did I Use the wrong code ?
I’ll keep you update once received the next order to be sure everything works properly now.
Thanks
vincentParticipantI don’t understand your reply
“WCMp calculates commission on Product Price only.”
“So, the commission is not calculated on the product price”which one is it ? is the commission calculated on the product price yes or no ?
I confirm that the orders are processing, what should I do ? people download a pdf in the confirmation email, there is no shipping
thanks
vincentParticipantHi
thanks for your reply.
first of all, in WCMp >> Commission, I see nothing (see file attached “commission”)Second, i think we do not speak about the same thing
My problem is that the commission is not calculated properly.
The commission sent to the vendor (in the email and the vendor’s dashboard) is wrongYou have an example in the file attached:
Product is at 3€ VAT included
Commission to the vendor should be 1.80€ (30% of VAT price + 0.30€)
Here it is 1.20€ >> which is the admin commission / our commissionWhy is this happening ? How can we correct this + the fact that we don’t see anything in the commission’s page ?
or is there something i don’t understand ?vincentParticipantHi !
Not only the email, but also the stats in the back office for the admin and the vendor should reflect those numbers.
For instance, I will need it to send the money to the vendors.vincentParticipantSolved with this function :
function getvendordescription($vendor_description) {
if ( wcmp_is_store_page() ) {
$store_id = wcmp_find_shop_page_vendor();
$vendor = get_wcmp_vendor($store_id);
$vendor_description = $vendor->description;
return $vendor_description;
}
} -
AuthorPosts