-
Posted in : Efor
-
Hi!
1. I created a button “Enroll Now” to take people to the checkout page and automatically add the course to cart when they click on it. I used the link https://mydomain.com/checkout/?add-to-cart=mycoursenumber
It works fine and does add the course to the cart and takes me to the checkout page. However, it returns this message at the very bottom of the page only when I’m not signed in (which is how most customers will be prior to purchasing): “<– LP_AJAX_START –>{“single_purchase”:false,”course_id”:1748,”message”:”\n\t
\n\t\tView cart<\/a> “Ideas To Stores: Online Course” has been added to your cart.\t<\/div>\n”,”added_to_cart”:”yes”}<– LP_AJAX_END –>”It looks like random code somehow is placed on bottom of the page. How do I get rid of that?
2. Can the WooCommerce emails be customized?
1. Hi, I just updated all your plugins and the error message has gone.
2.You can customize the emails via your wp-admin > WooCommerce > Settings > Emails.The message is still there. Note that it only shows up when you are not logged in as a user and only on the very first time you click the “Enroll Now” button. If you refresh the page from there or go to the cart it disappears. If you empty the cart and go back to the “Enroll Now” button that error reappears at the very bottom of the checkout page.
Regarding WooCommerce emails I don’t see an option to edit the content of the emails. I want to edit the content of the “New Account” email. It sends a link for customers to login to “my account” but I want that link to go to the LP Profile so that they can access the course. I just want to change that link or either change where that link goes.
Also, it only does it with the button that I created. The original “Buy This Course” button that came with the theme does not return that message at the bottom. It may have to do with the fact that it is a single item cart item with restrictions on not being able to add more than one to the cart. Is there extra code language that the link needs to have?
I figured out the email. It’s just the button issue now. Thanks!
Hi @JeneNe
I will forward this topic to our developer and I will keep you updated.
ThanksHi,
Could you please create a support ticket in the lms plugin support page and keep me updated?
https://wordpress.org/support/plugin/learnpress/
Also, when I get a solution I will keep you updated.
ThanksThey have not been helpful so far and are just asking me to check the code since I customized it. Is there anyway to see the exact code on the enroll now button that comes with Learnpress? I can’t find a way to edit that page directly. If I can use the same code that they use on that button then maybe that will solve the problem.
Hi,
I will forward this topic to our developer and will keep you updated.
Thanks for your patience.Hi, sorry but we can’t detect the source of this issue and provide a solution for it as the issue is related to the LearnPress plugin codes. Btw, I see that you have paid for LearnPress add-ons so you should get priority support via the plugin authors site;
follow Help Center > Create a ticket link;
Have a nice day!
Yes I have already done a ticket there and I’m still going back and forth with them but they don’t seem to want to help.
I think the problem is that the Learnpress pages have code on them that my custom page does not. Is there any way for me to find the code that goes on the course page that learnpress created where you can buy the course and put that same code on my custom page? I see there are files in the plugin folder but I don’t know where to place the code. If I found that code with the php functions would I place that in the “additional code” box?
Alternatively is there anyway to simply hide the code that appears at the bottom of the page. It functions fine it’s just showing the code unnecessarily. Is there code that would hide that?
Hi again, unfortunately it is not easy with adding some custom code but it requires diving into plugin codes and find the bug which causes this issue, also it is not possible hide it with css since the markup goes after html tag. The plugin author should be willing to fix this issue with the next update, what is their reply about this?
Their reply was this:
“Since you customized it and resulted in an error, you can check the code you fixed”
Then they said this:
“I’m not sure what you want but you can look at these 2 files
plugins\learnpress\inc\shortcodes\class-lp-shortcode-button-enroll.php
plugins\learnpress\templates\single-course\buttons\enroll.php”I just asked them if they can tell me how to create an enroll now button that works with Learnpress to add the course to cart and redirect to the checkout page. Now waiting on that reply.
Hi again, did you customize the plugin php files? Then, I can understand the plugin author’s reaction, unfortunately this is out of our support scope, too. I hope the plugin author can provide a solution for you.
Have a nice day!
No I did not customize and plug in pages. All I did was create a landing page and then create an enroll now button on the landing page. That’s it. It’s very simple. It’s very weird to only be able to use the “buy course” button on the learnpress page. That’s very limiting. I’m not a coder but I’ll just have to figure it out since nobody can help. Thanks
ok, I see, then you may reply them as;
“I did not customize any plugin php file, just trying to add a course checkout button with the url; “?add-to-cart=mycoursenumber” and it caused this issue.”
Cheers.
LearnPress told me that creating a custom enroll now button other than what comes with it is not a feature and that I’d have to pay for extra services to get that created.
I think it may actually be a WooCommerce issue. Since the code that shows is AJAX and I have the ” Enable AJAX add to cart buttons on archives” button checked on settings in WooCommerce I’m thinking that the issue could be there. I will try to find a fix and submit a ticket to WooCommerce also. Thanks!
Hi, Thanks for the feedback. I hope they will solve the issue asap.
I just wanted to update you on this issue for others who may have it. After days of endless searching I solved it myself. I googled part of the code that was appearing and found the changelog of the WooCommerce Payment Methods Integration for LearnPress. I saw that there was a fix for this issue and realized I had an old version of the plugin. Once I updated the plugin the issue was resolved.
You must be logged in and have valid license to reply to this topic.