Forum Replies Created
-
AuthorPosts
-
September 2, 2024 at 7:14 am in reply to: How to get product categories class with the catalogue product module in ALB #1466025
Hi Ismael,
Thanks, it works like a charm after clearing the cache.
I made two modifications for better results, and everything seems to be working fine now. First, I adjusted the code to retrieve all product categories instead of just the first one. Additionally, I applied the filter specifically to the “a” link to avoid affecting the “div” below, which contains the class .av-catalogue-item-inner that includes the same string part .av-catalogue-item:
function avf_add_category_class_to_cart_link($link, $product) { $categories = get_the_terms($product->get_id(), 'product_cat'); $category_classes = ''; if ($categories && !is_wp_error($categories)) { foreach ($categories as $category) { $category_classes .= ' product_cat-' . esc_attr($category->slug); } } $link = preg_replace( '/(<a[^>]*class="av-catalogue-item)([^"]*)"/', '$1' . $category_classes . '$2"', $link ); return $link; } add_filter('woocommerce_loop_add_to_cart_link', 'avf_add_category_class_to_cart_link', 10, 2);
Thanks for your help and your quick response!
September 1, 2024 at 11:24 pm in reply to: How to get product categories class with the catalogue product module in ALB #1466013Hi Mike,
I hope you’re doing well.
I’m currently working on a page (url down below) that features a list of products displayed using the catalogue module. Each product belongs to specific categories that I’ve created, such as:
product_cat-domaine-du-chene-vert
product_cat-vallee-du-rhone-nordFor instance, these categories apply to the product “Crozes-Hermitage millésime 2022 / Rouge.”
However, I’ve noticed that the product category classes are not included in the HTML structure of the catalogue module. Specifically, they do not appear in the “li” or “a” tags, which makes it challenging for me to apply CSS modifications based on product categories.
Currently, only the data-product_id attribute is present, but this isn’t practical for my needs. Since the product inventory will continue to grow, I require a solution that automatically includes product category classes in the “li” or “a” tags for CSS purposes. I don’t need these categories to be visible in the front-end module, just added to the HTML for styling.
Could you please advise on how I can achieve this?
Thank you for your help.
Best regards,
- This reply was modified 2 months, 2 weeks ago by manyfloor.
Hi Mike,
Yep, thank’s for the tips.
Regards
Hi mike,
Actually each icon pack was for a different project and a different client (one project was about a lawyer in medical sector, that’s why I’ve tried to add two icon packs on the same theme).
But for this new client I think it’ll be fine as I just need the gym icon pack.
Thank’s a lot for your help, perfect as always !
the gym icons*
Hi Mike,
Thanks a lot for your help !
I’m working on an other website with the gym demo and the law icons are missing as well. Do I need to open a new threat or could you send me directly the file as you did last time ?
Regards
November 4, 2020 at 11:35 am in reply to: Icon list animation not working in tab section when clicking on a link #1258202Hi Mike,
Sorry for the response delay, if you follow the link you send me in the private data of in your last message, you could see the problem.
It occurs if you click on “TRETS” tab just after (then the icon animation not happening and icons are already displayed).
But if you click on the others tab, that are not the first, everything is well and the icon animation displays as expected.It’s a detail but it would be amazing to have the solution.
Regards
Hi Mike,
So there is no way to get the two at the same time ?
Regards
Hi Mike,
I tried but it didn’t work..
Regards
May 27, 2020 at 1:52 am in reply to: Icon list animation not working in tab section when clicking on a link #1216762Hi Mike,
Perfect, it’s working as expected and the animation triggers well. Thanks a lot !
Just a little problem remains, when you are on the tab 2 or plus and you go on the tab 1, the icons are already displayed. But if you go on the tab 3 or 4 the icons are display as normal. The problem happens only with the tab 1. This is the same website as at the start of the threat.Regards
May 25, 2020 at 3:33 pm in reply to: Icon list animation not working in tab section when clicking on a link #1216164Hi guys,
Yep, I tried the manip and it’s stil not working, even with multiple cache clearing.. I wonder if deactivate the js. files compression could make it works ?
Regards
Hi Jordan,
Actually I’ve got a little problem with the icon import. I’ve import the justice icon pack on my enfold child theme and everything goes well but when I tried to import another icon pack (medical pack), it did not work as both are from flaticon. The new one delete the old one and I can’t get the two at the same time.. Is there a workaround ?
Regards
Hi Mike,
Thanks a lot for your help !
Best regards
Hi Mike,
Thanks a lot for your help !
I’m working on an other website with the law demo and the law icons are missing as well. Do I need to open a new threat or could you send me directly the file as you did ?
Regards
Hi,
I was having some 404 error because of the missing files… It’s not the first time I’m encountering this problem, on the medical demo the medical icons where missing as well and your colleague send me the medical icon pack (threat #1134490). It would be perfect if you could send me the knowledge icon pack.
Regards
Hi Yigit,
It was already disable.
Regards
Hi Victoria,
It was on the envato market but 1 month ago. I send them a request (envato market) but they’ve said to me to see directly with the Kriesi team. Everything is explained in my first message. It’s my last purchase on my account with the purchase code : 1f80e403-cc72-4ccd-80ae-fbbbde914a7b
Thanks for your help.
RegardsHi Yigit,
As said your colleague the problem comes from the fact that “unfortunately, that icon pack is not available anymore”. The icon was not in the files… and the fontello ones have been well dowload.
The website is now online so it’s not possible to do such things.
Could you just send me the icons file or tell me where to find it ? Then I will add the icons myself by FTP.
I did register, is that okay or do you need the purchase code ?
Best regards
September 5, 2019 at 4:25 pm in reply to: Icon list animation not working in tab section when clicking on a link #1134482Hi Mike,
The beta didn’t change nothing. However I’m laughing a new website with the enfold theme and I’ll see if the 4.6 (last version) will work.
Regards
August 24, 2019 at 12:04 pm in reply to: Icon list animation not working in tab section when clicking on a link #1130581I’ve tried to adapt this code (iconlist.js) with the one you gave me but it’s not woking..
(function($)
{
“use strict”;// ——————————————————————————————-
// Iconlist shortcode javascript
// ——————————————————————————————-$.fn.avia_sc_iconlist = function(options)
{
return this.each(function()
{
var iconlist = $(this), elements = iconlist.find(‘>li’);//trigger displaying of thumbnails
iconlist.on(‘avia_start_animation’, function()
{
elements.each(function(i)
{
var element = $(this);
setTimeout(function(){ element.addClass(‘avia_start_animation’) }, (i * 350));
});
});
});
}}(jQuery));
August 24, 2019 at 10:49 am in reply to: Icon list animation not working in tab section when clicking on a link #1130574Hi Mike,
It’s working if adding </script> but it’s not as I would like. The code triggers all the icon in the same time and then all the icon from all the tab are displayed.. I would like the exact same animation that happens when not passing by the link. Each icon get the “avia-start-animation” with a little time lag. Moreover each time I switch tab the animation should be display again and again.
Best regards
August 17, 2019 at 6:25 pm in reply to: Icon list animation not working in tab section when clicking on a link #1128496Hi Mike,
Here it is below.
Don’t worry about the version upload, I’ll do this on my own. I’m currently working on another project so I don’t really have the time to check that everything goes well (moreover I did try with the latest enfold version and it was still not working)
Regards
- This reply was modified 5 years, 3 months ago by Mike. Reason: moved password
August 17, 2019 at 6:44 am in reply to: Icon list animation not working in tab section when clicking on a link #1128455This reply has been marked as private.August 16, 2019 at 9:11 pm in reply to: Icon list animation not working in tab section when clicking on a link #1128375Hi,
I’ve try with the last enfold version on a new website i’m developing. It’s the same theme, and even with the cache deactivated it’s still not working…
Regards
July 11, 2019 at 5:10 pm in reply to: Icon list animation not working in tab section when clicking on a link #1117849Hi Mike,
I have disabled the plugins and nothing helps. This is my PHP version : 7.2.18
Yes you got it, the issue happens only when linked directly and I need the animation to display so I don’t want to delete it. I think it’s because the list-animation.js file is not load so the class that display the animation is not applied on the list items (avia_start_animation).
Regards
July 9, 2019 at 6:59 pm in reply to: Icon list animation not working in tab section when clicking on a link #1117145Hi Mike,
I did the update but unfortunately nothing has change.. so I have switched it back on my “old”enfold one. Another possibility for my issue ?
Regards
July 8, 2019 at 5:48 pm in reply to: Icon list animation not working in tab section when clicking on a link #1116737Hi,
No there is still the icon list on “Nos magasins” page. Is there no automatic update of the template files ? I’m using a child theme actually.
For the issue do you think it could comes from the iconlist.js files that is not properly loading when using an anchor from one page to another ?
Regards
July 3, 2019 at 4:55 pm in reply to: Icon list animation not working in tab section when clicking on a link #1115513Hi,
Actually I’ve found the problem but not the solution. It’s the ‘.avia-icon-list’ and ‘.avia-icon-list li’ that doesn’t take the ‘.avia_start_animation’ class when clicking on a link like “https://homepage.com/#tab-id-2”. Do you know why the icon list animation is not active when icon list are in tab section and when using a link external to the page ?
Regards
July 3, 2019 at 6:56 am in reply to: Icon list animation not working in tab section when clicking on a link #1115348Hi,
I’m not really comfortable with the idea to give my login, is there no other way for you to figure out the problem ?
Best regards
June 13, 2019 at 12:34 pm in reply to: Icon list animation not working in tab section when clicking on a link #1109844Hello,
I have put the link down below. You could see the problem by clicking on the the links (except the first one) in “nos magasins” part, on the homepage. It will lead you to the “nos magasins” page in the tab section that you choose with the link. Then you could see the problem with the icons that are not displayed in the icon list.
Best regards
-
AuthorPosts