Re: Drop Shipping Purchase Orders Module for v1.3.8
Unfortunately, that probably means that this is not compatible with Zen Cart 1.3.7. The attachment part of the zen_mail function was listed as an experimental feature in the Zen Cart code, which probably means it was added in 1.3.8.
What you'll need to do to make this work with 1.3.7 (without the attached PDF slip, you need 1.3.8 for that) is to find the zen_mail function and then rewrite one line of code to fix this. The line of code you will need to rewrite is on line 475 of send_pos.php. It looks like this:
zen_mail($adresdo,$adresdo,$tematk,$newzawartosc,PO_FROM_EMAIL_NAME,PO_FROM_EMAI L_ADDRESS,NULL,NULL,$pdffilename);
You'll need to search for where this function is defined. Do that by going to Admin-Tools-Developer's Toolkit and searching for "function zen_mail" without the quotes. Check that file out and see the variables that are defined in this function. That will help you rewrite the code on line 475 of send_pos.php. If you can't figure it out, post the code you find by searching with the developer's toolkit and I will tell you how to change line 475 of send_pos.php.
By the way, the configuration stuff wasn't added by me. All of the configuration stuff was in the SQL update you installed originally. You can find it under the Extras and Configuration menus in Zen Cart Admin.
By the way, I highly recommend you update to 1.3.8. There are tons of bug fixes and new features. Well worth the time and effort!
Re: Drop Shipping Purchase Orders Module for v1.3.8
Thanks so much for your help - the PDF function isn't necessary for me right now so that is ok.
I can't upgrade at the moment since I have so many mods, but I am working on a test site right now where I have already installed 1.3.8.
In the meantime, here are the lines of code:
/includes/functions/functions_email.php
Line #35 : function zen_mail($to_name, $to_address, $email_subject, $email_text, $from_email_name, $from_email_address, $block=array(), $module='default', $attachments_list='' ) {
Line #239 : function zen_mail_archive_write($to_name, $to_email_address, $from_email_name, $from_email_address, $email_subject, $email_html, $email_text, $module) {
Thanks for your help!
Jaime
Re: Drop Shipping Purchase Orders Module for v1.3.8
Look like it should be working just fine. So, most likely, this variable doesn't exist with 1.3.7. So, just change the following on line 475:
zen_mail($adresdo,$adresdo,$tematk,$newzawartosc,"[email protected]",PO_FRO M_EMAIL_ADDRESS,NULL,NULL, $pdffilename);
That should fix the problem.
By the way, the function seems like it should work fine with the attachments. This got me thinking......I bet the attachment feature of the zen_mail function only works with certain email transport methods. Try switching your email transport method to PHP in Admin-Configuration-EMail Options, that may fix the attachment problems. I only tested this with PHP transport method, as this is what I use.
One last note: My site is HEAVILY modded, but I was still able to upgrade. It does take more work, but I was able to do it in about 5 hours. Just make sure to follow the instructions on upgrading. The key is to create an exact copy of your site and database that IS NOT LIVE and then compare and merge files manually. It takes awhile, but it is worth the effort.
Re: Drop Shipping Purchase Orders Module for v1.3.8
That worked!! Thank you!
I already have my email set as PHP so maybe that isn't the PDF issue...
Re: Drop Shipping Purchase Orders Module for v1.3.8
Oh well. Your PDF creation is working fine, or the whole php script would fail. It has something to do with how it sends it. It may be that this doesn't work with 1.3.7. Another possibility is that your web hosting service works differently than mine with emails.
Anyway, glad the rest worked. Enjoy!
Re: Drop Shipping Purchase Orders Module for v1.3.8
First I just wanted to say thanks a lot for putting this mod out, it is greatly appreciated!
I am running ZEN v1.3.8, I just installed “drop shipping purchase orders” v2 and am having a few issues.
1.The app is sending out duplicate emails. For example if I place a test order and then go to Adom:Customers:POS – Send/Resend, check the boxes under “send PO yes/no” that corspond to the new order and click the “send” button, I receive two identical email with the all the order info.
2.The second issue is that I have no need for pdf attachments and would like to disable this feature.
3.The third issue I am running into is on the order emails that get sent out under the PRODUCTS ORDERED section all of the products are showing up on the same line and I would like them to each appear on their own line.
Thanks!
---------------------------------
iRebounders.com
Re: Drop Shipping Purchase Orders Module for v1.3.8
I'm glad your enjoying the mod!
1) Hmmm. Don't know about this one. I had this problem as well, but I thought I had fixed this bug. I'll take a look at the code I published, which is slightly different than the one I use. Perhaps I forgot to fix this bug for the released version. Quick question that will help me solve this: Does the number of emails you get correspond to the number of products you ordered? (NOT the quantity -- the number of ITEMS.)
2) To get rid of PDF attachments, find this line in send_pos.php on line 475:
zen_mail($adresdo,$adresdo,$tematk,$newzawartosc,P O_FROM_EMAIL_NAME,PO_FROM_EMAIL_ADDRESS,NULL,NULL, $pdffilename);
and replace it with:
zen_mail($adresdo,$adresdo,$tematk,$newzawartosc,P O_FROM_EMAIL_NAME,PO_FROM_EMAIL_ADDRESS);
3) The emails are controlled by the three email files in the "emails" directory. I believe your problem is in the emails_products.txt file. Add a couple of enters to the end of this file and it should fix this problem.
Re: Drop Shipping Purchase Orders Module for v1.3.8
I went ahead and tried the mod I released, and it is not sending two emails for me. Is it possible that you setup zen cart to senda copy of emails to you? You might want to try a different email address. Or is it possible that you have two different orders your are sending at once? That is what the mod is supposed to do with two different orders.
If that doesn't fix it, try redownloading and copying over send_pos.php.
Re: Drop Shipping Purchase Orders Module for v1.3.8
Can someone kindly tell me what code needs to be modified in order to CC each of the drop ship emails to my address? This was mentioned in a thread for the 'other version of this module' , but was not answered. A little help for those of us not proficient in PHP would be very helpful.
http://www.zen-cart.com/forum/showth...purchase+order
Specificially, I need to have the send_pos.php code modifications necessary to CC all purchase orders to the site owner's email address. TIA
Re: Drop Shipping Purchase Orders Module for v1.3.8
Sorry, I don't monitor that thread. Just recopy the line of code that sends the email and change it to your email address. Then, it will send the email twice. So, here is how you do it:
Change line 475 from
zen_mail($adresdo,$adresdo,$tematk,$newzawartosc,P O_FROM_EMAIL_NAME,PO_FROM_EMAIL_ADDRESS,NULL,NULL, $pdffilename);
to 3 different lines:
zen_mail($adresdo,$adresdo,$tematk,$newzawartosc,P O_FROM_EMAIL_NAME,PO_FROM_EMAIL_ADDRESS,NULL,NULL, $pdffilename);
$myownemail="[email protected]";
zen_mail($myownemail,$myownemail,$tematk,$newzawartosc,P O_FROM_EMAIL_NAME,PO_FROM_EMAIL_ADDRESS,NULL,NULL, $pdffilename);
Of course, if you were using an older version of the mod this line would look slightly different. Same idea applies.