Post by anilmp40 » Fri Sep 27, 2013 8:56 pm

hello,
i want to add drop down list in product quantity which also includes decimal points.
have any extensions for opencart 1.5.5.1 version which support this type of functionality.
how can i include decimal drop down in product quantity.

Newbie

Posts

Joined
Fri Sep 27, 2013 8:39 pm

Post by opencart.customize » Thu Oct 10, 2013 12:24 pm

Hi

do you mean

>add drop down list in product quantity which also includes decimal points
you need to sell something like sugar of the quantity like 1kg.100 grams?

... Sending you more questions to PM

Opencart custom mods & support for custom development projects.
Category Product Filtering by BRAND http://www.phpcmsmodx.info/opencart153/ ... ry&path=18

Build your own product, Bulk order, and many more..


User avatar
New member

Posts

Joined
Wed May 30, 2012 2:34 pm

Post by anilmp40 » Thu Oct 10, 2013 1:30 pm

i want in quantity something like 1.5kg or 0.25kg.
example http://www.buysubzi.com/index.php?page= ... &Itemid=53
you can see product quantity at above page link.

Newbie

Posts

Joined
Fri Sep 27, 2013 8:39 pm

Post by opencart.customize » Fri Oct 11, 2013 3:37 am

OK, I have just quickly changed (customized opencart core file of MVC instead of making the VQmod) the

Code: Select all

system/library/cart.php
in function

Code: Select all

public function add($product_id, $qty = 1, $option = array()) {
lines

Code: Select all

$this->session->data['cart'][$key] = (int)$qty;
and

Code: Select all

$this->session->data['cart'][$key] += (int)$qty;
to go without int but with float. So, after that the qty does not get transformed to integer but gets transformed to floating format.

Testing this here http://www.phpcmsmodx.info/opencart153/ ... uct_id=164 on one of my dev sites for a WEIGHT 63g product it's possible to buy 1.3 of the 63g.

Hope it helps but do not forget to better do ot via vqmod

Attachments

Screenshot-159.png

screenshot : WEIGHT 63g product - possible to buy 1.3 of the 63g. - Screenshot-159.png (259.07 KiB) Viewed 1555 times


Opencart custom mods & support for custom development projects.
Category Product Filtering by BRAND http://www.phpcmsmodx.info/opencart153/ ... ry&path=18

Build your own product, Bulk order, and many more..


User avatar
New member

Posts

Joined
Wed May 30, 2012 2:34 pm
Who is online

Users browsing this forum: No registered users and 4 guests