I have a problem in Magento 1.8
From Admin Panel, when I open an Order (whose invoice is generated), then I go to Comment History section, add new status (like, Processing : Making ) to that order, then I put some comments in the given TextArea.
Now, as I don't want the end customer to know about this comment of mine, the Notify Customer by Email checkbox is left unchecked. And then I submit the comment.
The customer gets a notification mail regarding this comment update.
Is this Magento Default behaviour or I am missing something. Any help on this will be highly appreciated.
for anyone running into this problem in future. We run into this "problem" as well and found out the following:
In the sendOrderUpdateEmail (Mage_Sales_Model_Order) I found this :
// Email copies are sent as separated emails if their copy method is
// 'copy' or a customer should not be notified
if ($copyTo && ($copyMethod == 'copy' || !$notifyCustomer)) {
foreach ($copyTo as $email) {
$emailInfo = Mage::getModel('core/email_info');
$emailInfo->addTo($email);
$mailer->addEmailInfo($emailInfo);
}
}
This set me thinking: We had System > Configuration > Sales > Sales Email > Order Comments enabled.
And we had a BCC send to us of every comment.
So we tested this: made a comment without customer notification and a BCC was send to us but no mail was send to the customer.
Made a second comment with customer notification and both the customer and we got a mail.
So this may seem a bug or a problem but it just the strange way it is coded in Magento:
If the customer is NOT notified but you have a BCC or Copy of notification emails YOU will get an email. This can be very confusing: it looks like the client gets the notification but that is not the case, only the copy or bcc is send...
I got a solution to this problem ::
If I disable Order Comments from System > Configuration > Sales > Sales Email, the customer is not notified any more.
Related
i encountered an issue that sometimes arises on my Magento Community Edition 1.8 Store. The problem is that sometimes Magento adds the Cash on Delivery fee, to the order grand total, in spite of the user had selected Paypal as payment method. This happen only if the user selects Paypal as payment method and happen rarely. Sometimes even the amounts of the items through Paypal and Magento are not in compliance. Contact Paypal Support was not helpful.
Any help will be appreciate
Thanks in advance to everyone
Kind Regards
Steelwork Media Solutions
I feel like some necroposter, but I want to share some thoughts about solving this issue.
Recently I got the very same problem: user has chosen PayPal as payment method, but got charged with cash on delivery fee. After some investigating, I found out that cash on delivery module itself was a culprit.
The problem is in module's logic: it adds up COD fee when COD payment method is selected, but it DOES NOT clear that fee from quote, when payment method is changed to another one. So, when order is being created, fields with COD fee are being copied as is to order. And client gets charged for nothing.
The worst thing in this situation is that you don't see that fee applied in checkout. It pops up only in order.
For example, there is a part of code from MSP_CashOnDelivery module:
if (
($_helper->getQuote()->getPayment()->getMethod() == $_model->getCode()) &&
($address->getAddressType() == Mage_Sales_Model_Quote_Address::TYPE_SHIPPING)
) {
$address->setGrandTotal($address->getGrandTotal() + $amount);
$address->setBaseGrandTotal($address->getBaseGrandTotal() + $baseAmount);
$address->setMspCashondelivery($amount);
$address->setMspBaseCashondelivery($baseAmount);
$address->setMspCashondeliveryInclTax($amountInclTax);
$address->setMspBaseCashondeliveryInclTax($baseAmountInclTax);
$quote->setMspCashondelivery($amount);
$quote->setMspBaseCashondelivery($baseAmount);
$quote->setMspCashondeliveryInclTax($amountInclTax);
$quote->setMspBaseCashondeliveryInclTax($baseAmountInclTax);
}
To solve the problem, you need to add following code below:
if ($_helper->getQuote()->getPayment()->getMethod() != $_model->getCode())
{
$address->setMspCashondelivery(0);
$address->setMspBaseCashondelivery(0);
$address->setMspCashondeliveryInclTax(0);
$address->setMspBaseCashondeliveryInclTax(0);
$quote->setMspCashondelivery(0);
$quote->setMspBaseCashondelivery(0);
$quote->setMspCashondeliveryInclTax(0);
$quote->setMspBaseCashondeliveryInclTax(0);
}
As mentioned in above answer, setting the fields to zero works perfectly. However, it will add a row in invoice and order with a zero charge and that may sound weird to customers. so just add a simple if condition for checking if charge is zero in all the Totals.php block files.
$amt = $this->getSource()->getServiceCharge();
$nameAmt = $this->getSource()->getServiceChargeName();
if ($amt && $amt!=0) {
$this->addTotalBefore(new Varien_Object(array(
'code' => 'service_charge',
'value' => $amt,
'base_value'=> $this->getSource()->getBaseServiceCharge(),
'label' => $nameAmt,
)), 'service_charge');
}
How can I change the title text on the sale email?
I always get this in my email when I make an order,
Main Website Store: New Order # 100000016
I want to change it to,
[Name of my Store]: New Order # 100000016
Is it possible? where can I change it?
Also, in the sale email content,
Thank you for your order from Main Website Store. Once your package
ships we will send an email with a link to track your order. If you
have any questions about your order please contact us at
support#example.com or call us at Monday - Friday, 8am - 5pm PST.
Your order confirmation is below. Thank you again for your business.
Where can I change all this? Especially Main Website Store?
Go to System -> Configuration
Under the General Tab click General and select Shop Information. Enter the name of your store here.
The new order template files is located in
app/locale/en_US/template/email/sales/order_new.html
and
app/locale/en_US/template/email/sales/order_new_guest.html
You can edit these files directly, but it's better to create an overwrite in the Magento Backend:
System -> Transactional Emails -> Add New Template
and then choose New Order / New Order for Guest, click load template and edit the mail template. Template Subject will look like:
{{var store.getFrontendName()}}: New Order # {{var order.increment_id}}
Change this to:
[Name of my store]: New Order # {{var order.increment_id}}
I would recommend an email override extension such as https://www.yireo.com/software/magento-extensions/email-override. This allows you to override email templates in code rather than having to do it through the database. Makes it much easier to manage, transport to other stores, and is independent of core updates.
The environment is Magento 1.7.
Basically what I want to achieve is when users subscribes to the newsletter, the system automatically include a discount code in their welcome email. This discount code is for one time use for per account.
Searched around and found a tutorial which is best suit my requirement. Based on my understanding on that tutorial, we need to fetch some values out of the module configuration and user the helper to send an email with a coupon code.
On top of the codes I've made some amendments:
1)
in the file
app\code\core\Mage\Newsletter\controllers\SubscriberController.php
before
$this->_redirectReferer() in newAction()
insert
$helper = Mage::helper(‘subscribereward’);
$promo_value = Mage::getStoreConfig(‘subscribereward/promocode/dollarvalue’);
$promo_min = Mage::getStoreConfig(‘subscribereward/promocode/minpurchase’);
$helper->addPromoCode($email, $promo_value, $promo_min);
2)
in the file
app/code/community/Dg/Pricerulesextended/etc/config.xml
replace
Pricerulesextended/Observer
with
Dg_Pricerulesextended_Model_Observer
I've followed the steps but still can't get it working. Anybody care to shed a light?
Aheadworks has an extension called Follow Up Email, and it does exactly that. Ive set it up for clients where when a customer signs up (or a number of actions) it sends a welcome email with a randomly generated coupon (or standard one).
Also what you could do is just make a coupon code and add it to a welcome email template. Just make a new transactional email and add the coupon to the template. No custom coding required at all.
I'd like to make email address optional during magento registration. I'm going to be adding an additional username attribute that users will be able to log in with (I've already got that part working). What are the steps to do this, or is it even possible? I found an old extension that does what I want I think, but it is out dated. http://www.magentocommerce.com/magento-connect/email-not-required.html
Thanks for any help.
You could do something similar to what the extension does.
"This extension will allow you to add customers without a valid email address. If no email address is present it will insert automatically an email address [customernumber]#[default customer domain]...."
You could create a gmail (or if you use google app for you company email) or a catch all email
Email Format
noemail+[timestamp]-[ipaddress to long]#gmail/yourdomain.com
Then remove the validation js from the email field that make it required in your .phtml.
Then create a custom module that override your checkout controller (assuming one page checkout)
/app/code/core/Mage/Checkout/controllers/OnepageController.php
/**
* save checkout billing address
*/
public function saveBillingAction()
{
...
if (isset($data['email']) && strlen($data['email']) > 3) {
$data['email'] = trim($data['email']);
}
else{
$data['email'] = getNoEmailGen(); // return noemail+[timestamp]-[ipaddress to long]...
}
(You could also do this using JS, where you pre generate the email address (in a hidden field or variable) and if email field is left blank you append/post it before submitting your billing form)
You shouldn't do that because when you order something, transactional mails are going to take place so you can't have users without mail. This should be weird.
I have integrated paypal into codeigniter with paypal_helper (didn't rememeber where I found it, but it is a slightly rewritten version of Paypals original code for express checkout. I try calling this function,
CallShortcutExpressCheckout( $paymentAmount, $currencyCodeType,
$paymentType, $returnURL, $cancelURL)
sending $paymentAmount as int, $currencyCodeType as "NOK" and $paymentType as "Sale".
Both in Sandbox and live, no amount appears on the paypal site...
What could be wrong?
Edit, to further explain my process. I use this, mostly as specified in the https://www.paypal-labs.com/integrationwizard/ecpaypal/cart.php. This should be doable without the form? The paymentAmount could be sent as a standard variable, when calling the function CallShortcutExpressCheckout?:
$resArray = CallShortcutExpressCheckout ($paymentAmount, $currencyCodeType, $paymentType, $returnURL, $cancelURL);
$ack = strtoupper($resArray["ACK"]);
if($ack=="SUCCESS" || $ack=="SUCCESSWITHWARNING")
{
RedirectToPayPal ( $resArray["TOKEN"] );
}
else
{
//Display a user friendly Error on the page using any of the following error information returned by PayPal
$ErrorCode = urldecode($resArray["L_ERRORCODE0"]);
$ErrorShortMsg = urldecode($resArray["L_SHORTMESSAGE0"]);
$ErrorLongMsg = urldecode($resArray["L_LONGMESSAGE0"]);
$ErrorSeverityCode = urldecode($resArray["L_SEVERITYCODE0"]);
echo "SetExpressCheckout API call failed. ";
echo "Detailed Error Message: " . $ErrorLongMsg;
echo "Short Error Message: " . $ErrorShortMsg;
echo "Error Code: " . $ErrorCode;
echo "Error Severity Code: " . $ErrorSeverityCode;
}
The token is saved in a database. The user gets redirected to Paypal, where no amount is listed.
As you're not passing so called 'line item details' (product data), PayPal doesn't display the total amount.
If you only want to show the amount for the current purchase, redirect buyers to https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-xxxxxx&useraction=commit (instead of https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-xxxxx)
If you want to start sending line-item details to PayPal, include the following in your SetExpressCheckout API request:
// Total amount of the purchase, incl shipping, tax, etc
PAYMENTREQUEST_0_AMT=300.0
// Total amount of items purchased, excl shipping, tax, etc
PAYMENTREQUEST_0_ITEMAMT=300.0
// Authorize the funds first (Authorization), or capture immediately (Sale)?
PAYMENTREQUEST_0_PAYMENTACTION=Sale
// First item
L_PAYMENTREQUEST_0_NAME0=Item1
L_PAYMENTREQUEST_0_QTY0=1
L_PAYMENTREQUEST_0_AMT0=100.00
// Second item
L_PAYMENTREQUEST_0_NAME1=Item2
L_PAYMENTREQUEST_0_QTY1=1
L_PAYMENTREQUEST_0_AMT1=200.00
If you want to see this in your own history as well, you'll also need to include this in DoExpressCheckoutPayment.
This was also posted in php paypal express checkout problem
After an extensive reading on messy Paypal docs site this is a short ExpressCheckout guide working on year 2013. I wanted to have item details shown on paypal payment page and merchant transaction history page.
Paypal documentation links
https://developer.paypal.com/webapps/developer/docs/classic/api/
https://developer.paypal.com/webapps/developer/docs/classic/api/merchant/SetExpressCheckout_API_Operation_NVP/
https://developer.paypal.com/webapps/developer/docs/classic/api/merchant/DoExpressCheckoutPayment_API_Operation_NVP/
https://developer.paypal.com/webapps/developer/docs/classic/api/merchant/GetExpressCheckoutDetails_API_Operation_NVP/
You can call following url methods directly on web browser, update token and payerid parameters accordingly.
This is a digital goods so shipping and handling fees are not given. Single item row. Amount and tax fees are given. Do not require a confirmed delivery address, no shipping address fields, no allow freetext note, payer don't need paypal account and no registration required (solutiontype=sole). Activate credit card section on paypal site (landingpage=billing). Use customized brand title on paypal site. Use custom field to give own value for tracking purpose. Merchant site transaction history must show item details (give item details on SetExpressCheckout and DoExpressCheckoutPayment methods).
SetExpressCheckout method opens a new transaction
https://api-3t.sandbox.paypal.com/nvp?
USER=<userid>
&PWD=<pwd>
&SIGNATURE=<mysig>
&METHOD=SetExpressCheckout
&VERSION=98
&PAYMENTREQUEST_0_PAYMENTACTION=SALE
&REQCONFIRMSHIPPING=0
&NOSHIPPING=1
&ALLOWNOTE=0
&SOLUTIONTYPE=Sole
&LANDINGPAGE=Billing
&BRANDNAME=MY+WEBSHOP+TITLE
&PAYMENTREQUEST_0_AMT=22.22
&PAYMENTREQUEST_0_TAXAMT=4.30
&PAYMENTREQUEST_0_ITEMAMT=17.92
&PAYMENTREQUEST_0_DESC=mypurdesc
&PAYMENTREQUEST_0_CUSTOM=custom1
&PAYMENTREQUEST_0_CURRENCYCODE=EUR
&L_PAYMENTREQUEST_0_NUMBER0=itemid1
&L_PAYMENTREQUEST_0_NAME0=MyItem1
&L_PAYMENTREQUEST_0_DESC0=Item1+description
&L_PAYMENTREQUEST_0_QTY0=1
&L_PAYMENTREQUEST_0_AMT0=17.92
&L_PAYMENTREQUEST_0_TAXAMT0=4.30
&RETURNURL=https://myserver.com/webapp/paypal.jsp%3Fcmd=successexp
&CANCELURL=https://myserver.com/webapp/paypal.jsp%3Fcmd=cancelexp
Reply must have ACK=Success or ACK=SuccessWithWarning, read TOKEN value
Redirect user browser to Paypal site, give token value
https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=<token>
User uses paypal account or credit card. Paypal redirects user to return or cancel url.
Redirect destination url gets token and PayerID parameter values.
Transaction is not completed yet we must call doExpressCheckoutPayment method.
Show confirm dialog on screen (with OK, CANCEL button) or simple case
commit a transaction and show "Thank you, purchase completed" message.
User has already accepted a payment in paypal site and expects transaction be finalized.
You may commit transaction within a same request-response handler or using
asynchronous background task. Paypal site may temporarily be unavailable so don't expect it to work immediately.
Commit transaction if redirect was success, use token and payerid
https://api-3t.sandbox.paypal.com/nvp?
USER=<userid>
&PWD=<pwd>
&SIGNATURE=<mysig>
&METHOD=DoExpressCheckoutPayment
&VERSION=98
&PAYMENTREQUEST_0_PAYMENTACTION=SALE
&PAYMENTREQUEST_0_AMT=22.22
&PAYMENTREQUEST_0_TAXAMT=4.30
&PAYMENTREQUEST_0_ITEMAMT=17.92
&PAYMENTREQUEST_0_CURRENCYCODE=EUR
&L_PAYMENTREQUEST_0_NUMBER0=itemid1
&L_PAYMENTREQUEST_0_NAME0=MyItem1
&L_PAYMENTREQUEST_0_QTY0=1
&L_PAYMENTREQUEST_0_AMT0=17.92
&L_PAYMENTREQUEST_0_TAXAMT0=4.30
&token=<token>
&payerid=<payerid>
Read ACK=Success and verify fields
ACK=Success
PAYMENTINFO_0_PAYMENTSTATUS=Completed
PAYMENTINFO_0_ACK=Success
PAYMENTINFO_0_AMT=22.22 total amount must match
PAYMENTINFO_0_FEEAMT=0.99 (just for fun, read paypal comission fee)
PAYMENTINFO_0_CURRENCYCODE=EUR currency must match
(Optional) Read transaction details from Paypal
You can use this during transaction workflow or any time if stored a token for later use.
https://api-3t.sandbox.paypal.com/nvp
?USER=<userid>
&PWD=<pwd>
&SIGNATURE=<mysig>
&METHOD=GetExpressCheckoutDetails
&VERSION=98
&token=<token>
Read response parameters.
ACK=Success
CHECKOUTSTATUS=PaymentActionCompleted
PAYMENTREQUEST_0_AMT=22.22
PAYMENTREQUEST_0_TAXAMT=4.30
PAYMENTREQUEST_0_CURRENCYCODE=EUR
(Optional) Read and save transaction id, correlation id and token id and write to logtable.
PAYMENTREQUEST_0_TRANSACTIONID=11E585715B622391E
CORRELATIONID=4534b683c335f
I'm willing to receive comments if there is any logic errors.
Check this link, hope it helps in some sense:
https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_ECGettingStarted
PAYMENTREQUEST_0_AMT=amount //for amount