Skip to main content

Clarification

More
15 years 6 months ago #12651 by SLLLC
Clarification was created by SLLLC
I had read the post on how to add a customer address to the email sent when an order is confirmed using paypal
www.hikashop.com/en/support/forum/4-how-...istributor.html#6803

below is how I understand the code in the post should be added/placed to the paypal.php. Am I correct?


}else{
$order->order_status = $element->payment_params->pending_status;
$order_text = JText::sprintf('CHECK_DOCUMENTATION',HIKASHOP_HELPURL.'payment-paypal-error#pending')."\r\n\r\n".$order_text;
}
$order->mail_status=$statuses[$order->order_status];
$mailer->setSubject(JText::sprintf('PAYMENT_NOTIFICATION','Paypal',$vars).$order_subject);
$body = str_replace('<br/>',"\r\n",JText::sprintf('PAYMENT_NOTIFICATION_STATUS','Paypal',$vars)).' '.JText::sprintf('ORDER_STATUS_CHANGED',$order->mail_status)."\r\n\r\n".$order_text;

$orderClass>loadAddress($dbOrder>order_shipping_address_id,$dbOrder,'shipping','name','frontcomp');
$orderClass->loadAddress($dbOrder->order_billing_address_id,$dbOrder,'billing','name','frontcomp');
$orderClass->loadProducts($dbOrder);

$mailer->setBody($body);
$mailer->Send();
$orderClass->save($order);

Please Log in or Create an account to join the conversation.

More
15 years 6 months ago #12664 by nicolas
Replied by nicolas on topic Re: Clarification
Hi,

The link you posted doesn't work.

Your code loads the addresses from the database.
But you don't use them to add the information in the email.

You should have something like this as well before sending the email :
$body .="\r\n".$dbOrder->billing_address->address_firstname.' '.$dbOrder->billing_address->address_lastname.' '.$dbOrder->billing_address->address_street.' '.$dbOrder->billing_address->address_post_code.' '.$dbOrder->billing_address->address_city.' '.$dbOrder->billing_address->address_state.' '.$dbOrder->billing_address->address_country;

Please Log in or Create an account to join the conversation.

More
15 years 6 months ago #12724 by SLLLC
Replied by SLLLC on topic Re: Clarification
the correct link is

www.hikashop.com/en/support/forum/4-how-...istributor.html#6803

thank you for feedback, felt I was lacking something

so, as I understand you the code I added to load address from data base is not required for what I am trying to achieve. Should I insert the code you provided in its place/location?

Please Log in or Create an account to join the conversation.

More
15 years 6 months ago #12744 by nicolas
Replied by nicolas on topic Re: Clarification
Both are required. The first one from the other thread is necessary to load the addresses information from the database. This one is necessary to add the address information to the email.

Please Log in or Create an account to join the conversation.

Time to create page: 0.181 seconds
Powered by Kunena Forum