VinzClortho
Forum Replies Created
-
Forum: Plugins
In reply to: [YITH WooCommerce Wishlist] Check when a product is in wishlistOk, thanks for the reply.
Best regards
Forum: Plugins
In reply to: [YITH WooCommerce Wishlist] Check when a product is in wishlistHi, thanks a lot for your reply!
YITH_WCWL_Wishlist_Factory::get_current_wishlist() was what I was looking for!
I implemented the code a bit differently (without jquery):
<?php if ( class_exists( 'YITH_WCWL_Wishlist_Factory' ) ) :
$notempty = "";
$wishlist = YITH_WCWL_Wishlist_Factory::get_current_wishlist();
if ( $wishlist && $wishlist->has_items() ) {
$notempty = "notempty";
}
?>
<a class="<?php echo esc_attr($notempty) ?>" href=""></a>
<?php endif; ?>Little else css does the rest of the work!
It would be nice to be able to check this in ajax, otherwise the icon would change only after the page refresh. Is it possible to do this using the YITH WooCommerce Wishlist ajax class?
Thanks
Perfect! Thank you very much, you were very kind!
Hi, thanks for your reply!
The snippet works fine, but it only applies to the cart, I would like to be able to show it in the product page.
I saw that you query the $cart_item object to check if an adp discount rule is applied. Is there a way to get this information also in the product page, querying for example $product?
Thank you
- This reply was modified 1 month, 3 weeks ago by VinzClortho.
Hi Fesupportteam
Yes, the problem occurs in a clean test environment, with Storefront theme, and only the Woocommerce and Filter Everything plugins, all updated. You can see my test environment setup in my initial message.
Greetings
Perfect, thank you for the explanation
Hi Mathieu, thanks for the reply. I read your article, it was just what I wanted to know.
So if I understand correctly, when the user revokes the consent, Complianz disables the script (Analytics in my case), preventing cookies from communicating user information. Is it correct?Hi,
I opened a ticket in the helpdesk as you asked me.Thanks
Hi, thanks for the reply
No, I’m using the free version. I set the Conditions rule: order count < 1
Thanks for the answer, but I can’t find the option you are talking about in the setting-> cart or in the setting-> coupon. Can you help me?
Thanks
Forum: Plugins
In reply to: [Facebook for WooCommerce] addToCart event problemsHello,
now reported to me this problem:Pixel has low event source match rate
Some content_ids sent from pixel fires by this pixel do not match any catalog associated to the pixel, This could be because your catalogs aren’t up to date, or because the item IDs in your catalogs don’t match the content_ids in your pixelCan you help me?
Thanks
Forum: Plugins
In reply to: [Facebook for WooCommerce] addToCart event problemsHi Pit,
Thanks for the reply.
You’re right, the customer added another conversion tracking plugin, without telling us anything. Now I have disabled it and there are no more warnings.
For the other problem, I have to inquire if it is still present.Hello,
I had reported in my previous message the code of line 145 (it’s exactly like the code you wrote to me, I just added the IDs):add_filter( 'mc4wp_integration_wp-comment-form_data', function( MC4WP_MailChimp_Subscriber $subscriber ) { // replace “interest-id” with the actual ID of your interest. $subscriber->interests[ 'category_id' ] = true; // repeat for all interests you want to enable or disable $subscriber->interests[ 'id-group-1' ] = true; $subscriber->interests[ 'id-group-2' ] = false; $subscriber->interests[ 'id-group-3' ] = false; return $subscriber; });
(of course I write here category_id, id-group-1, etc … just to not report the real code in this post)
In the rest of function.php there are no other functions or hooks regarding mailchimp or the comment form.
In the MailChimp for WP > MailChimp page, I can find list_id. In the MailChimp for WP > Form page, I can find the category_id (code of the interest field), but not the IDs of the individual groups contained (group-1, group-2, etc.). If I understand correctly, in your code I have to enter the IDs of each group in which I want to register the user ($subscriber->interests[ ‘id-group-1’ ] = true;).
- This reply was modified 6 years, 1 month ago by VinzClortho.
Hello,
I understood that in your code I have to add the ID of each single group. I found them on the Mailchimp Developer Playground. If I understood correctly:GET lists/list_id/interest-categories/category_id/interests/id
category_id > ID of the interest field
list_id > ID List
id > ID of the single groupI then added your code to my function.php in this way:
add_filter( 'mc4wp_integration_wp-comment-form_data', function( MC4WP_MailChimp_Subscriber $subscriber ) { // replace “interest-id” with the actual ID of your interest. $subscriber->interests[ 'category_id' ] = true; // repeat for all interests you want to enable or disable $subscriber->interests[ 'id-group-1' ] = true; $subscriber->interests[ 'id-group-2' ] = false; $subscriber->interests[ 'id-group-3' ] = false; return $subscriber; });
However, when I send a comment, I receive the following Fatal Error (functions.php on line 145 is mc4wp_integration_wp-comment-form_data filter).
Fatal error: Uncaught TypeError: Argument 1 passed to {closure}() must be an instance of MC4WP_MailChimp_Subscriber, array given, called in /URL/wp-includes/class-wp-hook.php on line 288 and defined in /URL/wp-content/themes/my-thema/functions.php:145 Stack trace: #0 /URL/wp-includes/class-wp-hook.php(288): {closure}(Array) #1 /URL/wp-includes/plugin.php(203): WP_Hook->apply_filters(Array, Array) #2 /URL/wp-content/plugins/mailchimp-for-wp/includes/integrations/class-integration.php(384): apply_filters('mc4wp_integrati...', Array, 45) #3 /URL/wp-content/plugins/mailchimp-for-wp/integrations/wp-comment-form/class-comment-form.php(94): MC4WP_Integration->subscribe(Array, 45) #4 /web/htdocs in /URL/wp-content/themes/my-thema/functions.php on line 145
Hello,
in the hidden field is indicated the ID of the interest group (name=”INTERESTS[number]”) and also to which group the user must be registered (value=”group”).
In your code, how can I indicate the value of the group?Thanks