Jump to content

Buy box text duplication issue


Recommended Posts

Hey guys, I need your help on this one again. The issue is caused while using a module for customizing products called cdesign it replaces the name of buy box buttons both BUY NOW and ADD TO CART buttons to its function button DESIGN NOW allowing users to customize products however in the process making the page look weird, please suggest me a way to modify the module so that it uses only one of the buy box button be it ADD TO CART OR BUY NOW instead of both like pictured below to redirect to product customization page. Any help would be great.

rfiles.thumb.PNG.2c4bb2cf7799786d6d206d7140621281.PNG

Link to comment
Share on other sites

1 hour ago, Vky fonda said:

Hey guys, I need your help on this one again. The issue is caused while using a module for customizing products called cdesign it replaces the name of buy box buttons both BUY NOW and ADD TO CART buttons to its function button DESIGN NOW allowing users to customize products however in the process making the page look weird, please suggest me a way to modify the module so that it uses only one of the buy box button be it ADD TO CART OR BUY NOW instead of both like pictured below to redirect to product customization page. Any help would be great.

rfiles.thumb.PNG.2c4bb2cf7799786d6d206d7140621281.PNG

Module options? Check hooks. You can most probably un hook one on them. Link would be great to see it.

Link to comment
Share on other sites

Hey there, thanks for reply. I tried your method to unhook from product buttons but it is not helping it is removing the design now button totally. Please suggest me an another way. the module does not have inbuilt options for button placement it by default is attaching itself top existing buy boxes i have no clue how to fix this thing any help would be great. thanks

 

 

     }
        }

        if( $('.add .add-to-cart').prop('disabled') )
           $('.cp-get-canvas').attr('disabled',true);


        var body = document.querySelector('#add-to-cart-or-refresh');
        var observer = new MutationObserver(function(mutations) {
           mutations.forEach(function(mutation) {
               if( $('.add .add-to-cart').prop('disabled') )
                 $('.cp-get-canvas').attr('disabled',true);
               else
                 $('.cp-get-canvas').attr('disabled',false);

                if( !$('.cp-get-canvas')[0] )
                    $("<button class='cp-get-canvas btn btn-primary'>{l s='Design me' mod='cdesigner'}</button>").insertAfter('.product-add-to-cart .add-to-cart');

                if( allow_comb == '1') {
                    var $combinations_product = $('#add-to-cart-or-refresh .product-variants').html();
                    if( $.trim( $combinations_product ) != '' ) {
                        $('.list-combination-data>div>form.clone-form-comb').html( $combinations_product );
                    }
                    else 
                        $('.update-opt').hide();
                }
           });
        }); 
        observer.observe( body, { childList: true , attributes: true }); 
    });
    
    $(document).on('click','#btn-instagram',function(){
        window.open("https://api.instagram.com/oauth/authorize?client_id={$client_id|escape:'htmlall':'UTF-8'};redirect_uri={$redirect_URI|escape:'htmlall':'UTF-8'};scope=basic;response_type=code", "myWindow","menubar=no, status=no, scrollbars=no, menubar=no, width=400, height=300");
         return false;
    });

    $("<button class='cp-get-canvas btn btn-primary'>{l s='Design me' mod='cdesigner'}</button>").insertAfter('.product-add-to-cart .add-to-cart');
    $('body').append('<div id="wrap-phone-pop">'+$('#wrap-phone-dup').html()+'</div>');
    $('#wrap-phone-dup').remove();
    $('.overlay,.btn-close-pl').bind('click',function(){
         $('.overlay,#wrap-phone-pop').fadeOut('pretty', function() {
            $('.overlay').remove();
         });
         $('body').removeClass('ovhidden');
         $('.list-combination-data').hide();
         return false;
    });
    window.fbAsyncInit = function() {
        FB.init({
          appId      : "{$app_id|escape:'htmlall':'UTF-8'}", 
          cookie     : true,
          xfbml      : true,
          version    : 'v3.2'
        });
    };

Edited by Vky fonda (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...