| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
update qty cart.tpl | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
![]() 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 |
|||||||||
#2
|
|||||||||
|
|||||||||
![]() 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 |
|||||||||
#3
|
|||||||||
|
|||||||||
![]() 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 |
|||||||||
#5
|
|||||||||
|
|||||||||
![]() I gave up, and sent it on to my programmer
![]()
__________________
xcart 5.1.2 |
|||||||||
#6
|
|||||||||
|
|||||||||
![]() 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 |
|||||||||
#7
|
|||||||
|
|||||||
![]() Any update on this? I'm trying to do the same thing.
__________________
X-Cart Pro 4.3.0 X-Mall |
|||||||
|
|||
X-Cart forums © 2001-2020
|