Rules distance calculator for Drupal Commerce
Hi,
So for Drupal Commerce, Rules is used for calculating shipping.
In my case, I want to calculate shipping based on distance...EG:
0 - 25 miles FREE
25 - 50 miles £10
50 - 100 miles £25
This would require that rules takes the customer postcode, and compares it to my postcode using Google Maps to find out the distance, and then spits out the price.
The problem is I have no idea how to do this in Rules! So any help would be very much appreciated.
Magento Cart have something similar as a plugin, but I've seen nothing for any other ecommerce systems.
Many thanks, Joe
Read moreRules email action "from" field
Hi I'm new to using Rules in D7. I'm on Rules 7.x 2.3.
I've setup a relatively simple rule to send an email to users of a specific role when a new piece of content of type X is saved.
I'm in development and testing with the site, so started off with sending the emails from the default (my primary email), but went back in and edited the rule to come from an email that belongs to the client.
Read moreA question if I am on the right track.
Hello all,
I don't really know if my question is right here. So I'll just go ahead and ask. I've been building a little social site for friends and family. But I am having a hard time setting up certain rules.
This may be because what I am trying to is not possible with rules. Or because my understanding of rules and the language used within isn't adequate. Anyway here it goes:
As with most social sites my site (https://www.zooot.net) is very selective about who gets to see what. To achieve that I based my whole site on "Organic Groups".
Read moreSetting data value to a list (text) field
Hi,
I have two content types they both have a field which is a list (text) field, and this field has been setup identically in both content types. As part of a rule set I am creating I need to take the value from one of these list (text) fields and set data in the other list (text) field. As experienced Rules people might know, doing this with "set a data value" gets the error "data selector (insert chosen field) for parameter data is invalid. Yet with same data chosen I can set a standard text field.
Read morevarios rules to rule set
Hi there, I need some help to get the proper set up working as needed.
I use Field formatter conditions, Rules and ImageCache Actions to set an image overlay when a node belongs to certain term ... That works just fine.
However, I need to set different image overlays for different terms and not sure how to accomplish this.
Read morehow can i get returned values from rules_invoke_event_by_args ?
Hi i have created my own events and actions.
I am invoke Events programmatically and when the conditions are met i want my actions to return some sort of value to the invoker function.
to trigger the event i use
rules_invoke_event_by_args();
this can be done with some global parameters.
is there a cleaner way of doing it with rules.
Cheers,
avinoam
Using rules to disable flag access
Hi everyone. I'm a beginner on drupal and I'm building a site with booking management with rules and flag module. I met problems when implementing booking function,which disables flagging to user roles on specific node(content type) when exceeding limitation. Actually I have two plans, one is to hide the flag link, the other is to remove flag access on node with user roles, but I can't make either with actions provided by rules. Any suggestions? Of course not to implement the hook_flag_access() :(.
Read moreUsing VBO to change workflow state at cron maintenance
Hi,
I wanted to use a triggered rule with a VBO action to change a workflow state on some contents of a content type depending on the time the action is being executed.
The view works well when I execute it as authenticated user (I must be authenticated with a proper role because corresponding contents are not public).
But, when the action is called at maintenance cron runs, no user is logged and no content can be changed !
Can't set data value using a filename
I am trying to set the data value of a text field using the filename of attached image but I can not figure out how to do this. I can access the fid and many other values but not the filename.
this works
print $node->field_photos[$node->language][0]['fid']; this does not
print $node->field_photos[$node->language][0]['filename']; Any suggestions?
Thanks
Rules and Token Conversion Issue
Notice: Array to string conversion in RulesTokenEvaluator->evaluate() (line 203 ...)
I have the following code in a computed_field, its saving the values correctly and showing it in the display without issue.
$participant = array_pop(array_pop(field_get_items($entity_type, $entity, 'field_activity_participants')));
$email = db_query("select field_broker_email_email from field_data_field_broker_email where entity_id = :entity_id limit 1", array(":entity_id" => $participant))->fetchField();
$entity_field[0]['value'] = $email;
In my Rule I have the token for the field set as follows:
Read more

