![]() |
Add to Cart button - ajax refresh to Checkout button
Okay, so I have kind of figured out how to get the Checkout button to appear after the ajax refresh when a customer clicks on Add to Cart. What I don't like is how the Add to Cart button appears for a couple seconds after the "Added" message disappears. Is there anyway to make the transition to be smoother?
Add to Cart button --> Added --> Checkout button instead of Add to Cart button --> Added --> Add to Cart button --> Checkout button? Example product: http://scraporchard.com/market2/product.php?productid=17534 Also, all of our products are digital and in theory should only ever be able to be added to the cart once. I have noticed tho, if I add a new product to the store and don't immediately assign a download to it, the cart will allow multiple clicks on "Add to Cart" even after I have added a download. However, if I add a new product and immediately attach a download to it, the cart will not allow multiple clicks on the "Add to Cart" button (which is actually what I would prefer). Is this just one of those buggy things or? I would like to change the error message from Error to "Item Already in Cart" or "Already Added", but the message is too long and I cannot figure out how to change the width of the Add to Cart button to accommodate the longer message... any ideas? |
Re: Add to Cart button - ajax refresh to Checkout button
Can anyone point me in the direction of where there might be information on the buttons and how they work, how to change/style them?
|
Re: Add to Cart button - ajax refresh to Checkout button
Anyone? I am assuming there is some sort of delay in the ajax code which probably needs to be tweaked? If this is the case, does anyone know if the delay includes the time during which the Add to Cart button turns into Added or the time after?
|
Re: Add to Cart button - ajax refresh to Checkout button
I looked thru all quite a few of the *.js and ajax php/tpl files and I cannot really pin-point a delay or "timer" anywhere... does anyone know where the code for the ajax Add to Cart button on the product details page is located or where I can find what is controlling the length of time between when the button is clicked, the message "Added" appears, and ajax product_details.tpl refresh occurs.... anyone?
|
Re: Add to Cart button - ajax refresh to Checkout button
So anyone have any idea where the delay for the ajax refresh on the product pages/add to cart button is controlled?
|
Re: Add to Cart button - ajax refresh to Checkout button
That would be /skin1/customer/ajax.add2cart.js for 4.3.x, try the "timeout" setting
|
Re: Add to Cart button - ajax refresh to Checkout button
Thanks, Steve, Again, you rock!
|
Re: Add to Cart button - ajax refresh to Checkout button
I am new to X-Cart and learning my way around, would you be willing to share your adjustments to the "Add To Cart" button that switches to a "Go To Checkout" button? I really like what you have done on your website with that button. Thanks!
|
Re: Add to Cart button - ajax refresh to Checkout button
Quote:
Sorry for the delay in my response! I actually made a second /skin1/customer/main/product_details.tpl (I believe that is the correct template name) and called it product_details_re.tpl. In the product_details_re.tpl file, I changed the Add to Cart button to a Checkout button (that I grabbed from the cart.tpl). Then in the include directory, look for func.ajax.php, open it and do a search for product_details.tpl and change that to whatever you named your second/duplicate product_details template. There are a couple things, though, for instance, we have AlteredCart's Download Expander installed, and it displays some download information for the product.. on our product_details_re.tpl, the download information was not displaying after the refresh... so we had to contact support and get assistance with that. I don't know exactly the terminology or process, but if you have a mod 'running' in the product_details.tpl, you have to call those files/scripts within the func.ajax.php file. I am positive, there is probably a much more eloquent, less 'clunky' way to do it.. but, I haven't quite found/figured out what it is! |
Re: Add to Cart button - ajax refresh to Checkout button
Quote:
|
All times are GMT -8. The time now is 03:31 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.