Announcement

Collapse
No announcement yet.

Modified receipt Email to be sent to supplier - possible?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Modified receipt Email to be sent to supplier - possible?

    Our store requires the supplier to see all orders as and when they happen, for the purpose of certain orders that require just-in-time delivery. So at the moment under Business Settings > Ordering we are entering their email address after ours, separated by a space, so a receipt copy is sent to them for every order that takes place as well as us, and of course the customer.

    This works fine, however... the supplier is now requesting that to speed the process up their copy of the receipt also includes their cost price (to calculate the amount to add to our bill). Obviously, the customer should not be able to see the cost price, so what we require is a separate receipt to be generated but with the cost price instead of (or as well as) the retail price. Is it possible to do this within Actinic? I'd rather not have to purchase third party software and we're very familiar with editing OrderScript.pl if necessary. Have I missed something?

    Of course, there is a slightly crude workaround involving hiding the cost price within a long code that the customer would see but never work out, but this would be less than ideal.

    Any suggestions would be much appreciated.

    Matt

    #2
    Sounds do-able. However I'd probably tweak the SendMail routine in ACTINIC.pm as this is the common source of all emails.

    Stick the cost price into the message body but mark it with something like [[ <cost price here> ]] and strip that lump out unless the recepient is yours or the suppliers.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Thanks for the info Norman. I'm taking a look, but I'm apprehensive about editing the SendMail routine due to all the warnings. Also how would I distinguish between the recipients? I only have limited knowledge of Perl, although I have made a number of amendments to OrderScript.pl and SearchScript.pl in the past but never any of the core files. Could you please provide me with a few pointers so I know where to start?

      Comment


        #4
        This
        Code:
        	my ($sSmtpServer, $sEmailAddress, $sSubjectText, $sMessageText, $sReturnAddress) = @_;
        line tells you all you need to know. There are the single recipient and message text variables just waiting to be tweaked.

        Plenty of Perl tutorials on the 'net.
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment

        Working...
        X