Zen Cart Logo
Forums / All Other Contributions/Addons / Drop Shipping Purchase Orders Module for v1.3.8

Drop Shipping Purchase Orders Module for v1.3.8

Views: 135,051

Results 61 to 80 of 524
1 Apr 2008, 11:02 PM
#61
srturner47 avatar

srturner47

Zen Follower

Join Date:
Oct 2007
Posts:
385
Plugin Contributions:
0

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_EMAIL_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!

2 Apr 2008, 2:07 AM
#62
jderrers avatar

jderrers

New Zenner

Join Date:
May 2007
Posts:
29
Plugin Contributions:
0

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

2 Apr 2008, 4:58 AM
#63
srturner47 avatar

srturner47

Zen Follower

Join Date:
Oct 2007
Posts:
385
Plugin Contributions:
0

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_FROM_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.

2 Apr 2008, 3:12 PM
#64
jderrers avatar

jderrers

New Zenner

Join Date:
May 2007
Posts:
29
Plugin Contributions:
0

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...

2 Apr 2008, 5:11 PM
#65
srturner47 avatar

srturner47

Zen Follower

Join Date:
Oct 2007
Posts:
385
Plugin Contributions:
0

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!

8 Apr 2008, 7:23 PM
#66
mikefifield avatar

mikefifield

New Zenner

Join Date:
Apr 2008
Posts:
1
Plugin Contributions:
0

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

10 Apr 2008, 12:44 AM
#67
srturner47 avatar

srturner47

Zen Follower

Join Date:
Oct 2007
Posts:
385
Plugin Contributions:
0

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

  1. 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.
10 Apr 2008, 1:00 AM
#68
srturner47 avatar

srturner47

Zen Follower

Join Date:
Oct 2007
Posts:
385
Plugin Contributions:
0

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.

11 Apr 2008, 3:30 AM
#69
daddio53 avatar

daddio53

New Zenner

Join Date:
Oct 2007
Posts:
11
Plugin Contributions:
0

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/showthread.php?t=66819&page=8&highlight=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

11 Apr 2008, 10:51 PM
#70
srturner47 avatar

srturner47

Zen Follower

Join Date:
Oct 2007
Posts:
385
Plugin Contributions:
0

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.

12 Apr 2008, 3:11 AM
#71
pattygale avatar

pattygale

New Zenner

Join Date:
Apr 2006
Posts:
61
Plugin Contributions:
0

Re: Drop Shipping Purchase Orders Module for v1.3.8

Wow.. this looks pretty amazing.

If I'm understanding this correctly, this mod allows you to automatically submit the orders to the drop shipper as well as an email confirmation sent to the customer? (thereby, avoiding manually submitting orders to the dropshipper?)

Is that correct?

12 Apr 2008, 5:43 AM
#72
cropinstop avatar

cropinstop

New Zenner

Join Date:
Oct 2006
Location:
Surprise Arizona
Posts:
73
Plugin Contributions:
0

Re: Drop Shipping Purchase Orders Module for v1.3.8

Would like to be able to add custom fields on a per-supplier basis, such as credit card info, tax id, retailer account number. Have you looked at any of this, or would it be easy to do? I AM NOT A PHP PROGRAMMER, but have dabbled in html

13 Apr 2008, 3:06 AM
#73
daddio53 avatar

daddio53

New Zenner

Join Date:
Oct 2007
Posts:
11
Plugin Contributions:
0

Re: Drop Shipping Purchase Orders Module for v1.3.8

srturner47:

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

BRILLIANT! Works like a charm. Many thanks!

13 Apr 2008, 5:39 AM
#74
oznet avatar

oznet

New Zenner

Join Date:
Apr 2008
Posts:
10
Plugin Contributions:
0

Re: Drop Shipping Purchase Orders Module for v1.3.8

Hi

I have installed this mod on a test shop using xampp test server on my computer. I thought everything looked ok until I went to the payment modules in the admin interface. I haven't set up any payment modules yet.

I am getting these errors:

Edit Subcontractors (title appearing on the payment module page)

Warning: include(C:/xampp/htdocs/shop/includes/languages/english/modules/payment/authorizenet1.3.8.php) [function.include]: failed to open stream: No such file or directory in C:\xampp\htdocs\shop\admin\modules.php on line 173

Warning: include() [function.include]: Failed opening 'C:/xampp/htdocs/shop/includes/languages/english/modules/payment/authorizenet1.3.8.php' for inclusion (include_path='.;C:\xampp\php\pear') in C:\xampp\htdocs\shop\admin\modules.php on line 173

Fatal error: Cannot redeclare class authorizenet in C:\xampp\htdocs\shop\includes\modules\payment\authorizenet1.3.8.php on line 589

I don't really know how to interpret these errors. Can anyone offer solutions to these errors please?

I am also using the Apple Zen template if that makes any difference!

Many thanks

Greg

As an aside I also have the Edit Subcontractors title showing on the Image Handler page as well.

14 Apr 2008, 7:46 AM
#75
oznet avatar

oznet

New Zenner

Join Date:
Apr 2008
Posts:
10
Plugin Contributions:
0

Re: Drop Shipping Purchase Orders Module for v1.3.8

I should add that I have not installed the Ty_Package_Tracker as I was not wanting to use this feature!

15 Apr 2008, 12:34 AM
#76
pattygale avatar

pattygale

New Zenner

Join Date:
Apr 2006
Posts:
61
Plugin Contributions:
0

Re: Drop Shipping Purchase Orders Module for v1.3.8

If I'm understanding this correctly, this mod allows you to automatically submit the orders to the drop shipper as well as an email confirmation sent to the customer? (thereby, avoiding manually submitting orders to the dropshipper?)

Is that correct?

Can anyone answer this question, please? I'd rather not spend hours trying to install and modify this if it's not what I think this mod is supposed to do.

15 Apr 2008, 5:25 AM
#77
oznet avatar

oznet

New Zenner

Join Date:
Apr 2008
Posts:
10
Plugin Contributions:
0

Re: Drop Shipping Purchase Orders Module for v1.3.8

OzNet:

Edit Subcontractors (title appearing on the payment module page)

Warning: include(C:/xampp/htdocs/shop/includes/languages/english/modules/payment/authorizenet1.3.8.php) [function.include]: failed to open stream: No such file or directory in C:\xampp\htdocs\shop\admin\modules.php on line 173

Warning: include() [function.include]: Failed opening 'C:/xampp/htdocs/shop/includes/languages/english/modules/payment/authorizenet1.3.8.php' for inclusion (include_path='.;C:\xampp\php\pear') in C:\xampp\htdocs\shop\admin\modules.php on line 173

Fatal error: Cannot redeclare class authorizenet in C:\xampp\htdocs\shop\includes\modules\payment\authorizenet1.3.8.php on line 589

As an aside I also have the Edit Subcontractors title showing on the Image Handler page as well.

I think I may have fixed the error problem. At one stage I was replacing the payment files and did not want to over write the originals, so I changed the names slightly. However, ZC was still trying to read the files with new names as if they were new modules. So, in effect it is nothing to do with the drop shipping mod

I still have the Edit Subcontractors showing in the title of the payment page and the Image Handler page. This must be some slight conflict but if it is only cosmetic, I can live with that - will wait to see if there is a conflict in performance.

15 Apr 2008, 7:18 AM
#78
srturner47 avatar

srturner47

Zen Follower

Join Date:
Oct 2007
Posts:
385
Plugin Contributions:
0

Re: Drop Shipping Purchase Orders Module for v1.3.8

PattyGale - I think it does what you want. Here is a description of how this all works. I tried to make it as seamless as possible so that I don't have to do much! :)

  1. Customer Orders. Order is marked pending.
  2. I submit PO to subcontractor by checking a box and clicking submit -- doesn't get much easier than this.. When this is done, order is automatically marked processing and a note is added to the order that says "Order Submitted to Shipping Department for Fulfillment." <-- Something like that... I think that is what is says, but you get the idea! Easy to change if you don't like the wording. -- I figured that most customers would not want an email until it shipped, so this change is only reflected if they view their account online. No email is sent here.
  3. Either I receive tracking number and input it or my subcontractor enters the tracking number. If the order is shipping from several subcontractors and has not shipped from all subcontractors, the order is still marked processing. If the order is complete, it is marked delivered. Either way, an email is sent to the customer with a link for their shipment tracking. This email includes all products included in this shipment and a brief note.

So yeah, it is pretty easy! It has cut my work time to almost nothing when it comes to order processing, which has freed time for actually shipping products and marketing our website.

OzNet - Glad you figured it out! Unfortunately, I have image handler as well, and I am not seeing the Edit Subcontractors there. I also use Authorize, and I don't see any problems on any payment page in admin like you reported. I really don't know what to tell you. It is quite possible that some modification you are using uses the same variable names as this mod uses. You might want to poke around and see if this is the case. By the way, I have never used this mod without TY package tracker. Even though it was originally intended to be used with or without TY, I can't guarantee that with my changes it will work well without TY. It don't see why you couldn't use it without TY, but some small changes may be necessary. The documentation has some information about this.

Daddio53 - Glad to hear that! Enjoy!

cropinstop - Sorry, I don't intend to add this feature. The good news is, I added an easy way for you to add anything you want to a PO or a Packing List. Of course, this requires a little manual input. It wouldn't be too hard to implement this with a checkbox to turn it on or off, but to add this on a per supplier basis would require messing around with SQL, and I am really not comfortable doing that. I just don't know enough about SQL. If you don't mind getting your hands dirty, you could always define your subcontractors and then add a simple if statement for them to add this info. Of course, this would hardcode these changes, so it would be difficult to undo. It is an interesting idea though. I'll keep it in mind.

16 Apr 2008, 5:38 AM
#79
cropinstop avatar

cropinstop

New Zenner

Join Date:
Oct 2006
Location:
Surprise Arizona
Posts:
73
Plugin Contributions:
0

Re: Drop Shipping Purchase Orders Module for v1.3.8

cropinstop - Sorry, I don't intend to add this feature. The good news is, I added an easy way for you to add anything you want to a PO or a Packing List. Of course, this requires a little manual input. It wouldn't be too hard to implement this with a checkbox to turn it on or off, but to add this on a per supplier basis would require messing around with SQL, and I am really not comfortable doing that. I just don't know enough about SQL. If you don't mind getting your hands dirty, you could always define your subcontractors and then add a simple if statement for them to add this info. Of course, this would hardcode these changes, so it would be difficult to undo. It is an interesting idea though. I'll keep it in mind.

I did a quick but dirty workaround by changing the "city" label to "city state zip" and used old "state" and "zip" fields to store the (one-time) credit card # and account # respectively.

New question - how do I disable sending the packing slip pdf with the email? My dropshippers have their own packing slips and do not want to be bothered with the added paperwork...

16 Apr 2008, 8:58 PM
#80
daddio53 avatar

daddio53

New Zenner

Join Date:
Oct 2007
Posts:
11
Plugin Contributions:
0

Re: Drop Shipping Purchase Orders Module for v1.3.8

srturner47:

Daddio53 - Glad to hear that! Enjoy!

Copies going out like clockwork.

However, here is a problem for me. I am in the US and the PO emails are going out with an incorrect shipping address. That is the postcode is placed in the address line ahead of the State. E.g.

City, Postal Code, State/Province

where it should be

City, State/Province, Postal Code.

Can you tell me what code changes in send_pos.php are required to fix this?

Also, it would also be helpful to remove the comma :,: between the state and postal code.

Thanks in advance for helping those of us who are PHP illiterate.