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

Add to Cart button - ajax refresh to Checkout button

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-28-2011, 12:37 PM
 
ScrapOrchard ScrapOrchard is offline
 

eXpert
  
Join Date: Mar 2008
Posts: 243
 

Default 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?
__________________
www.scraporchard.com
X-Cart Pro Version 4.5.5

Altered Cart: One Page Checkout, OnSale, Buy Together, Download Expander, Smart Search, Shop by Filters
Gahela: Gahela Support System
The xCart Store: xBanners, xAccess, xMenus
Reply With Quote
  #2  
Old 03-29-2011, 01:04 PM
 
ScrapOrchard ScrapOrchard is offline
 

eXpert
  
Join Date: Mar 2008
Posts: 243
 

Default 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?
__________________
www.scraporchard.com
X-Cart Pro Version 4.5.5

Altered Cart: One Page Checkout, OnSale, Buy Together, Download Expander, Smart Search, Shop by Filters
Gahela: Gahela Support System
The xCart Store: xBanners, xAccess, xMenus
Reply With Quote
  #3  
Old 04-06-2011, 12:33 PM
 
ScrapOrchard ScrapOrchard is offline
 

eXpert
  
Join Date: Mar 2008
Posts: 243
 

Default 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?
__________________
www.scraporchard.com
X-Cart Pro Version 4.5.5

Altered Cart: One Page Checkout, OnSale, Buy Together, Download Expander, Smart Search, Shop by Filters
Gahela: Gahela Support System
The xCart Store: xBanners, xAccess, xMenus
Reply With Quote
  #4  
Old 04-08-2011, 08:47 AM
 
ScrapOrchard ScrapOrchard is offline
 

eXpert
  
Join Date: Mar 2008
Posts: 243
 

Default 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?
__________________
www.scraporchard.com
X-Cart Pro Version 4.5.5

Altered Cart: One Page Checkout, OnSale, Buy Together, Download Expander, Smart Search, Shop by Filters
Gahela: Gahela Support System
The xCart Store: xBanners, xAccess, xMenus
Reply With Quote
  #5  
Old 04-27-2011, 09:13 PM
 
ScrapOrchard ScrapOrchard is offline
 

eXpert
  
Join Date: Mar 2008
Posts: 243
 

Default 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?
__________________
www.scraporchard.com
X-Cart Pro Version 4.5.5

Altered Cart: One Page Checkout, OnSale, Buy Together, Download Expander, Smart Search, Shop by Filters
Gahela: Gahela Support System
The xCart Store: xBanners, xAccess, xMenus
Reply With Quote
  #6  
Old 04-28-2011, 03:08 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default 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
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #7  
Old 04-28-2011, 10:13 AM
 
ScrapOrchard ScrapOrchard is offline
 

eXpert
  
Join Date: Mar 2008
Posts: 243
 

Default Re: Add to Cart button - ajax refresh to Checkout button

Thanks, Steve, Again, you rock!
__________________
www.scraporchard.com
X-Cart Pro Version 4.5.5

Altered Cart: One Page Checkout, OnSale, Buy Together, Download Expander, Smart Search, Shop by Filters
Gahela: Gahela Support System
The xCart Store: xBanners, xAccess, xMenus
Reply With Quote
  #8  
Old 07-21-2011, 01:03 PM
 
bobschwab bobschwab is offline
 

Newbie
  
Join Date: Jun 2011
Posts: 2
 

Default 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!
__________________
Company: http://wowwebworks.com
Currently using Version 4.4.5
Reply With Quote
  #9  
Old 09-07-2011, 02:34 AM
 
ScrapOrchard ScrapOrchard is offline
 

eXpert
  
Join Date: Mar 2008
Posts: 243
 

Default Re: Add to Cart button - ajax refresh to Checkout button

Quote:
Originally Posted by bobschwab
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!

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!
__________________
www.scraporchard.com
X-Cart Pro Version 4.5.5

Altered Cart: One Page Checkout, OnSale, Buy Together, Download Expander, Smart Search, Shop by Filters
Gahela: Gahela Support System
The xCart Store: xBanners, xAccess, xMenus
Reply With Quote

The following 2 users thank ScrapOrchard for this useful post:
totaltec (09-21-2011), webmaster@dekotile.com (10-25-2013)
  #10  
Old 09-21-2011, 02:05 PM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: Add to Cart button - ajax refresh to Checkout button

Quote:
Originally Posted by ScrapOrchard
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.
Aaah, one can often find treasures in the smallest place on this forum! This little comment saved me hours, thanks!
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 08:07 AM.

   

 
X-Cart forums © 2001-2020