I have created a module that I think is pretty darn nifty.
You can create a product that has two options to chose from. Its a mix between subproduct.module and parcel.module except that the customer can choose the subproduct from a list that you specify.
In order to view the options that the customer has chosen you need to add a couple of lines of code to cart.module and store.module. I should make a patch for this, but you can see what I am talking about in install.txt file.
Please try it out and let me know if it works for you.
alynner
Comments
Comment #1
alynner commentedI have updated this module:
- now you can have one, two or three options
- you can specify if you would like a select list or radios for each option
- you can specify the name of the option
I have included a new database table, so if you tried it already you need to reinstall completely.
The idea with this module is that you can specify 'two for one' or package sales, but the customer can choose options, rather than just having static options as per parcel.module.
alynner
Comment #2
alynner commentedadded shippable and stock features, but the stock only applies to the package (parent) item.
Comment #3
alynner commentedUPDATE:
includes out of stock abilities for sub-items
Comment #4
jsydelko commentedGreat module, I have your last revision up and running! One request, can you have the option to force a selection from your choices. Right now someone can add my dynamic parcel to their cart without selecting any of the products.
Thanks for the great work,
Jeff
Comment #5
alynner commentedthis version has the ability to add more quantities to the cart.
Its not great though, I will look into making the ability to change the quantity of the subproducts which, in turn, changes the quantity of the main product.
I put the '#required' => TRUE code on the subproduct fields, but it doesn't seem to validate - it still lets you add to cart. Anyone have any thoughts on this?
cheers
alynner
Comment #6
StevenSokulski commentedI downloaded your latest version and installed in. Now it appears nothing has changed. Point me to where the settings/functionality for this module is.
Thanks.
Comment #7
alynner commentedthere are no settings to configure, it is just a node type essentially.
The last version would only allow you to enter the item once and would switch the "add to cart" button to "remove from cart"; this version allows you to add the (parent) item more than once. It just doesn't show quantities of the subitems, which is on the wishlist. It wasn't a big change.
alynner
Comment #8
coupet commentedGreat module!
patch status of
Comment #9
rudolphp commentedHi , Thanks for this module. I am getting the below error when I submit a new product. what am I missing. Its a flexinode that has been transformed to a products using product_transform module
Fatal error: Call to undefined function: currency_api_convert() in /home/omved/public_html/modules/ecommerce/dynamic_parcel/dynamic_parcel.module on line 278
Thanks
Rudy
Comment #10
alynner commentedsorry I added functionality to use currency conversion module. I must have forgotten to take that out before I uploaded the latest version. I am away from my office at the moment but when I get back next tuesday I will fix the error.
alynner
Comment #11
alynner commentedTo fix the currency error, simply delete lines 275 to 283 or you can change line 275 from:
if ($teaser == 0 ){to:
if ($teaser == 0 AND module_exist('currency')){which is what I did for my site.
alynner
Comment #12
machead_uk commentedHello. I am a newbie but I guess you have to start somewhere.
I am fetting really frustrated with the ecommerce functionality in Drupal 4.7.x.
I have a couple of days max to get this site live and the customer is freaking out.
To give you a clue of what I am trying to achieve the store will be selling clothing items that have to be fitted close to the body and do not stretch much so a size has to be entered when you have chosen your specific item. Then it will use a bit of Javascript to populate various measurements fields based on that clothing size. Those fields are things like "hips", "Bust", "Waist" etc. I have the Javascript to do that. Theese fields that get populated are editable too so the buyer can put in a custom measurement for their bust or waist etc if needed. Now here comes my issue: I can't see how you can add these custom fields to a product so you can successfully send them over to the shopping cart.
I was wondering if dynamic_parcel.module and CCK would be the answer but I really don't know if it will work.
I am also getting warnings when selecting "dynamic collection of products" in the Add Content sub menu.
warning: Invalid argument supplied for foreach() in /my/path/to/drupal/includes/form.inc on line 655
Please could you tell me what might cause this?
I have not made the changes in store.module or cart.module yet as requested by the installation instructions. I didn't think adding new products touched that part of the code when adding products.
I have also tried it with and without parcel.module and subproducts.module enabled (no difference).
Thanks in advance for your help.
Paul
Comment #13
alynner commentedI've looked through the code and there are only a couple places that I use foreach (when saving, viewing, or listing in the invoice) so your error isn't really making sense to me. Does it happen when you first open the page to create a product, or does it happen when you submit? I could only see it happening maybe when you submit if you don't enter anything in the options.
This module just requires the tangible module, it doesn't rely on subproducts or parcel.
I'm not sure if this module will fit your needs as is because the options consist of existing products, they aren't quite as dynamic as the javascript that you mentioned, but you may be able to modify it to suit your needs.
Just a note, the existing products used for options don't have to be published - this is how I have done sizes, so they don't show up in the main product page.
If you have any more info or insite into the error you are getting, I'd be happy to see if I can figure out what is going on.
cheers
alynner
Comment #14
darren ohSubscribing.
Comment #15
brmassa commentedGuys,
these errors were fixed on eC4.
regards,
massa
Comment #16
(not verified) commentedComment #17
daddison commentedI'm trying to get this to work on an old installation of 4.7 (though I'd rather have it for 5.x). Where are the instructions for creating the tables
ec_product_dynamic_parcelandec_product_dynamicreferenced in the module?And are there any plans to port the code to newer versions of Drupal? I'm willing to help with that.
Comment #18
weedoo commentedTrying to convert to 5.34
Comment #19
weedoo commentedComment #20
weedoo commentedComment #21
BobbyDigital commenteddoes this work with files? I know the regular parcel module doesn't... I was hoping this might be able to handle that.
Comment #22
oldrobb commentedDid you succeed in making a 5.x version? I'd find that very useful as I hadn't realised that Parcel wouldn't fullly support Subproduct...
Comment #23
gordon commented