Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Custom Add To Cart Button with AJAX Possible? 4.3

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 05-28-2010, 04:00 PM
 
macgirl macgirl is offline
 

Advanced Member
  
Join Date: Apr 2006
Posts: 41
 

Question Custom Add To Cart Button with AJAX Possible? 4.3

Way too much CSS going on, I'm not sure what to change when I look at the button.tpl file.

I have different graphics I want to use for the Add To Cart button. What do I need to change to update JUST the Add to cart button and not the others?

Thanks!
__________________
xcart gold v.4.2.2
Reply With Quote
  #2  
Old 05-28-2010, 04:22 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: Custom Add To Cart Button with AJAX Possible? 4.3

Buttons in xcart are ridiculous and hard to work with. To change only add to card open button.tpl and add another condition to use your graphics, something like

if $mycondition eq "y"

and then everywhere where add to card buttons is call you have to add mycondition="y" to the include
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #3  
Old 05-28-2010, 08:52 PM
 
macgirl macgirl is offline
 

Advanced Member
  
Join Date: Apr 2006
Posts: 41
 

Default Re: Custom Add To Cart Button with AJAX Possible? 4.3

that's ridiculous and inefficient, I can't believe they would build a cart that didn't allow you to simply change a button design.. Thank you for your help, but I have no idea where to put it, and I think after hours of trying, I'm just beat. Maybe there's a mod out there for this, I'll have to check.

Thanks again..
__________________
xcart gold v.4.2.2
Reply With Quote
  #4  
Old 05-29-2010, 07:36 AM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Custom Add To Cart Button with AJAX Possible? 4.3

If you want some help just shoot me an email.

ashley@arwvisions.com
__________________
xcart 5.1.2
Reply With Quote
  #5  
Old 05-29-2010, 01:01 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: Custom Add To Cart Button with AJAX Possible? 4.3

Quote:
Originally Posted by macgirl
that's ridiculous and inefficient, I can't believe they would build a cart that didn't allow you to simply change a button design.. Thank you for your help, but I have no idea where to put it, and I think after hours of trying, I'm just beat. Maybe there's a mod out there for this, I'll have to check.

Thanks again..

You can contact me at the email in my signature, I can help you with this
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #6  
Old 06-01-2010, 11:20 PM
 
spence888mph spence888mph is offline
 

Newbie
  
Join Date: Jul 2008
Posts: 4
 

Default Re: Custom Add To Cart Button with AJAX Possible? 4.3

man if someone could post a nice solution for this and to get the ajax minicart out of the dialogue box with clean code.... that would be very nice....

if you want to PM me with a quote I will pay NOW! need this asap!
__________________
A Few v4+ Xcarts
Reply With Quote
  #7  
Old 02-19-2011, 12:08 AM
  enterfusion's Avatar 
enterfusion enterfusion is offline
 

Advanced Member
  
Join Date: Mar 2004
Location: Pittsburg, CA
Posts: 70
 

Default Re: Custom Add To Cart Button with AJAX Possible? 4.3

I have to agree, we had some developers work on changing our cart around, now the ajax buttons don't work, spent three hours on it, but had to come up with a hack workaround cause I didn't know how to fix the this.box.length issue.

The code for changing this out as a animated gif is overly complex, they would have done better to just swap out the entire button element and then put it back when done, but they are doing all sorts of nasty stuff with the DOM and looking for span tags with specific classes attached to them like span.button-right and span.button-left, all I can say is I never would have designed something so overly complicated.

THIS IS WHAT I HAD TO CHANGE (bad workaround) if someone could tell me the real issue, I would like to know.

// Widget :: check - ready widget or not
ajax.widgets.add2cart.obj.prototype.isReady = function() {
this.box.length = 1; //new code added for fix to problem
return this.form.length > 0 && this.productid > 0 && this.box.length > 0;
}
__________________
-Eric

X-cart 4.3.2 up and running.
Apache, PHP 5.2, APC, Redhat, Checkout One, On Sale, Smart Search, Remember Cart.
Lots of other customization's, but perhaps typical of x-cart installations.

X-cart 5 sort of in limbo, trying to make things work without much luck.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 11:30 PM.

   

 
X-Cart forums © 2001-2020