• Welcome to KonaKart Community Forum. Please login or sign up.
 

Digital download inventory

Started by msirak, July 01, 2008, 10:12:58 pm

Previous topic - Next topic

msirak

Hi,

I have entered two type of products: physical and downloadable. I would like to have Konakart keep track of inventory so I checked 'Subtract Stock' in Admin Config. But this way the quantity of digital downloads is also reduced. Am I doing sg wrong? How can it be fixed?
Also if quantity reaches 0, products_status is set to 0 -> it is not displayed. I can see an option to 'Allow checkout' (I guess without product in stock), but none to display if out of stock. I would need to display the product, but not allow checkout (if out of stock). How can it be achieved?

Another question regarding tax calculation: If unit price is 12.50 and tax/unit is let's say 1.6255. So unit price (rounded to two decimals) is 14.13. But if calculated for 100 units then I get 1412.55 instead of 1413 (which I personally think is correct, but accountant would like to see 1413). Can Konakart be configured to use/switch to gross unit price when calculating price for more than 1 unit?

Thanks,

julie

Quote
I have entered two type of products: physical and downloadable. I would like to have Konakart keep track of inventory so I checked 'Subtract Stock' in Admin Config. But this way the quantity of digital downloads is also reduced. Am I doing sg wrong? How can it be fixed?


This is done on downloadable products just as an alternative way for you to keep track of how many digital downloads you have sold. All you need to do is to set it to a high number if you don't want it to go below zero.

Quote
Also if quantity reaches 0, products_status is set to 0 -> it is not displayed. I can see an option to 'Allow checkout' (I guess without product in stock), but none to display if out of stock. I would need to display the product, but not allow checkout (if out of stock). How can it be achieved?


You could customize the AddToCart* actions to not add the product to the cart if the quantity is below your required level. To do this you first add the product ( kkAppEng.getEng().addToBasket(kkAppEng.getSessionId(), kkAppEng.getCustomerMgr().getCurrentCustomer().getId(), item); ). Then you use the updateBasketWithStockInfo() method and if the stock is below your required level you can remove the basket item and forward to a page where you explain that it cannot be added to the basket because it is out of stock. If you leave it there, then you should call BasketMgr().getBasketItemsPerCustomer() to refresh the basket tile on the UI.


Quote
Another question regarding tax calculation: If unit price is 12.50 and tax/unit is let's say 1.6255. So unit price (rounded to two decimals) is 14.13. But if calculated for 100 units then I get 1412.55 instead of 1413 (which I personally think is correct, but accountant would like to see 1413). Can Konakart be configured to use/switch to gross unit price when calculating price for more than 1 unit?


There is no configuration variable for this but it is relatively easy to customize using the new customization framework. The method you need to customize is createOrder(). Once the engine has created the order, you can iterate through the order products and recalculate the tax for each each one using your rules.