Using codeigniter 4, cannot send link in gmail - codeigniter

$message = "Hi ".$name.", <br>Your account is created successfully. Please click the below link to activate your account
<br><br><a href=".base_url()."/register/activate/".$uniid."Activate now </a>";
I already recieved the email but the href function is excluded. it only display
"Hi myname,
Your account is created successfully. Please click the below link to activate your account";
it dont display the link

You have syntax errors in your code.
Missing > in anchor tag".$uniid."Activate now
Wrong href dicleration href=".base_url()."/register/activate/".$uniid."
wrap inner conditions with '.
Use below code
$message = "Hi {$name}, <br>Your account is created successfully. Please click the below link to activate your account
<br><br><a href='/register/activate/{$uniid}'>Activate now </a>";

Related

Cypress does not show the final page after running cy.origin

The test's domain is "exams.com/courses/XXXX"(xxxx is the course's #). After clicking the "buy course" button, the domain will be "payment.com".We filled in the payment information, and click the "pay" button, the webpage should be "exams.com/purchased_courses/XXXX".
Now I used cy.origin:
it("buy courses",()=>{
.........//click the "buy course" button
cy.origin("payment.com",()=>{
.........//fill in the payment information
cy.get('.submitButton-IconContainer').click()
//click the "pay" button
})
}
)
Issue is: when running the testing, the webpage "exams.com/purchased_courses/XXXX" slashed a second, and finally, the webpage stays in "exams.com/courses/XXXX".
Question:How can I let the testing shows "exams.com/purchased_courses/XXXX"? Thank you!
env: cypress 10.X.X
typescripe
node.js 18.8.0

Magento 1.9.24 upgrade - reset password issue

I upgrade my magento store to the last version, after this I can't reset the customer passsword in frontend, so:
I press on Forgot Your Password button
Complete with my email password and press Submit
In the received email I press on "RESET PASSWORD" button and I am redirected to the store and I have this error: Your password reset link has expired.
How I can solve this?
I had the same, but a second error message appeared
which said that a required field is not filled out.
In general: when anything goes wrong when saving the customer,
the said error message "Your password reset link has expired" shows up.
So, pay attention to any additional error messages showing up or in your log files.
If you want to find out what's happening in detail,
go to the file
"app/code/core/Mage/Customer/controllers/AccountController.php"
and modify the method resetPasswordPostAction temporarily.
Inside the } catch (Exception $exception) { directive, add Mage::logException($e);.
After you have seen the error again,
you can find the real error message in the file var/log/exception.log.
Ref Link: https://magento.stackexchange.com/questions/84605/magento-reset-password-link-not-working-after-upgrade
Hope this will help you!!

Waiting until the control is activated error in testcomplete

I am able to click on Email link but not able to enter the username and test Complete shows "Waiting until the control is activate" only.
var UserName = returnScreenPortal().ParentalLockViewNavigator.LoginForm.Username;
UserName.Click(180 , 40);
UserName.Keys("jcasale#rosettastone.com");
var Password = returnScreenPortal().ParentalLockViewNavigator.LoginForm.Password;
Password.Click(180 , 40);
Password.Keys("password");
I think that you are facing the situation that is described in the Calling Methods Asynchronously help topic. You need to click the email link asynchronously using the CallObjectMethodAsync method as it is described in the topic.

Notify admin via email when order is placed in magento

Is there a way to Notify admin via email when order is placed in magento? I feel like this is a silly question but I'm placing test orders currently and I'm not getting any email notification.
Will the order also get an email notification by default or does the admin have to click the "invoice button" each time an order comes in?
In the magento backend goto
System > Configuration
Left Naviagation > Sales > Sales Emails this option will let you configure mail sending settings where you can ask magento to send you mail whenever an order is placed.
Alternatively, you can create a plugin with an observer which listens to the event of the order being placed and you can write your mail sending code in the observer.
Once configured...
Are you sure that email is being sent?
<?php
$to = "recipient#example.com";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
if (mail($to, $subject, $body)) {
echo("sent!");
} else {
echo("failed");
}
?>
also check your /var/log/maillog for messages.
Go to System -> Configuration -> Select Store email addresses and change the Sales representative's email address.
Then go to Left Naviagation > Sales > Sales Emails and ensure that it is set for Sales representative.
Also just check that you've done this on the main site.

MsgBox on server side

I am trying to display a popup message on my web app. When i run my app normally on my local pc, i get the pop up message boxes appear. However when i publish the app they dont.
here's how it will work:
a button is pressed, it will pick up a file from a directory, then it will check another directory to see if the file the exists...if the file exists then a pop up is needed to inform "File already exists. do you want to continue?" if the user clicks yes it carried on with the code, if they click no then the process is ended.
do anyone have any idea how to do this?
my code so far:
If System.IO.File.Exists(acceptedExistsuNKNOWN) And System.IO.File.Exists(rejectedExistsUNKNOWN) Then
'IF BOTH EXIST
If MsgBox(acceptedExistsuNKNOWN & " & " & rejectedExistsUNKNOWN & "files already exists, do you want to rerun the process?", MsgBoxStyle.YesNo, "Files Exists") = MsgBoxResult.Yes Then
(continur
else
System.Diagnostics.Process.GetCurrentProcess.Kill()...
many thanks
The problem with your idea is that someone would need to sit logged in to the server to interact with the modal popup boxes; that is, if this was even possible, since it would need to be that person on the server who does the action on the page in order to be the recipient of the popup, so it's not like other users can issue a popup to him.
What you do on the server side executes on the server side.
I think you really want ti to show on the client side, but want the logic to make it happen on the server side. It doesn't work this way. Instead, what you might do is output something n the response that indicates a client-side popup should be shown. For instance, you could have a hidden field on the page and set a value, then use JavaScript to show an alert if that value meets your criteria.
Think about what you are asking. If a dialog pops on the server side, the user will not be able to see it (they are on the client side). Moreover, the code will be at a standstill until someone dismisses that dialog, which the user cant see. Only individuals with access to the server will be able to see this. Do you intend to have someone watching the server 24/7? Instead, you probably want to alert the user. This can be done my returning a response from the server code to the client code to display a dialog. The simplest method would be to throw an error and redirect the user to a new page to display an error. If you want something more fluid, you can use updated panels and the AjaxControlToolkit's modal pop up extender. Another way would be to use ClientScript, like this:
try
{
//check for files here
}
catch (Exception ex)
{
string script = "<script>alert('" + ex.Message + "');</script>";
if (!Page.IsStartupScriptRegistered("myErrorScript"))
{
Page.ClientScript.RegisterStartupScript("myErrorScript", script);
}
}

Resources