Hello,
I would like to limit register access to authenticated users only, but still show the number of available slots to anonymous users.
file commerce_registration.module, line 365 prevents showing the number of available slots if the user does not have registration access. Is it possible to add a field settings to allow view of available slots even if the user does not have register access?
case "hidden":
$product = commerce_product_load($form['product_id']['#value']);
$settings = registration_entity_settings('commerce_product', $form['product_id']['#value']);
if (commerce_registration_product_has_registration_field($product->product_id)
&& !empty($settings)
&& registration_status('commerce_product', $form['product_id']['#value'], TRUE)
// --> This line prevents showing slots available if user does not have registration access, ie by Anonymous
&& registration_register_page_access('commerce_product', $product)) {
// --<
$fieldsettings = field_extra_fields_get_display('commerce_product', $product->type, 'default');
$showavail = isset($fieldsettings['registration_available'])
&& isset($fieldsettings['registration_available']['visible'])
&& $fieldsettings['registration_available']['visible'];
Closed: outdated
2.1
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.