View Single Post
  #1  
Old 08-26-2013, 01:14 AM
TG Data Service's Avatar
TG Data Service TG Data Service is offline
 
Join Date: May 2013
Posts: 6
Question Add element to the Cart page via Javascript

Hi,
I'm trying to add an element with javascript (basically i'm trying to add a custom button next to the checkout button) in the cart page. usually this works for other pages but this doesn't seem to work when i want to add the element in the table that the checkout button appears in on the cart page. I've been calling my addCustomBtn function within the OnPageLoaded but the element does not appear. However, if I add an element elsewhere in the page (for example I add a custom sub-title element) then it seems fine, it just seems to be that I can't add an element to the area that the checkout button appears in. Can anyone help me figure out why?

Ecwid.OnPageLoaded.add(function(page) {
if (page.type == 'CART') {
addCustomBtn();
}
});