View Single Post
  #2  
Old 12-14-2015, 10:26 AM
Wendy's Avatar
Wendy Wendy is offline
Ecwid Team
 
Join Date: Jun 2014
Posts: 1,122
Default

Quote:
Originally Posted by James Carver1 View Post
There has got to be a simple solution for this. Tried editing css, to hide all continue shopping buttons. didn't work. Tried large custom script in html pages to redirect, (as provided in knowledge base, except there are no details as to "where" to add the code...didn't work. Most of the posts for instructions on this are dated back to 2011. Has the core coding changed? Chat and email support are only available for premium customers, so how do I know if this will work without subscribing first?

div.ecwid-productBrowser-backgroundedPanel div.ecwid-ContinueShoppingButton,
button.ecwid-productBrowser-cart-continueShoppingButton,
div.ecwid-productBrowser-cart-emptyCartPanel button,
div.ecwid-Account-ContinueShoppingButtonContainer,
​div.ecwid-productBrowser-search-ContinueShoppingButtonContainer,
button.ecwid-ContinueShoppingButton-Invoice {
display:none;
}
copied above, added to a duplicated css, activated, no result.
Thanks for any ideas..
Hello James,

Thank you for contacting Ecwid Customer Care Team!

I am very sorry to learn that the solution suggested in our knowledge base doesn't work in your store. I inspected your store front and as I can see, there are new improved CSS-based buttons. We released the improved buttons recently and you need to use the updated CSS and Javascript codes for changing these buttons. At the moment we are working on updating the articles in our help portal. To my regret, this task requires certain time. No worries, I will post the updated CSS and Javascript codes below.

If you want to hide the 'Continue Shopping' buttons in your store front with the help of custom CSS code, you should use this code:

Code:
/* The product page */ 

button.ecwid-btn.ecwid-btn--primary.ecwid-btn--continueShopping {
    display: none;
} 

/* The cart page */ 

div.ecwid-productBrowser-cart button.ecwid-btn--continueShopping {
  display: none;
}  

/* The empty cart page */ 

div.ecwid-productBrowser-cart-emptyCartPanel button.ecwid-btn--continueShopping {
  display: none;
}  

/* Your Account page */ 

div.ecwid-Account-content button.ecwid-btn--continueShopping {
  display: none;
}  

/* The "Thank you for your order" page */

div.ecwid-productBrowser-OrderConfirmationPage button.ecwid-btn--continueShopping {
  display: none;
} 

/* Search page */

div.ecwid-productBrowser-SearchPage button.ecwid-btn--continueShopping {
  display: none;
}

/* Remove this button from all pages */

button.ecwid-btn.ecwid-btn--primary.ecwid-btn--continueShopping
button.ecwid-btn.ecwid-btn--secondary.ecwid-btn--continueShopping {
  display: none;
}
Copy the code, go to your Ecwid control panel > Settings > Design page. Add the code in your active CSS theme and save changes. You'll see the changes after refreshing the store front page.


If you want to direct 'Continue Shopping' button to custom URL, please, use this Javascript code:

Code:
<!-- An HTML/Javascript code snippet for Ecwid to redirect continue shopping buttons to a custom page -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<script>
if (typeof(Ecwid) == 'object') {
  Ecwid.OnAPILoaded.add(function() {
    // Redirect address. Change it to the URL of page where you want to redirect your customers.
    // You can use absolute or relative addresses, e.g. 'index.html', 'http://google.com'
    var continueShoppingRedirect = "#!/~/category/id=0";
    // Delay (ms), which is necessary for the empty cart page to appear after onCartChange event firing
    var empty_cart_page_delay = 500;
    // Continue shopping buttons CSS selectors 
    // (you can remove the ones that you don't want to change behavior for)
    var buttons = [
      'div.ecwid-productBrowser-cart button.ecwid-btn--continueShopping', // Cart page
      'div.ecwid-productBrowser-cart-emptyCartPanel button.ecwid-btn--continueShopping', // Empty cart page
      'div.ecwid-productBrowser-OrderConfirmationPage button.ecwid-btn--continueShopping', // Order confirmation page
      'div.ecwid-productBrowser-SearchPage button.ecwid-btn--continueShopping', // Search results page
      'div.ecwid-Account-content button.ecwid-btn--continueShopping' // 'My account' pages
    ];
    // Pages (Ecwid.Page.type) where buttons should be customized
    // (you can remove the pages that you don't want to change the buttons on)
    var pages = [
        'CART', 
        'SEARCH', 
        'ORDER_CONFIRMATION',         
        'ACCOUNT_SETTINGS', 
        'ORDERS', 
        'ADDRESS_BOOK'
    ];
    
    // This function find the continue shoppign button on the page and replace it with a customized one
    var replaceButton = function() {
      var buttonObject = jQuery(buttons.join()).filter(":not('.clone'):visible");        
      if (buttonObject.length) {
        buttonObject.clone().addClass('clone').appendTo(buttonObject.parent()).click(function() {
          location.href = continueShoppingRedirect;
        }); 
        // Remove the original button
        buttonObject.remove();        
      }
    }
    // Replace the button on page loading
    Ecwid.OnPageLoaded.add(function(page) {
      if (jQuery.inArray(page.type, pages) >= 0) {        
        replaceButton();
      } 
    });
    // Replace the button on the empty cart page after clearing the cart 
    // (it doesn't fire onPageLoaded event)
    Ecwid.OnCartChanged.add(function(page) {
      setTimeout(replaceButton, empty_cart_page_delay);
    });
  });
}
</script>
You should replace this piece of code #!/~/category/id=0 (line #8) with the URL address where you'd like to direct the 'Continue Shopping' button. Add the Javascript code in the source code of the page where you have your store installed after Ecwid integration code. You can do so in the admin area of your site.

If you have other concerns, please feel free to write me back and it will be my pleasure to assist you further. Have a wonderful day!
__________________
Wendy
Ecwid Customer Care Team
Help Center


⬇ Please click Thanks if my reply helped you.