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

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #316168

    John
    Participant

    Hello,
    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

    https://pastebin.com/ZBzuhjPi

    My attempt to modify with the actual theme to stickyaddtocart.js

    https://pastebin.com/i1FwpJ4E

    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.

    #316680

    Hello,

    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

    #316692

    John
    Participant

    Can 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.
    Thanks

    #316781

    Hello,

    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

    #316782

    John
    Participant

    Have 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.

    #316792

    Artem Temos
    Keymaster

    Sorry, 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.

    #316795

    John
    Participant

    Hello,
    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.
    Thanks

    #316798

    Artem Temos
    Keymaster

    Hello,

    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

    #316808

    John
    Participant

    Ok, 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.
    Thanks

    #316927

    Artem Temos
    Keymaster

    We will consider this as a feature request but we can’t say you exactly if it will be implemented soon or not.

Viewing 10 posts - 1 through 10 (of 10 total)