CS-Cart Module Float Stock allows you to sell products using float stock. It is usable for such products as cloth (meters), vegetables (kilos), gold (gramms) e.t.c.
Features
- Ability to set product as packs or fractional pieces
- Ability to set step for the "qty" field at the product view page (as global as for each product)
- Ability to set label for the "qty" field (m, cm, gr.) as global as for each product
- Ability to create and edit orders from the admin panel using float product values
- Placing qty label to such places as cart content, order details e.t.c.
- Works with product options combinations
- Ability to set float minimum order amount in product settings
- Abillity to edit fractional settings globally
- Ability to import - export fields "Allow fractional amount", "Product amount label", "Product amount step" with CSV file
By the first, you should add the following lines to the app/functions/fn.cart.php file
fn_set_hook('check_amount_in_stock_min_qty', $product, $min_qty, $product_id);
to
Next
fn_set_hook('add_product_to_cart_post_normalize_ammount', $product_id, $amount, $data);
here
And
fn_set_hook('update_cart_products_normalize_amount_post', $amount, $v);
here
To allow float stock for the product you should go to the product edit page - module tab and set up the following settings:
Sale Type is a setting that defines if product will sell as fractional amount or packs. When packs are selected is sells as integer, but shows an amount in one pack and total selected amount.
Product amount step - value, that product qty field will be changed by when press + or -
You can set this value globally in module settings or for some product particularly.
Also in this case, when add product to cart, value will be rounded to 1 sign after dot.
Product amount label appears near the label of the "Quantity" field at the product page.
It could be set particularly for each product or globally using the product_amount_postfix_val language variable.
You can set the minimum order quantity for that product as float number in the "General" tab.
Also u can set this setting globally in module settings.
You can import - export values of this modue using default CSV product export.