X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Custom Add To Cart Button with AJAX Possible? 4.3 (https://forum.x-cart.com/showthread.php?t=53959)

macgirl 05-28-2010 04:00 PM

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!

cflsystems 05-28-2010 04:22 PM

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

macgirl 05-28-2010 08:52 PM

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

ARW VISIONS 05-29-2010 07:36 AM

Re: Custom Add To Cart Button with AJAX Possible? 4.3
 
If you want some help just shoot me an email.

ashley@arwvisions.com

cflsystems 05-29-2010 01:01 PM

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

spence888mph 06-01-2010 11:20 PM

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!

enterfusion 02-19-2011 12:08 AM

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;
}


All times are GMT -8. The time now is 11:34 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.