Code automatically emailed after payment is made


  • Default avatar
    jose_luis    
     12 years ago
    0

    Hello, good evening.

    I have an online food store is a store that sells products offered for other physical stores.

    When a product is purchased I send a code so that both parties are informed and verify that such information is correct. These people have the same code

    1. - Shop where the product was purchased online at my website
    (Code automatically emailed after payment is made daSd2frf4)
    2. - Customer who bought this product (Code automatically emailed after payment is made daSd2frf4)

    Subsequently, the owner of the product sold online, check that both codes are the same and give the product of choice

    Please, I've been watching the online manual, but I can not clarify the operation.


    They could tell me how could do this?


    Thank you very much for your help.

    José Luis
  • Your avatar
    seyi    
     12 years ago
    0

    Hello,

    With AwoCoupon the code will automatically be emailed to the customer but not any specific vendor. For that you would have to add some custom coding. Here is some old code that does this:
    https://awodev.com/forum/other-applications/awo-product-show-virtuemart/email-informations-coupon-vendors-product#comment-1517

    if you are having problems, please post back.
  • Default avatar
    jose_luis    
     12 years ago
    0

    HI Seyi,

    You comment in this post

    "
    in www/administrator/components/com_awocoupon/assets/virtuemart/ps_awo_giftcert.php, around line 167, you should see this:

    <?php
    $bcc 
    = !empty($profile['bcc_admin']) ? $from_email null;
    ?>


    right under that you can add this:

    <?php
    $bcc 
    = empty($bcc) ? 'VENDOR@EMAIL.HERE' array_merge(array($bcc),array('VENDOR@EMAIL.HERE'));
    ?>


    One note, I did not test this, but it should work.

    Seyi

    "

    But I have this...

    // message info
    $to = $this_mail_key;
    $subject = $profile['email_subject'];
    ************* Line 225 NO 167 $bcc = !empty($profile['bcc_admin']) ? $from_email : null; ********************
    $message = $profile['email_body'];
    $is_embed = false;
    $embed_text = '';

    I need to replace for this at this line ???

    "

    <?php
    $bcc 
    = empty($bcc) ? 'VENDOR@EMAIL.HERE' array_merge(array($bcc),array('VENDOR@EMAIL.HERE'));
    ?>


    "

    For all on this line ???


    For another hand I LOVE TO MADE IT " what if a customer buys coupons from multiple vendors "

    BUT, where is it ???

    " Copy at your post "

    <?php
    $sql 
    'SELECT contact_email FROM #__vm_product p JOIN #__vm_vendor v ON v.vendor_id=p.vendor_id WHERE p.product_id='.$mycodes[0]['product_id'];
    $database->setQuery($sql);
    $vemail $database->loadResult();
    ?>


    "

    NO Code similar, and I NEED TO DO IT for multiples vendors, really...


    Please, May your help me ? Thanks a lot...




  • Your avatar
    seyi    
     12 years ago
    0

    Yes, for multiple vendors that solution would not work. The only thing I can think of is to use the 'Purchased gift certificate' report to email out to the vendors on a regular basis. The only other solution would be to write some type of a plugin to do this automatically.