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)
-   -   update qty cart.tpl (https://forum.x-cart.com/showthread.php?t=50814)

ARW VISIONS 11-18-2009 06:46 AM

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

cflsystems 11-18-2009 02:36 PM

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

ARW VISIONS 11-18-2009 04:07 PM

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

cflsystems 11-19-2009 05:03 AM

Re: update qty cart.tpl
 
This just says submit form named cartform located in current page

ARW VISIONS 11-19-2009 08:32 AM

Re: update qty cart.tpl
 
I gave up, and sent it on to my programmer :) Couldn't figure it out.

cflsystems 11-19-2009 02:48 PM

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

myrepnet 01-16-2010 01:20 PM

Re: update qty cart.tpl
 
Any update on this? I'm trying to do the same thing.


All times are GMT -8. The time now is 12:57 PM.

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