Closed (fixed)
Project:
Commerce Core
Version:
7.x-1.x-dev
Component:
Contributed modules
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
18 Jan 2011 at 09:42 UTC
Updated:
8 Mar 2013 at 15:37 UTC
Jump to comment: Most recent file
Comments
Comment #1
ikos commentedPatch to add this action.
Comment #2
ikos commentedComment #3
xibun commentedgreat idea - I believe this should be on by default. at first review (of Drupal Commerce) I lost quite some time "finding" my created products. I believe without such a function new users might give up on Drupal Commerce.
Comment #4
thill_ commentedI have two questions about this.
1. Would it work with something like http://drupal.org/project/commerce_feeds where the products are not created through the UI. I guess it depends if the the module creating the entity does it the same way as the UI does.
2. Is there a way to group products. For instance if I import 15 product entities and I want 5 grouped in each of three node it seems like i could indicate which entities on my csv should be grouped.
Comment #5
ikos commentedThe idea behind this patch / rule is for the absolute basic use case where a beginner user just wants a display version of their product- it might help get through the early learning curve.
Once the user understands the concept, they would be able to make more "powerful" display nodes manually.
On the feed issue, I think this would work as the rules trigger should be activated by feeds creating a new entity.
Comment #6
rszrama commentedI think we may be able to do this without a custom action... although setting a product reference field value through Rules has been hairy for me thus far. Also, do you think there needs to be some option to redirect to the edit form of the newly created node? Maybe we can get a list of the workflow - I think Bojhan wanted to review this today, too.
Comment #7
pcambraThis is related #971484: Using Rules to reference the newly created product in a product_reference field
Comment #8
rszrama commentedHmm, so I think this is a contributed module concern, not the concern of the core modules. Switching the component but leaving postponed in case anyone wants to start such a project and move this issue to it.
Comment #9
WilliamV commentedWhat is the best approach: creating a node that autocreates a product or creating a product that autocreates a node?
This is an ingenious action and needs to be considered immediately?
Thx & Grtz.
Comment #10
rszrama commentedIt can go either way... really depends on the site. Additionally, such a rule really won't work unless the module it's a part of defines the node type that should have the product reference field. But either way, Rules will support it.
Comment #11
WilliamV commentedSo it can be applied with current state of modules?
As i understand, for each product there must be a product display so... this is a superb way in approaching this vision no?
Thx & Grtz.
Comment #12
WilliamV commentedPlease advise.
Comment #13
torgospizzaRyan, we talked about this a little at DrupalCon. Is what you're saying here - about Contrib space - still valid after talking about it? I forget what your conclusion was but either way, I'm gonna subscribe to this thread :)
EDIT: This seems to be related and includes an exported Rule that may be a viable solution: #971484-16: Using Rules to reference the newly created product in a product_reference field
Comment #14
pachus commenteddid someone tried that rule? couldn't make it work.
Comment #15
anthonyR commentedUsing the patch from #1 in a custom module. It's working for my simple testcase.
Comment #16
oz_an commentedIn my case I had to change
$node->field_product['und'][0]['product_id'] ...to$node->field_products['und'][0]['product_id'] .... Thank you for the patch.Comment #17
rfayI hope everybody here knows about the new Commerce Product Display Manager, which is a very nice way to do this.
In fact, I'll call this fixed because of that and the processes mentioned in this issue.
Comment #18
torgospizzaBrilliant! Thanks for letting us know, Randy!
Comment #20
vthirteen commentedone of the main problems of the rules method and the http://drupal.org/project/commerce_product_display_manager module is that there's no automatic way to set a taxonomy for a product display.
so, what about at least an option (or a rule?) to redirect from the completed commerce product creation form to the edit form of the product display, possibly prepopulating at least the product reference field?
it would still be a 2-step process, but at least users wouldn't get lost in between from the 1st step (commerce product creation) to the 2nd (product display creation).
setting this issue as active again, just in case.
Comment #21
rszrama commentedI'd just go ahead and post your issue as a feature request to that module. From a Rules standpoint, there's already the ability to redirect to different URLs (such as node/[nid] of the newly created display node), so there's nothing from a core Commerce perspective more that needs to be done here.
Comment #22
carn1x commentedsubscribe
Comment #23
jax commented#1300170: Rules to mirror product displays when products created/updated/deleted Issue about creating a default ruleset for commerce
Comment #24
flefle commentedikos: Works like a dream, thank you! I've had to fish out the code and put it within Drupal commerce kickstart file at (as):
"profiles/commerce_kickstart/modules/commerce/modules/line_item/commerce_line_item.rules.inc":
Thank you!
Comment #25
flefle commentedHere's the patch to it:
Comment #26
total_slavery commentedthe patch don't work when i try to apply it i get
fatal: corrupt patch at line 53
Comment #27
bogdan1988 commentedFor automatic product display creation and synchronization you can use this module http://html-and-cms.com/blog/drupal-commerce-automatic-product-display-g...
Comment #28
jax commentedJust created a sandbox module that does this: http://drupal.org/sandbox/jax/1920656
I need to test it somewhat more before I promote it to a full project.
And of course, it already existed, http://drupal.org/project/commerce_auto_product_display
Comment #29
summit commentedHi, what is the difference betweeen this sandbox and commerce_auto_product_display please?
Thanks a lot in advance for telling this.
greetings, Martijn
Comment #30
sportel commentedHi Jax,
Whats the difference between your sandbox module and Commerce Auto Product Display?
Thanks,
Mike.
Comment #31
jax commentedI haven't tested the commerce auto product display yet but at first glance the main difference is that my module completely replaces the node edit form. If you're viewing a product display and click edit you will actually be editing the product instead of the product display.
In that setup you don't even have to explain the concept of product displays to the people that will be managing the products. As site builder you create a product display, link it to the product and in the module's configuration you indicate that it should be managed by the commerce_simple module.
Then the people that need to manage products can only add products and when they click edit on the product display view page they will be editing the product. It completely hides the product display concept.