Closed (fixed)
Project:
Ubercart Restrict Qty
Version:
6.x-1.1
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
12 May 2010 at 22:35 UTC
Updated:
12 Mar 2015 at 15:10 UTC
Jump to comment: Most recent
Comments
Comment #1
victoria_b commentedHi,
I have to agree - great module but automatically setting a default quantity whenever a product is created would be fantastic.
Thank you.
Comment #2
jamestombs commentedI have tried using hook_cart_item() which worked, but once you modify the products attributes you can't seem to remove it from the cart afterwards.
I have got it working using hook_add_to_cart_data($form_values), which does seem to work.
If you make sure your node object is passed in as a '#type' => 'value' then you can check for product type and return:
This is my full code:
Comment #3
asb commentedsub
Comment #4
raulmuroc commentedClosed due to lack of activity.