Courses not showing in my course

vantony
Forums
After i made sample payment through paypal sandbox for a particular course i cant see that course in my course list.I just completed that purchase from admin side.So how can i view a course after making payment.I'm using drupal commerce paypal payment.
Profile picture for user James Aparicio
James Aparicio

Hi vantony,

Hi vantony,

The rule to add a user to a given course or classe (Give access to OG on checkout) is triggered on checkout completion. It does not depend on payment methods. If you have a payment method, then the checkout completion is done after the payment method was successful

What do you mean by "completed that purchase from admin side"?

 

Best regards

vantony

Rule was set to pending after

Rule was set to pending after checkout completion.now i set it complete.still cant seen course in my course list after purchasing that course.Rule mentioned above it already available in the rule set.
Profile picture for user James Aparicio
James Aparicio

Hi vantony,

Hi vantony,

The user is set to pending in the case there are required courses for that course, that the user has not completed.

So the user is in fact added to the course correct? If you go to the course he is listed under the users? 

Best regards

vantony

sorry actually i meant rule

sorry actually i meant rule for paypal payment not for course.This is the complete scenario 1.First thing a normal user logged in to the account.When they click on training catalogue it list out all courses.But when they click on a paricular course it shows "Group: Subscribe to group "..But not showing price or any other details.I checked all permissions but its still not showing anything and they cant purchase it. 2.Second i just tried to purchase that course through admin account because normal users cant see course details or purchase it.So i used paypal sandbox account and i made a payment through commerce payapl with drupal commerce.Its showing payment completed.But when i check my courses for admin its showing nothing and in training catelogue list it still lists the same course. So whats the problem ?Checked everything :(..
Profile picture for user James Aparicio
James Aparicio

Hi vantony,

Hi vantony,

Opigno comes with a ruled called (Give access to OG on checkout). This rule is triggered on checkout complete. As i said this is completly independent of the payment method. If you have or not a payment method, at the end of the order checkout, it will be set as checkout complete. This will check the products in the order and add the user placing the order inside the course. 

There is also another rule that opigno comes with that after the checkout is complete it is set as pending.

When users click on Subscribe to group, they are directed to a page where they buy it. Did you click on subscribe to a group with a normal user?

If you created the corse with the admin, how where you able to buy the course with the admin? If he is part of the course he cant buy it.

Best regards

vantony

"Give access to OG on

"Give access to OG on checkout" this rule is already available in the rule set. I clicked on "Subscribe to group" from normal user account but its saying "You are not authorized to access this page." ( Its a paid course) I created course from another account.admin is not part of that course. I think problem with permission.Also i can see price and other divs are hidden when i inspect element for normal user.
Profile picture for user James Aparicio
James Aparicio

Yes it should be a permission

Yes it should be a permission, under admin people permissions do registered users have the permission access checkout set?

But the fact the other admin does not see the course means there is something else. Does this second admin get added to the course? Or he just cant see it under the my courses view?

vantony

Yes they do have the

Yes they do have the permission to access checkout.. admin is not getting added to the course and even they cant see that course in my courses list.
Profile picture for user James Aparicio
James Aparicio

You should enable install the

You should enable install the devel module, and inside the rule Give access to OG on checkout add a debug action to display a message to see if it is beeing called.

You said previouly "Rule was set to pending after checkout completion.now i set it complete." Can you elaborate? If the payment rule is sending to order complete instead of checkout complete, the rule to add the user is never called (Give access to OG on checkout).

vantony

i think "Give access to OG on

i think "Give access to OG on checkout" rule is not getting executed.Here is the rule details page for order update and access to OG on checkout rules. Update order status rule : http://postimg.org/image/ap3bd5n83/ Give access to og on checkout rule : http://postimg.org/image/nkeann657/
Profile picture for user James Aparicio
James Aparicio

If you desactivate the

If you desactivate the payment method you have, does it work? 

vantony

Now i noticed that even admin

Now i noticed that even admin cant subscribe to a public course which is free course not even paid one.Its showing " You are not authorized to access this page.",When i checked log i did see the following error. Notice: Constant OG_ACCESS_FIELD already defined in include_once() (line 17 of /var/www/micro/profiles/opigno_lms/modules/opigno/opigno/modules/opigno_og_access/opigno_og_access.module).
Profile picture for user James Aparicio
James Aparicio

Hi vantony,

Hi vantony,

You activated the Organic groups access control module. You cannot do this. We have our own module Opigno og access control.

Please disable and uninstall the module Organic groups access control. There is a warning in the module to not activate both.

 

Best regards

vantony

uninstalled og group access

uninstalled og group access control and still problem exist.so i just disabled opigno commerce module and its working fine.but i cant able to set payment in course if i disable it.so is there any other solution ?In opigno commerce app if i disable these 2 lines it will work again but for even paid course users can join without payment. "function opigno_commerce_app_menu_alter(&$items) { $items['group/%/%/subscribe']['access callback'] = 'opigno_commerce_app_access_join_link'; $items['group/%/%/subscribe']['access arguments'] = array(1, 2); }"
Profile picture for user James Aparicio
James Aparicio

Hi vantony, after you

Hi vantony, after you uninstalled the organic access control module, did you clear the cache?

What do you mean the problem still exists? they get access denied? Does it work for an admin now?

 

Best regards

Profile picture for user James Aparicio
James Aparicio

Since you had those two

Since you had those two modules enabled at the same time, i sugest you create a new course and test it with a fresh course.

Best regards

vantony

uninstalled organic access

uninstalled organic access control and cleared cache.still getting "you are not authorized page".Its still not working with admin or any other user.
Profile picture for user James Aparicio
James Aparicio

With a fresh new course?

With a fresh new course?

vantony

Deleted all old course and

Deleted all old course and created new course and tried from admin to subscribe that course but still you are not authorized error.
Profile picture for user James Aparicio
James Aparicio

And if you go to group/node/%

And if you go to group/node/%/admin/permissions. The % is the id of the course.

Do users have permissions to subscribe?

vantony

here is the screenshot for

here is the screenshot of permission for that particular course. http://postimg.org/image/ek2fyhs2j/
Profile picture for user James Aparicio
James Aparicio

Inside the opigno_commerce

Inside the opigno_commerce_app.module inside the function opigno_commerce_app_join_link add a line

die();

just before

return og_ui_subscribe($entity_type, $gid);

And let me know if you get a white screen when trying to subscribe.
vantony

No..same error "You are not

No..same error "You are not authorized to access this page."..There is no white screen
vantony

Issue fixed by upgrading

Issue fixed by upgrading opigno commerce app from 1.3 to 1.5..Never seen such a great support...Thanks for the great help :)
lpolnitz

Buying Courses

I have my courses all set up but I am having trouble getting the buy access or subscribe to work to purchase the class. Please send me any instructions you have. Thanks!
lpolnitz

Buying Courses

I have my courses all set up but I am having trouble getting the buy access or subscribe to work to purchase the class. Please send me any instructions you have. Thanks!