Automatic Email not Sent - gift certificate


  • Default avatar
    julio1    
     12 years ago
    0

    I've created several gift certificates and the system correctly sends out the certificate (email) when I manually 'Confirm' the sale in VM when I used the Cash on Delivery payment option.

    I then changed to the PayPal payment option. When a live transaction is complete through PayPal, VM automatically shows the order as 'Confirmed', but the email with the certificate is not sent out.

    How can I correct this?

    Thank you.
  • Default avatar
    julio1    
     12 years ago
    0

    Seyi,
    This modification worked and the email was sent after the PayPal purchase.

    What did you mean by 'temporary solution'. Is there a reason I can't leave this code as modified?

    Thanks for your help.
  • Your avatar
    seyi    
     12 years ago
    0

    I believe the code commented out sends a confirmation email to the customer. Did you receive that after ordering? If you do not want that sent then yes, you can leave it commented.
  • Default avatar
    julio1    
     12 years ago
    0

    Yes, the customer test email did receive the confirmation of purchase and the certificate test email received the gift certificate.
    So it 'seems' to be working correctly. I hope there isn't anything I'm missing.

    What results did you see when you did the test on your end? Were you missing the customer confirmation?
  • Your avatar
    seyi    
     12 years ago
    0

    Ok tested it some more. It affects the notices you send in the backend. If you comment that line of code out and you go to the backend order and update the order status and select 'notify customer', the customer will not be notified with that code commented out.
  • Your avatar
    seyi    
     12 years ago
    0

    Im getting the same error. When checking the error logs, I get this specific error which stops all further executions, meaning the gift cert code is not called:
    PHP Fatal error:  Call to undefined method VirtuemartViewOrders::renderMailLayout() in www/components/com_virtuemart/helpers/shopfunctionsf.php on line 339


    After some debugging, commenting out the line that sends an order email to the customer fixed the problem:
    in www/administrator/components/com_virtuemart/models/orders.php, around line 423 is this
    <?php
        
    if ($order['customer_notified']) {
            
    $order['virtuemart_order_id'] =$virtuemart_order_id ;
            
    $this->notifyCustomer($order,  $order['comments'],  $order['customer_notified']);
        }
    ?>


    I changed it to this
    <?php
        
    if ($order['customer_notified']) {
            
    $order['virtuemart_order_id'] =$virtuemart_order_id ;
            
    //$this->notifyCustomer($order,  $order['comments'],  $order['customer_notified']);
        
    }
    ?>


    Temporary solution, I know, but at least if you are having the same problem you can see the gift cert working, and then figure out what is wrong with confirmation emails.
  • Default avatar
    julio1    
     12 years ago
    0

    Thanks Seyi.
    Since we won't need to send notifications in the immediate time frame, we're okay with it as is.

    Is this something you'll continue to work on for future versions ? While we may not need it now, I have another potential client that would need that functionality.
    Is this a VM2.0 problem ?
  • Your avatar
    seyi    
     12 years ago
    0

    this is a vm problem. Did a quick search on their forums and found this. Not the exact same process, but the exact same error:
    http://forum.virtuemart.net/index.php?topic=96318.msg316616