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

update qty cart.tpl

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 11-18-2009, 06:46 AM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

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

Default update qty cart.tpl

When the qty is updated in cart.tpl, if the qty entered is greater than the qty available the number is automatically reduced to the max number of products on hand. This is good.

But the custoemr is not notified of this. How do I add an alert box that says "The updated quantity you requested is greater than our quantity in stock. We have adjusted the quantity ordered to match the maximum quantity of this product we are able to ship"

thx, Ash
__________________
xcart 5.1.2
Reply With Quote
  #2  
Old 11-18-2009, 02:36 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: update qty cart.tpl

In the template you can probably do something like
if number_in_text_box equal $product.avail then show message

Not sure about exact variables available there right now. If this works note that if you have 5 items available and cutomer enter 5 or mre then 5 they will see same message so you may wanna change the message a little bit to more generic one
If this doesn't work you have to edit cart.php and find the code that takes the number entered and compares to product availability
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #3  
Old 11-18-2009, 04:07 PM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

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

Default Re: update qty cart.tpl

the href is this

href="javascript: document.cartform.submit()"

Is this done by javascript. where would I FIND THIS CODE?

Ash
__________________
xcart 5.1.2
Reply With Quote
  #4  
Old 11-19-2009, 05:03 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: update qty cart.tpl

This just says submit form named cartform located in current page
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote

The following user thanks cflsystems for this useful post:
Ashley (11-19-2009)
  #5  
Old 11-19-2009, 08:32 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: update qty cart.tpl

I gave up, and sent it on to my programmer Couldn't figure it out.
__________________
xcart 5.1.2
Reply With Quote
  #6  
Old 11-19-2009, 02:48 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: update qty cart.tpl

I didn't try it but just like almost everything we do you will be suprised at the end how simple it was. Probably
Let us know how it turns out. This should be default behaviour in xcart
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #7  
Old 01-16-2010, 01:20 PM
 
myrepnet myrepnet is offline
 

Newbie
  
Join Date: Dec 2009
Posts: 7
 

Default Re: update qty cart.tpl

Any update on this? I'm trying to do the same thing.
__________________
X-Cart Pro 4.3.0
X-Mall
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 07:51 PM.

   

 
X-Cart forums © 2001-2020