Closed (fixed)
Project:
Rules link event
Version:
7.x-1.0-alpha1
Component:
Documentation
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
21 Mar 2012 at 06:12 UTC
Updated:
16 Aug 2013 at 19:31 UTC
I don't understand how to use the module!
the only new event in rules after installing the module is "was accessed",
but where I can generate/chose the link?
I want to send a link in an email that when clicked triggers a rule set of actions.
thanks,
Federico
Comments
Comment #1
Coyote commentedYeah. I'm kind of confused about this also.
I created a test rule, set to fire on "was accessed"
I added no conditions (I also tried it with a condition that would automatically validate as true).
I attached an action to display a system message.
Nothing happens, ever.
Comment #2
Coyote commentedOkay, I think I figured out where part of the problem is, at least:
There was no way to access the config page. Don't know why, but hook_menu in your module was not allowing it to be created unless there was already a variable in rules_linkevent.
So, I set that to a value, then had to set the config page to an url outside the url structure for rules - nothing would get it to show up with the url you used, even after multiple cache refreshes.
I then set up values per the instructions on the form, recreated the action, and still nothing. Nothing happens either when visiting the url from the action, clicking a link to it, anything.
Comment #3
aidanlis commentedGo here, admin/config/workflow/rules/links to create a URL, then go and create a Rule.
Comment #4
federico.parra commentedlol, there is no such a menu.
That's the problem!
:(
Comment #5
aidanlis commentedDid you forget to install the module?
Comment #6
federico.parra commentedhaven't you read Coyote's comment #2? the module does not install correctly;
it doesn't display the rules/links menu. Of course I installed it, but it seems it doesn't work :(
Comment #7
deggertsen commentedThe patch in this issue fixes the problem. #1327396: Undefined Offset
However, it still doesn't address the missing documentation. There should, at a minimum, be some documentation that says what is explained in #3. Plus it would be VERY helpful to have an example link and rule created for that link just so end users can see the basics of how it works.
Comment #8
deggertsen commentedHere is something that could be used for some basic documentation for drupal commerce users. I have not tested it from a clean install, but it should work just fine once the patch in #1327396: Undefined Offset is committed.
Creating an add to cart link
Before following this tutorial be sure that you have Rules link event and Drupal Commerce installed on your site.
Go to admin/config/workflow/rules/links to create a link. For this example enter the following into the text area:
purchase|cart/add/%|Quick add to cart linkBe sure to click "Save Configuration" and then go to admin/config/workflow/rules/reaction/import to import the following rule:
Click Import and you're all set to create links throughout your site using cart/add/your_sku to create links that add product to the shopping cart. Be sure to replace "your_sku" with the SKU of the product you would like to have added to the cart when the link is clicked.
Comment #9
deggertsen commentedMarking as needs review as I believe #8 fulfills the requirements of this issue.
Comment #10
mrkrettan commentedDoes this work for multiple skus? Say I want to add product one and product two to the shoppingcart for whoever visits the url?
Comment #11
deggertsen commentedAs far as I know this module does not work for multiple skus. I suggest you open a new feature request issue addressing that rather than hijacking this one.
Thanks!
Comment #12
mrkrettan commentedOk, will do some more research and then maybe do that. Thanks!
Comment #13
silkogelman commented#8 works perfectly.
Thank you for providing this example deggertsen!
Note: when adding / editing your own Rule Link Events to admin/config/workflow/rules/links: make sure to clear the cache after doing this if your links don't work like they are supposed to.
Comment #14
aidanlis commented@deggertsen do you want to take over maintenance of this module? I'd love you to!
Comment #15
deggertsen commentedI've never been a module maintainer before and am frankly not much of a programmer, more of a site builder. I'm happy to help where I can though, but I'm not quite sure where to get started.
Comment #16
aidanlis commentedAh you'd need to be familiar with programming and version control ... let me know when you've skilled up! :)
Comment #17
deggertsen commented@aidanlis I've spent some time studying up on version control and have brushed up quite a bit on my php (though I'm still no expert). If you're still interested I would be willing to do what I can to help maintain the module. This would be a first for me, but I think it's about time for me to jump in.
Comment #18
aidanlis commentedSounds good buddy, I've added you to the list of maintainers, good luck!
Comment #19
akalata commentedAdded a workaround for multiple skus at #2053297: Workaround for multiple skus so as not to derail this issue. :)
Comment #20
deggertsen commentedI'm going to mark this as fixed since I have added a documentation link to the project page. Please feel free to contribute your example rules and any other ideas and documentation that may be useful there.
https://drupal.org/node/2056717