email Informations coupon to vendors the product


  • Default avatar
    netluca72    
     12 years ago
    0

    hello

    for gift certifactes,
    you can also send html email Informations coupon to vendors the product?

    I ask the script , is a special request, thanks you very much

    Luca
  • Your avatar
    seyi    
     12 years ago
    0

    Hi Luca,

    When you are editing the gift certificate profile (within admin->awocoupon->gift certificate->gift certificate profile-> new/edit) you can fill out the bcc field which will send a blind copy of the email to the email address you enter in that field.
  • Default avatar
    netluca72    
     12 years ago
    0

    OK to copy bcc admin
    You can enter Another email address? (example: mail vendor associated with the product)
    thank for reply
  • Your avatar
    seyi    
     12 years ago
    0

    ah, I see the problem now. No there is no way to do this through the interface. If the vendor will receive all gift certificate emails sent through your store, you can hardcode the email in. Do you want this solution?
  • Default avatar
    netluca72    
     12 years ago
    0

    Yes

    the vendor of product receive all gift certificate email

    to :

    table: vm_vendor
    field: contact_email

    Thank

    Luca

  • Your avatar
    seyi    
     12 years ago
    0

    Ok, this will bcc VENDOR@EMAIL.HERE on every product. You can modify that to your preference.

    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.
  • Default avatar
    netluca72    
     12 years ago
    0

    thank you very much
    But 'every product you have your vendor
    I can not set a fixed mail
  • Your avatar
    seyi    
     12 years ago
    0

    what if a customer buys coupons from multiple vendors, you send to both? Well here is one approach, this should send to the vendor of the first gift certificate product.

    <?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();
    ?>


    then the code from the previous post:
    <?php
    if(!empty($vemail)) $bcc = empty($bcc) ? $vemail array_merge(array($bcc),array($vemail));
    ?>


    that should do it.
  • Default avatar
    netluca72    
     12 years ago
    0

    works ok
    thank you very much
    Luca
  • Default avatar
    netluca72    
     12 years ago
    0

    Hi
    what if a customer buys coupons from multiple vendors, you send to both?
    yes !! and not only the first.

    you can change the script?

    thanks
  • Your avatar
    seyi    
     12 years ago
    0

    Would have to change the whole file. When a customer purchases gift certificates, only 1 email is sent to the customer, whether it is from multiple vendors or just one. So the email of all vendors can be added, but each vendor would see all codes, no matter if it is for their store or not.

    This is not the right place for this. The report within AwoCoupon, purchased gift certificate, already lists the coupon code bought per product. This is what should be sent out to the vendor. It is a manual process. If you would like a customized quote to automate this through a plugin, please contact me privately.