Home › Forums › Legacy Support › Support queries › How-to & Troubleshooting › problems with be the generation of the certificate (2)
Tagged: certificate
- This topic has 12 replies, 2 voices, and was last updated 8 years, 6 months ago by pedrohoc.
Viewing 13 posts - 1 through 13 (of 13 total)
-
AuthorPosts
-
May 16, 2016 at 2:49 pm #48377pedrohocSpectatorHi, Alex (vibe) . You have closed the topic I created "problems with be the generation of the certificate", so I had to create another topic to continue the same subject. I delayed to answer, because I had a problem with my hosting server. Just today I could add that code you gave me. I put the code in wplms-customizer.php file before the "?>" (even it do not have "?>" in this file) in wplms customizer plugin. Then I used the shortcode in the certificate. However, it did not work. Note: I tested it with a new user, after adding the code. Original topic: https://wplms.io/support/forums/topic/problems-with-the-generation-of-the-certificate/May 17, 2016 at 11:36 am #48546Anshuman SahuKeymasterI also mentioned there that this code will only work on new users who will purchase the course choosing the duration of course form the variable options . It will not work on user who were in the course before adding the code .May 18, 2016 at 1:51 am #48651pedrohocSpectatorYeap, Alex. I tested it with new users who bought the course after I added the code, but it did not work. The shortcode is not "working," it only appears on the certificate as "[certificate_product_duration]".May 18, 2016 at 2:27 pm #48807Anshuman SahuKeymasterOkay can you please share your admin credentials and site url to check the issue at your end . PS : mark reply as private while sharing credentials .May 19, 2016 at 2:28 pm #49090pedrohocSpectatorOk. Url: http://www.ieducacursos.com.br/ user admin: IEDUCA password: ieducaadm2015 ------ PS: Too, I would like you examine the links of the certificates in the student profile. They are duplicated ThanksMay 20, 2016 at 1:31 pm #49350Anshuman SahuKeymasterOkay i checked your site and found there is some error in the code that i gave . Fixed that and it fixed the issue also please check with a new user .May 20, 2016 at 5:14 pm #49388pedrohocSpectatorAlex ... I think I explained wrong for you. Because I think what is being shown is the duration field of the course of the variation: "12 meses or duration: 365 days or 12 months". And what I'd like to show it would be the variation that the student has acquired, "30 hours | 60 hours | 80 hours | 120 hours | 180 hours | 240 hours | 300 hours". What should be shown when the user/student has acquired one of these variations: Sorry for my confusion. I hope to have explained better nowMay 21, 2016 at 1:45 pm #49527Anshuman SahuKeymasterYou told us to you want to show the duration of the product which the user bought actually . Why are you setting the duration to be 365 days for each variation ? If you have label as 30 hours then the duration of that variation must be 30 hours . I guess you want to show the variations for display purpose only . the code that we gave you previously will not be able to show the variation name . Please provide us more information what actually you want for the user to show in certificate and also what duration you want for users to be set if they purchase the variation coz right now in your site there is not difference in your variable pricing as duration for all variations is 365 days .May 21, 2016 at 4:38 pm #49564pedrohocSpectatorAlex, I'm sorry for not explaining properly. The duration of the product, or duration of the course, represents the number of days that students can enjoy the course that acquired, that is the time that the course will be available to the student. So assigns 365 days. That is, he will have one year to take the course. But you're right. Because if I put the "label value" in the "duration of the course" Example: 30 hours, the value will be printed correctly on the certificate, but the student can not enjoy the course for 365 days. And I wish he enjoyed for one year (365 days). The hours that the student will spend to complete the course (30 hours | 60 hours | 80 hours | 120 hours | 180 hours | 240 hours and 300 hours) is different from the days that the student can enjoy the course (365 days) And what I'd like to show it would be the variation (variation label) that the student has acquired, "30 hours | 60 hours | 80 hours | 120 hours | 180 hours | 240 hours | 300 hours, not the day that the student can enjoy the course (365 days).May 23, 2016 at 1:27 pm #49826Anshuman SahuKeymasterPlease remove the previous code and try adding the given code in wplms customizer : add_action('wplms_course_product_puchased','set_duration_meta',10,5); function set_duration_meta($course,$user_id,$y=0,$x=0,$product_id){ $variation = wc_get_product($product_id); update_user_meta($user_id,'certificate_product_duration',$variation->get_formatted_name() ); } add_shortcode('certificate_product_duration','certificate_product_duration_function'); function certificate_product_duration_function( $atts, $content = null ) { $id=$_GET['u']; $meta = get_user_meta($id,'certificate_product_duration',true); if(isset($meta) && $meta) return tofriendlytime($meta) ; else return '[certificate_product_duration]'; }May 23, 2016 at 4:31 pm #49850pedrohocSpectatorAlex, I removed the previous code and added this code you gave me. Then, I added a new user and purchased the variation 120 hours of course "Governance Concept". Unfortunately, in the certifcate is showing "Curso Expirado" (means Expired Course). But i need that the certificate shows the 120 hours that the user has acquired. ThanksMay 25, 2016 at 10:00 am #50196Anshuman SahuKeymasterI just modified the above code and it is showing the variation value now . But you have to create attributes for variations in course product named exactly " carga-horaria " .June 1, 2016 at 8:24 pm #51290pedrohocSpectatorThanks, Alex. Now it's working.
-
AuthorPosts
Viewing 13 posts - 1 through 13 (of 13 total)
- The topic ‘problems with be the generation of the certificate (2)’ is closed to new replies.