Jump to content

Custom Email or Message after choosing a specific carrier


Recommended Posts

Dears, 


I know this question might have been discussed somewhere, but I couldn't find it. 
Is there a plugin/model or a way that make me achieve the following? 

 

I want: When customer choose the carrier (Pick up from store), to get an email afterwards or a message stating that he/she will be emailed when their order is ready for pickup! 

I've had issues of customers coming to store and their orders were not ready yet. 

Regards, 

Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...
  • 7 years later...
On 10/27/2015 at 8:02 PM, hobbychan said:

Bumping again ...............

well just saw your post after years, i am trying to still figure this out for a store, where when shipping method is "Pick up in store" & payment method is Webpay the alternative email shall be sent to customer. 

did you ever got successful in it? if not then i wills surely update this post when i achieve it.

Link to comment
Share on other sites

Hello, a similar topic has been discussed here several times.

A few things need to be done.

1. in the translations of the order_conf email template, add your own variable, for example {pickup_in_store}

2. modify the file ./classes/PaymentModule.php and add a condition here to display your own text, which will replace the variable {pickup_in_store}

Link to comment
Share on other sites

7 hours ago, ps8moduly.cz said:

Hello, a similar topic has been discussed here several times.

A few things need to be done.

1. in the translations of the order_conf email template, add your own variable, for example {pickup_in_store}

2. modify the file ./classes/PaymentModule.php and add a condition here to display your own text, which will replace the variable {pickup_in_store}

well i guess its not about the email itself only, but order status need to be changed to "ready for pickup!" when the carrier is "pick up in store" logically it will send this order status email rather then payment accepted - dispatch etc & if the carrier is different it will change order status as normal. 

for this we will add an if statement to protected function of the payment validation methods - something like this which worked for me

{ $shippingMethod = (int) $this->context->cart->id_carrier;

if ($shippingMethod === 2)    //2 is the id of pickup in store carrier. you will need to replace it with yours store id
{ return 1; // Set the order status to 1 (1 will be the id of the order status which for me is ready for pickup! ) }
}


this way i successfully achieved it, 

i hope this will help someone in future

regards  

Link to comment
Share on other sites

15 minutes ago, ps8moduly.cz said:

As soon as you edit the carrier, its id will change and your code will not work.

Then he should simply update the code with it, because you not going to change it daily... also if somehow / someone is editing the "pick up in store" carrier every day 😀 then here is the updated code to  get the shippingMethod by name rather then by ID
 

if ($shippingMethodName === $desiredShippingMethodName) {
    // Set the exact shipping method name in above variable
    return 1;

hope this helps someone

Edited by Mian Waqas (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...