MultivendorX
-
AuthorPosts
-
-
January 2, 2024 at 7:58 AM #215641print88Participant
Previously I had a ticket with regards to setting CASH commission as ZERO which was solved:
https://multivendorx.com/support-forum/topic/prevent-creation-of-commission-on-cheque-payments/However, Dec 22, 2023 onwards, the commission for CASH is paid and commission for CREDIT CREDIT is ZERO.
Please assist. What went wrong?
-
January 2, 2024 at 5:56 PM #215661Sangita Support SquadKeymaster
@print88 Sorry to hear that you have faced an issue on your end.
Kindly share the code that you have added on your end for this modification. It seems there might be some issue in the code that is why it is not working on your end accordingly.
Once you share the code our team will check that and will be able to help you further. -
January 3, 2024 at 1:02 AM #215680print88Participant
Codes haven’t changed for the last 6 months.
This is the snippet I am usingadd_action( ‘mvx_commission_after_save_commission_total’, ‘zero_commission’ );
function zero_commission( $commission_id ) {
$order_id = get_post_meta( $commission_id, ‘_commission_order_id’, true );
$payment = get_post_meta( $order_id, ‘_payment_method’, true );
if( $payment == ‘cheque’ ) {
$order = wc_get_order($order_id);
update_post_meta( $commission_id, ‘_commission_amount’, $order->get_subtotal() );
update_post_meta( $commission_id, ‘_commission_total’, 0 );
}
}// paid commission automaticly for cod payment
add_action( ‘after_wcmp_calculate_commission’, function( $commission_id, $vendor_order_id )
{
$payemnt_method = get_post_meta( $vendor_order_id , ‘_payment_method’ , true ); if( $payemnt_method == ‘cheque’ ) {
update_post_meta( $commission_id , ‘_paid_status’ , ‘paid’ );
}
},10,2); -
January 3, 2024 at 5:24 AM #215689Zia RahimParticipant
You have a spelling mistake for the payment method. It is spelt “payemnt_method”. Its also good practice to use straight single quotes rather than curly quotes.
-
January 3, 2024 at 10:57 AM #215700print88Participant
Credit card commission are paid as instructed but CASH commission calculated as zero but on the commission page, it is show as PAID.
It is confusing. -
January 3, 2024 at 2:30 PM #215705Sangita Support SquadKeymaster
@print88 Thank you for providing us with the code. Upon reviewing it, it appears that the functionality of setting the vendor commission to zero is specifically associated with payments made via cheque. This does not affect COD or any other payment methods.
Please proceed to remove or comment out the relevant custom code on your end and observe the commission creation flow for each payment mode. Keep us updated on your progress so that we can provide further assistance as needed. -
January 4, 2024 at 5:13 PM #215761Sangita Support SquadKeymaster
@print88 Kindly create a staging site where the code is added and your issue is replicated and then share the site url, temporary admin and ftp access with us so that we can check.
While sharing the access don’t forget to mark your reply as private.
-
January 5, 2024 at 2:50 AM #215785print88ParticipantThis reply has been marked as private.
-
January 5, 2024 at 12:54 PM #215794Sangita Support SquadKeymaster
Hello @print88, Since you’ve provided access to your live site, could you also share test vendor and customer account details with us? This will enable us to examine the commission creation flow on your end.
-
January 23, 2024 at 9:39 AM #216611print88Participant
Vendor Login
diamond516
(19805637Cc)Please note that any order made a physical printout invoice will be printed at my client’s physical store.
Please put in the NOTES “TEST ORDER” and cancel/delete the order afterwards. -
January 23, 2024 at 1:05 PM #216615Sangita Support SquadKeymaster
@print88 Thanks for sharing the access with us.
However, in accordance with our support policy outlined at https://multivendorx.com/how-to-get-support/, we are unable to test the issue on your live site. Since creating a staging site is not feasible for you, we kindly request that you take a backup of your live site. Please inform us once the backup is complete, and also provide FTP access to your site so that we can proceed accordingly. -
January 23, 2024 at 1:41 PM #216616print88ParticipantThis reply has been marked as private.
-
January 23, 2024 at 3:50 PM #216622Sangita Support SquadKeymaster
@print88 We are not able to place order o your end as it shows this https://prnt.sc/3ZZBz_Wgf2-g. We are open for 2 more hours so if possible please let us know how we can place an order and check the issue on your end.
-
January 24, 2024 at 11:57 AM #216656print88Participant
You can turn off the store hours at WooCommerce => Store Hours.
Please turn it back on after your inspection. -
January 24, 2024 at 6:10 PM #216665Sangita Support SquadKeymaster
Thanks for the update. We checked your site but there is no code added in the functions.php file of your current active theme (http://tinyurl.com/ypucof25). Can you please let us know where have you added the code on your end.
-
January 25, 2024 at 3:14 AM #216680print88ParticipantThis reply has been marked as private.
-
January 25, 2024 at 1:44 PM #216683Sangita Support SquadKeymaster
@print88 We are unable to access the link you provided for accessing the code snippet. We are getting this while trying to access the shared url: http://tinyurl.com/yvq947aq.
-
January 27, 2024 at 9:20 AM #216737print88ParticipantThis reply has been marked as private.
-
January 27, 2024 at 12:07 PM #216740Sangita Support SquadKeymaster
Hi @print88, We are still not able to access the page of code snippets on your end. We are getting this http://tinyurl.com/ytjmoqz7 while accessing the url.
-
January 27, 2024 at 12:13 PM #216741print88Participant
please use this link
-
January 27, 2024 at 3:33 PM #216744Sangita Support SquadKeymaster
@print88 Check the below code for vendor commission to become zero for cash on delivery payment method-
add_action( 'mvx_commission_after_save_commission_total', 'zero_commission' ); function zero_commission( $commission_id ) { $order_id = get_post_meta( $commission_id, '_commission_order_id', true ); $order = wc_get_order($order_id); $payment = $order->get_meta( '_payment_method', true ); if( $payment == 'cod' ) { update_post_meta( $commission_id, '_commission_amount', 0 ); update_post_meta( $commission_id, '_commission_total', 0 ); } }
CopyYou can add the modification in this code according to your requirement. Let us know if you need any further assistance from our end.
-
March 29, 2024 at 6:43 PM #218666Sangita Support SquadKeymaster
It’s been long and we have not heard back from you. We presume your query is resolved now. We are closing this thread. If you need help or face issue in future please do create a new support ticket.
-
-
AuthorPosts
The topic ‘Cash Commission are PAID but Credit Card Commission are set as ZERO instead’ is closed to new replies.