| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
cart and fractional quantities | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() I have just begun playing around with this. I have products that I need to be able to ad fractional quantities such as 1.25 or 2.5. Unfortunately x-cart truncates these. I have adjusted the mysql pricing table to accept price breaks based on fractional quantities however cannot get the cart to handle this.
Can anyone give me a quick tutorial on the cart and how it operates? OR Has anyone preformed anything like this before? Thanks |
|||||||
#2
|
|||||||
|
|||||||
![]() I removed your second post on this, as you posted in a 3 year old thread
![]()
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#3
|
|||||||
|
|||||||
![]() Well...anyway...after way too much time spent on this I have resolved my issues. For anyone who comes across this in the next 3 years...here is the answer:
open cart.php and make the following changes remove the "floor()" functions in the "mode='add'" section remove the following around line 270 if ($amount < $added_product["min_amount"]) { func_header_location ("error_message.php?access_denied&id=31"); } Now in removing the check for min_amount you may want reconsider that. I have no worries about inventory and do not maintain that. By default you minimum amount will be 1. In addition to this I changed the stock text box for quantity with a drop down menu where I have determined the amount they can add to cart. This eliminates my concerns for user error when entering quantities. Hope this helps save someone time in the future! |
|||||||
#4
|
|||||||
|
|||||||
![]() Thanks for following up, always nice when someone actually posts a solution!
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#5
|
|||||||
|
|||||||
![]() While I found this post helpful in locating the code to change, it must be out of date. I am running X-Cart 4.1.9, and cart.php uses the intval fuction instead of floor. Also, there is code in includes/cart_process.php that call intval.
Perhaps the bigger problem is that X-Cart doesn't seemed to be designed with fractional quantities in mind. I'm implementing it for a fabric store, so this is kind of important to us ![]() This problem isn't really unique to X-Cart. We used to use OSCommerce, and I had to hack it to death to get fractional quantities to work.
__________________
Paul X-Cart 4.1.9 |
|||||||
#6
|
|||||||
|
|||||||
![]() Hi Paul, welcome to the forums. Please be sure to update your forum signature with your X-Cart version per the forum guidelines, as we can't assist you without it. The above post refers to an older version of X-Cart, so it is probably not going to work for you on 4.1.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
![]() |
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|