Home › Forums › WoodMart support forum › Custom display sticky bar script stop working after theme update
Custom display sticky bar script stop working after theme update
- This topic has 9 replies, 3 voices, and was last updated 3 years, 3 months ago by Artem Temos.
-
AuthorPosts
-
September 3, 2021 at 2:28 am #316168
JohnParticipantHello,
I have managed a few months ago to modify the functions.js scripts stickyaddtocart so it can be displayed above and on scroll to the product tabs to become stick, since the theme was updated and major changes were made I cannot reproduce.
I would like if is possible to have a look and maybe you can give me some advice on how to make the script work again.Modified scripts from old functions.js
My attempt to modify with the actual theme to stickyaddtocart.js
Css code:
.sticky_cart_open .wd-sticky-btn { top:0; bottom: auto; -webkit-transform: translate3d(0,-100%,0); transform: translate3d(0,-100%,0); } .sticky_cart_open .wd-sticky-btn-shown.wd-sticky-btn { -webkit-transform: translate3d(0,0,0); transform: translate3d(0,0,0); } .sticky_cart_open .wc-tabs.wd-sticky-btn-shown{ position: fixed; top: 0px; left: 0; width: 100%; transform: translate3d(0,125px,0); -webkit-transform: translate3d(0,125px,0); z-index: 12; box-shadow: 0 0 9px rgba(0,0,0,.12); } .sticky_cart_open .wc-tabs.wd-sticky-btn-shown + .wd-tab-wrapper{ padding-top: 50px; } .sticky_cart_open .wc-tabs + .wd-tab-wrapper, .sticky_cart_open .wc-tabs{ background-color: #fff; will-change: top,bottom; -webkit-perspective: 1100px; perspective: 1100px; -webkit-perspective-origin: 50% 0; perspective-origin: 50% 0; -webkit-transform: all .2s ease-in-out; transform: all .2s ease-in-out; -webkit-perspective: 20000; perspective: 20000; -webkit-backface-visibility: none; backface-visibility: none; } .sticky_cart_open .tabs-layout-tabs .tabs.wd-sticky-btn-shown li a { padding-top: 15px; transition: padding-top .15s ease-in; } .sticky_main_menu_open .whb-header.btn-shad .whb-main-header, .sticky_cart_open .wd-sticky-btn-shown.btn-shad{ box-shadow: inherit; border-bottom:1px solid rgba(129, 129, 129, 0.2); } .sticky_main_menu_open.sticky_cart_open:not(.sticky_scroll-down) .wd-sticky-btn-shown.wd-sticky-btn { -webkit-transform: translate3d(0,58px,0); transform: translate3d(0,58px,0); } .sticky_main_menu_open:not(.sticky_scroll-down).sticky_cart_open .wc-tabs.wd-sticky-btn-shown { transform: translate3d(0,183px,0); -webkit-transform: translate3d(0,183px,0); } .sticky_main_menu_open .wc-tabs.wd-sticky-btn-shown + .wd-tab-wrapper + .wd-tab-wrapper + .wd-tab-wrapper + .wd-tab-wrapper .wc-tab, .sticky_main_menu_open .wc-tabs.wd-sticky-btn-shown + .wd-tab-wrapper + .wd-tab-wrapper + .wd-tab-wrapper .wc-tab, .sticky_main_menu_open .wc-tabs.wd-sticky-btn-shown + .wd-tab-wrapper + .wd-tab-wrapper .wc-tab, .sticky_main_menu_open .wc-tabs.wd-sticky-btn-shown + .wd-tab-wrapper .wc-tab{ padding-top: 50px; }
Also I have add this code on functions.php below line 419 on actual theme vers.
if ( woodmart_get_opt( 'single_sticky_add_to_cart' ) ) { $classes[] = 'sticky_cart_open'; }
Hope you can help me with this thanks again in advance.
September 6, 2021 at 8:09 am #316680
Elise NoromitMemberHello,
Starting from 6.+ the WoodMart theme has changed considerably. Please check this article: https://xtemos.com/docs/woodmart/faq-guides/woodmart-update-6-0-explained/
If you have any questions please feel free to contact us.
Best Regards
September 6, 2021 at 8:47 am #316692
JohnParticipantCan you please guide me on how to integrate the js above again?
I saw that you have made many changes, and the code above worked perfectly until the upgrade.
ThanksSeptember 6, 2021 at 12:56 pm #316781
Elise NoromitMemberHello,
Such customization is not covered by our support, you need to make the customization as you did it last time following the same steps with the new theme code.
Best Regards
September 6, 2021 at 12:57 pm #316782
JohnParticipantHave you read the first message and look over the code?
I have tried to reproduce with the same code but something is missing. I only ask for a hint to make it work again 🙂
Hope you understand my matter.September 6, 2021 at 1:35 pm #316792
Artem TemosKeymasterSorry, but we don’t know what exactly you have modified and what did you try to achieve. Additional customizations like that are out of our theme support scope.
Thank you for understanding.
September 6, 2021 at 1:40 pm #316795
JohnParticipantHello,
I was trying to add product tabs to become sticky on scroll down.
Similar to this website when you scroll down.
If I succeed in recreating this can you add it as a feature to your theme?
Thanks in advance.
Ps. I haven’t asked for full customization, just to help me to recreate the same functions that worked on the previous theme vers.
I have linked all the files and modifications from old to new.
ThanksSeptember 6, 2021 at 1:43 pm #316798
Artem TemosKeymasterHello,
Yes, we understand. But it is just not possible for us to recreate this function or any changes made in that script since they were made by you, not by our developers. We would be happy to help you but we can’t do this without additional code customization. We have provided our article that describes all the breaking changes made in the 6.0 update so you need to follow it and do your customization from scratch.
Kind Regards
September 6, 2021 at 1:55 pm #316808
JohnParticipantOk, thanks. Please let me know if it’s possible to add this feature in the future if I will give you the full code after I will try to reintegrate.
ThanksSeptember 7, 2021 at 7:38 am #316927
Artem TemosKeymasterWe will consider this as a feature request but we can’t say you exactly if it will be implemented soon or not.
-
AuthorPosts
- You must be logged in to create new topics. Login / Register