The Alternative Price modules enables a new product feature for store admins. This feature allows products to have a 2nd price associated with a product. This 2nd price can have its value adjusted based on previous purchases. An admin can also specify custom labels to differentiate between the standard and 2nd price. Admins using views on their site can filter and display the alternative price in views.
In addition to these features, any product nodes can be designated as unique. Unique product nodes will become un-published once a customer first purchases the product. Also, another field can be displayed on product pages displaying attributes that customers have previously selected when purchasing the product.
Development
| Preview | Attachment | Size |
|---|---|---|
| uc_alternative_price.tar.gz | 5.8 KB |






Hi,
I propose a few new lines to this module: it allows to choose to display both Standard and Alternative buttons or ONLY the Alternative button :
1) Modify the display:
In function uc_alternative_price_form_alter($form_id, &$form)
if (!empty($alternative_price->standard_button)) {$form['submit']['#value'] = $alternative_price->standard_button;
}
becomes:
if (!empty($alternative_price->standard_button)) {$form['submit']['#value'] = $alternative_price->standard_button;
}
if (variable_get('uc_alternative_price_one_button', FALSE)) {
$form['submit'] = array();
}
2) Add admin option to deal with it:
In function uc_alternative_price_feature_settings()
$form['uc_alternative_price_unpublish_alternative'] = array ('#type' => 'checkbox',
'#title' => t('Unpublish "Unique" items only when purchased with an alternative price.'),
'#default_value' => variable_get('uc_alternative_price_unpublish_alternative', FALSE),
'#description' => t('If checked, products marked "Unique" will only become unpublished if they are purchased with an alternative price.'),
);
becomes:
$form['uc_alternative_price_unpublish_alternative'] = array ('#type' => 'checkbox',
'#title' => t('Unpublish "Unique" items only when purchased with an alternative price.'),
'#default_value' => variable_get('uc_alternative_price_unpublish_alternative', FALSE),
'#description' => t('If checked, products marked "Unique" will only become unpublished if they are purchased with an alternative price.'),
);
$form['uc_alternative_price_one_button'] = array (
'#type' => 'checkbox',
'#title' => t('Do not view Standard price button.'),
'#default_value' => variable_get('uc_alternative_price_one_button', FALSE),
'#description' => t('If checked, only the Alternative price button will published on the Product node.'),
);
Feedback welcome.
Alexandre