Issue with the plugin
-
Hello Sir,
Congratulations for your plugin!
I am using Enfold theme and I need your help.
I have the following issues:
When click to add to cart button, the mini cart displays “Product” added to cart and not the description of the product.See the screenshot: https://prnt.sc/n4pjon
and also the following function is ignored:
/* Display “product already in cart” instead of “add to cart” button */
add_filter( ‘woocommerce_product_single_add_to_cart_text’, ‘woo_custom_cart_button_text’ );
function woo_custom_cart_button_text() {
global $woocommerce;
foreach($woocommerce->cart->get_cart() as $cart_item_key => $values ) {
$_product = $values[‘data’];if( get_the_ID() == $_product->id ) {
return __(‘?δη στο καλ?θι. Θ?? ?λλο;’, ‘woocommerce’);
}
}
return __(‘Add to cart’, ‘woocommerce’);
}add_filter( ‘add_to_cart_text’, ‘woo_archive_custom_cart_button_text’ );
function woo_archive_custom_cart_button_text() {
global $woocommerce;
foreach($woocommerce->cart->get_cart() as $cart_item_key => $values ) {
$_product = $values[‘data’];
if( get_the_ID() == $_product->id ) {
return __(‘Already in cart’, ‘woocommerce’);
}
}
return __(‘Add to cart’, ‘woocommerce’);
}and the following jquery is ignored:
//display the cart for a short moment on page load if a product was added but no notice was delivered (eg template builder page)
if (jQuery(‘.av-display-cart-on-load’).length && jQuery(‘.woocommerce-message’).length === 0)
{
var dropdown = jQuery(‘.cart_dropdown’);
setTimeout( function(){dropdown.trigger(‘mouseenter’); }, 500);
setTimeout( function(){dropdown.trigger(‘mouseleave’); }, 30000);
}
}I am looking forward to your precious support.
Best regards,
Nick
- The topic ‘Issue with the plugin’ is closed to new replies.