You are here

uc_wishlist.rules.inc in UC Wish List 7

Same filename and directory in other branches
  1. 8 uc_wishlist.rules.inc

This file contains the rule condition for the wishlist

File

uc_wishlist.rules.inc
View source
<?php

/**
 * @file
 * This file contains the rule condition for the wishlist
 */

/**
 * Implements hook_rules_condition_info().
 */
function uc_wishlist_rules_condition_info() {
  $conditions['uc_wishlist_condition_product_wishlist'] = array(
    'label' => t('Check if an order has wishlist product'),
    'group' => t('Order'),
    'base' => 'uc_wishlist_condition_product_wishlist',
    'parameter' => array(
      'order' => array(
        'type' => 'uc_order',
        'label' => t('Order'),
      ),
    ),
  );
  return $conditions;
}

/**
 * Checks that the order has wishlist product.
 */
function uc_wishlist_condition_product_wishlist($order, $settings) {
  return uc_wishlist_order_wishlist($order);
}

Functions

Namesort descending Description
uc_wishlist_condition_product_wishlist Checks that the order has wishlist product.
uc_wishlist_rules_condition_info Implements hook_rules_condition_info().