want to change default product quantity in ecommerce cart

Events happening in the community are now at Drupal community events on www.drupal.org.
sndpbohra's picture

actually when we click on "add to cart" link then it select product quantity 1 by default. but i want to change it 100 means when user click on "add to cart" default product quantity selected should be 100.

i am using drupal 6.X + ecommerce module

Please help

Comments

It should be a relatively

gordon's picture

It should be a relatively simple change, I have checked the code and it could be turned into a stand alone module which will allow you to set the default quantity of the product when the product is created and then during the adding of the product to the cart it will set the default.

This can be done via the http://api.drupalecommerce.org/api/function/hook_feature_ec_checkout_val... and alter the $qty field when it is added.

The $node, $qty, $data are actually past by reference so the can be changed without any difficulty.

Gordon.

--
Gordon Heydon

e-Commerce Module

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: