Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM › Vendor, View Product got an error
- This topic has 2 replies, 2 voices, and was last updated 6 years, 10 months ago by WCFM Forum.
- AuthorPosts
- February 16, 2018 at 6:17 pm #19215RossGuest
Hello!
I’m using WooCommerce 3.3.1 and
WooCommerce Frontend Manager 3.5.1When in my WooCommerce Frontend Manager i go to product i got an ( DataTables warning: table id=wcfm-products – Ajax error. For more information about this error, please see http://datatables.net/tn/7 ) error.
The same error appear if you vendor and if your an admin.Any solution?
Thanks!
- February 16, 2018 at 6:28 pm #19216RossGuest
Ok, looks like it’s conflict with this code:
function my_wc_custom_get_price_html( $price, $product ) {
if ( $product->get_price() == 0 ) {
if ( $product->is_on_sale() && $product->get_regular_price() ) {
$regular_price = wc_get_price_to_display( $product, array( ‘qty’ => 1, ‘price’ => $product->get_regular_price() ) );$price = wc_format_price_range( $regular_price, __( ‘Get a Quote!’, ‘woocommerce’ ) );
} else {
$price = ‘<span class=”amount”>’ . __( ‘Get a Quote!’, ‘woocommerce’ ) . ‘</span>’;
}//Replace to Add to Card with Custom Text
add_filter( ‘woocommerce_product_single_add_to_cart_text’, ‘woo_custom_cart_button_text’ ); // 2.1 +function woo_custom_cart_button_text() {
return __( ‘Get a Quote’, ‘woocommerce’ );
}
}
return $price;
}add_filter( ‘woocommerce_get_price_html’, ‘my_wc_custom_get_price_html’, 10, 2 );
- February 16, 2018 at 6:46 pm #19217WCFM ForumMember
Hi,
Is this code written by you?
Actually, i think this code is replacing “Add to Cart” button text with “Get a Quote”, but I see it’s written totally wrong way.
You may correct this, it has errors and I think it’s throwing 500 server error.
Thank You
- AuthorPosts
- The topic ‘Vendor, View Product got an error’ is closed to new replies.