Active
Project:
Ubercart Discount Coupons
Version:
6.x-1.7
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Apr 2013 at 16:25 UTC
Updated:
29 Apr 2013 at 16:34 UTC
I'm debugging a custom module that interfaces with ubercart attributes.
In my recent log entries I find:
Type php
Date Monday, April 29, 2013 - 10:47am
User Admin
Location http://myspectack:8888/admin
Referrer http://myspectack:8888/admin/store/settings/attributes
Message notice: Undefined variable: statuses in uc_coupon_store_status() (line 1211 of /Users/webdev/myspectack/sites/all/modules/uc_coupon/uc_coupon.module).
Severity error
Hostname 127.0.0.1
Operations
I fixed this temporarily with by adding a definition of statuses outside the if statement, here is the code
/**
* Implementation of hook_store_status().
*/
function uc_coupon_store_status() {
$statuses = array('status' => 'ok', 'title' => t('Coupons'), 'desc' => t('Coupon Ok'));
if (variable_get('uc_payment_method_paypal_wps_checkout', 0) && variable_get('uc_paypal_wps_submit_method', 'single') == 'itemized') {
$statuses[] = array(
'status' => 'warning',
'title' => t('Coupons'),
'desc' => t('To use coupons with PayPal you must select "Submit the whole order as a single line item". <a href="!url">Click here to change this setting</a>.', array('!url' => url('admin/store/settings/payment/edit/methods'))),
);
}
return $statuses;
}
Comments
Comment #1
pcher1bw commentedI have modified uc_coupon.module previously to allow for a free shipping coupon so the line number may not be exact. In the current version of uc_coupon the problem is on line 1177.