Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 VP-ASP 7.0 Questions
 Stock auto notification
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

manilow
VP-CART New User

France
134 Posts

Posted - May 20 2018 :  16:07:37  Show Profile  Visit manilow's Homepage  Reply with Quote
Still under vpasp 7, I found out that the stock auto notifications were not sent. It took me a while to find out why. This issue may have been solved in later versions but I think it''s worthwhile to mention anyway. I did quite some customization to my website but I think this is not related to it.

Before calling the ExecuteMail subroutine in the shopmail.asp file, which actually sends the Email messages, you have to specify the smtp server it should use. That instruction was missing in the SendStockNotification subroutine in the shopadmin1.asp file. I had to add the following line (in bold characters):

my_system = GetConfig("xemailsystem")
SetupEmailformat Template,emailformat
FormatOtherMail Template, rs, body

I also wanted to use an Html template with the page url of the product for which the message is sent. In the shop configuration, the xstocknotifyemailTemplate field had to be set to something like tmp_stocknotifyemail.htm. Then I had to add the next lines right after the previous ones :

if ucase(emailformat)="HTML" then
body = replace(body, chr (13), "<br />")
end if


(without space between chr and (13) )
I hope this information will be useful.

Regards.

Erik
www.aquathermia.com


Alex123
VP-CART Super User

USA
223 Posts

Posted - May 24 2018 :  18:19:37  Show Profile  Reply with Quote
Haven''t met with such an issue so far. Anyway thanks Erik for sharing the details. Will be useful for someone.

Alex
Go to Top of Page

diegomilito
VP-CART Expert

Argentina
779 Posts

Posted - May 24 2018 :  21:14:34  Show Profile  Reply with Quote
From my point of view with vpasp existing code, v 7 and v 8 , you dont need to actually specific to include new code my_system = GetConfig("xemailsystem"). becoz in ExecuteMail route ( i believe is in shopmail.asp) it has already declare the one you mentioned. try to look at shopmail.asp maybe as a quick look and look at the sub ExecuteMail routine inside and i could guess it is specified by vpasp there:
''701 - 2011.01.31 - Bug Fix: my_system should not be empty
dim my_system
my_system = GetConfig("xemailsystem")

i think no need to re-declare again on your mentioned post, unless maybe you got shopmail.asp using very old v 7? or custom coding the file already ? just my predict but i share what i found.

diego
Go to Top of Page

manilow
VP-CART New User

France
134 Posts

Posted - May 25 2018 :  03:54:39  Show Profile  Visit manilow's Homepage  Reply with Quote
Thanks Alex and Diego for your attention.

As I expected, the bug must have been fixed since I acquired our vpasp version (7.0). Apparently, the smtp server is now specified in Executemail. Beforehand the smtp server had to be determined in the code calling the executemail subroutine. I guess this approach allowed to specify a different mail server according to the kind of mail sent (a specific smtp server for marketing purposes for example).

Erik




Edited by - manilow on May 25 2018 17:23:03
Go to Top of Page

Alex123
VP-CART Super User

USA
223 Posts

Posted - May 25 2018 :  16:55:22  Show Profile  Reply with Quote
For v7 and v8 the smtp server can be specified against the keyword xemailsystem in software configuration section of vpcart admin.

Alex
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000
0 Item(s)
$0.00