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

Drop Shipping Purchase Orders Module for v1.3.8

Views: 134,649

Results 1 to 20 of 524
23 Jan 2008, 23:33
#1
keepsake avatar

keepsake

New Zenner

Join Date:
Sep 2005
Posts:
91
Plugin Contributions:
0

Drop Shipping Purchase Orders Module for v1.3.8

http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=981

Very hot, released right now. It's a surprisingly popular :) contribution and thank you to all those who use it - you guys give me a way to pay back to the ZC community for making ZC happen in the first place!

If you search this forum for "Drop shipping" or "Purchase orders" you will find some past threads showing the feedback this module had, this should help you decide if you need it (if the users manual at the bottom doesn't help there).

Tia.

Maciek


V1.3B UPGRADES


  1. Incorporated updates and fixes made by Prattski to make this ZenCart v1.3.x compliant. TESTED ON 1.3.8.
  2. General code maintenance, moved all necessary information to configuration variables
  3. Updated list of available mail template tagnames both in subject and in contents of sent messages
  4. Added debug mode for sending POs (admin/includes/extra_configures/purchaseorders DEBUGMODE set to Yes if needed)

USER'S MANUAL (CRUDE FOR NOW)


All of the options are available in the admin, of course.

EXTRAS/EDIT SUBCONTRACTORS

  1. You can enter a list of subcontractors/dropshippers (SCs from now on) you work with (all their contact info, emails, phone, etc.)

EXTRAS/SET SUBCONTRACTORS 2) You can set a default SC for each product

CUSTOMERS/SEND POS 3) Using admin you can send POs to SCs

3.1) For each order in Processing you will see a list of all ordered products along with customer info in a simple table. For any 1+ -> all of such order items, you can send POs to their default SCs, or select another SC from a drop-down list (separate for each ordered item and customer). One of the SCs is called "Own stock" which means you commit to ship the item from your stock. Useful if you happen to do that. :)

3.2) For each product item selected, they will be grouped by customer into respective POs and emails will be sent to those SCs. Each PO would be dated and numbered. All the info for drop-shipping is in the email: what was ordered and where does it have to be shipped to.


Example:

  • John ordered 5 items. 2 of them from SC#1, 2 of them from SC#2, the last one normally sent from your stock
  • Mary ordered 3 items. 1 from SC#1, 1 from SC#2, 1 from your stock

Say you have a returned item identical to one of John`s normally sent to SC#1 on your own stock and you want to move it.

Hit the Send POs screen. You`ll see 8 rows in the table. One for each ordered product. Each product would have a check box (send PO yes/no) and a drop-down menu (choosing the recipient of the PO, already prefilled upon default product SC).

Youd flip all the Send PO checkboxes to yes. You would change the Johns product you happen to have from SC#1 to Own stock. You`d hit SEND POs.

SC#1 will get 2 emails. One for each order and with one product on each one. SC#2 will get 2 emails. One for each order, with two products on each one. You will get 2 emails. One for each order, first with 2 products (John) and the other with 1 product (Mary).


3.3) You would be able to re-send POs. Youd be able to search past POs by number, date range and recipient. Say SC#2 cannot process Marys order, but SC#1 can (although he wouldnt be the default recipient). Look up that old PO by number, change the recipient to SC#1 and hit SEND. Its renumbered and re-dated and emailed to SC#1.

CUSTOMERS/ENTER TRACKING

  1. For items sent to your own stock, you`d be able to enter tracking numbers. THIS WOULD WORK THANKS TO THE TY_PACKAGE_TRACKER Contribution. YOU NEED TO HAVE IT INSTALLED IN ORDER FOR TRACKING TO WORK!

  2. Each PO email will have a link to a simple form that would allow the recipient to choose which items were shipped and enter tracking info (carrier and number) for each (or all if he did it right and bundled them in a package). Thus you, the store owner, know all tracking info for each package that was shipped for that order.

  3. The comments for the order would be updated with tracking info (with a link to the carrier's tracking page already prefilled with the tracking number) and a designation which item(s) were shipped in each package.

24 Jan 2008, 06:10
#2
coop1979 avatar

coop1979

New Zenner

Join Date:
May 2006
Location:
Columbia, SC
Posts:
26
Plugin Contributions:
0

Re: Drop Shipping Purchase Orders Module for v1.3.8

Wow, I look forward to testing this mod. Is this still in "beta" or is it ok for live sites?

24 Jan 2008, 15:20
#3
keepsake avatar

keepsake

New Zenner

Join Date:
Sep 2005
Posts:
91
Plugin Contributions:
0

Re: Drop Shipping Purchase Orders Module for v1.3.8

Coop1979:

Wow, I look forward to testing this mod. Is this still in "beta" or is it ok for live sites?

It's OK for live sites. I'm using it.

24 Jan 2008, 15:52
#4
coop1979 avatar

coop1979

New Zenner

Join Date:
May 2006
Location:
Columbia, SC
Posts:
26
Plugin Contributions:
0

Re: Drop Shipping Purchase Orders Module for v1.3.8

So here's a question - how hard would it be to have the system hold the orders and send them out once in a batch (in one email) at a pre-specified time? We send all of our orders at 2pm everyday.

25 Jan 2008, 08:20
#5
keepsake avatar

keepsake

New Zenner

Join Date:
Sep 2005
Posts:
91
Plugin Contributions:
0

Re: Drop Shipping Purchase Orders Module for v1.3.8

Coop1979:

So here's a question - how hard would it be to have the system hold the orders and send them out once in a batch (in one email) at a pre-specified time? We send all of our orders at 2pm everyday.

You would have to write your own version of send_pos.php. It's doable, but not easy.

27 Jan 2008, 03:32
#6
solarflare avatar

solarflare

Zen Follower

Join Date:
Sep 2006
Posts:
81
Plugin Contributions:
0

Re: Drop Shipping Purchase Orders Module for v1.3.8

Run into a problem when I installed it. Actually, let me back up. This is BRILLIANT and the timing couldn't be better!

I'm getting this error when i send a PO (just one) and when I re-send an old PO (all 3 together) - the PO is still sent.

[B]Warning[/B]:  mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in [B]/home/****/public_html/admin/send_pos.php[/B] on line [B]457[/B]

[B]Warning[/B]:  mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in [B]/home/****/public_html/admin/send_pos.php[/B] on line [B]460[/B]

[B]Warning[/B]:  mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in [B]/home/****/public_html/admin/send_pos.php[/B] on line [B]465[/B]

Keepsake:

It's OK for live sites. I'm using it.

27 Jan 2008, 07:12
#7
keepsake avatar

keepsake

New Zenner

Join Date:
Sep 2005
Posts:
91
Plugin Contributions:
0

Re: Drop Shipping Purchase Orders Module for v1.3.8

It's not an error, as you see, it's a warning. It's got something to do with your MySQL version. Which one are you running? Does anybody else have this?

27 Jan 2008, 07:22
#8
solarflare avatar

solarflare

Zen Follower

Join Date:
Sep 2006
Posts:
81
Plugin Contributions:
0

Re: Drop Shipping Purchase Orders Module for v1.3.8

Thanks for the reply. Here are my details.

PHP Version: 4.4.4 (Zend: 1.3.0) PHP Memory Limit: 40M Database: MySQL 4.1.22-standard

Keepsake:

It's not an error, as you see, it's a warning. It's got something to do with your MySQL version. Which one are you running? Does anybody else have this?

10 Feb 2008, 05:55
#9
jgarvas avatar

jgarvas

New Zenner

Join Date:
Feb 2008
Posts:
15
Plugin Contributions:
0

Re: Drop Shipping Purchase Orders Module for v1.3.8

If I install this can I set it up so that orders that are always fulfilled by a single place are automatically sent as soon as the credit card charge is approved?

Maybe that is the default behavior?

-jeff

10 Feb 2008, 07:52
#10
keepsake avatar

keepsake

New Zenner

Join Date:
Sep 2005
Posts:
91
Plugin Contributions:
0

Re: Drop Shipping Purchase Orders Module for v1.3.8

jgarvas:

If I install this can I set it up so that orders that are always fulfilled by a single place are automatically sent as soon as the credit card charge is approved?

Maybe that is the default behavior?

-jeff

No, the module doesn't have that behavior implemented at all.

Maciek

11 Feb 2008, 03:47
#11
duran_goodyear avatar

duran_goodyear

New Zenner

Join Date:
Jan 2005
Posts:
22
Plugin Contributions:
0

Re: Drop Shipping Purchase Orders Module for v1.3.8

solarflare:

Run into a problem when I installed it. Actually, let me back up. This is BRILLIANT and the timing couldn't be better!

I'm getting this error when i send a PO (just one) and when I re-send an old PO (all 3 together) - the PO is still sent.

[B]Warning[/B]: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in [B]/home/****/public_html/admin/send_pos.php[/B] on line [B]457[/B]

[B]Warning[/B]: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in [B]/home/****/public_html/admin/send_pos.php[/B] on line [B]460[/B]

[B]Warning[/B]: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in [B]/home/****/public_html/admin/send_pos.php[/B] on line [B]465[/B]



When I send a NEW PO, I get this error

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/tanningb/public_html/z/admin/send_pos.php on line 367


But the email shows up in my inbox (as a test, I have my own personal email address as a Supplier that the PO needs to be sent to), and it looks correct.

If I go back and try to resend the PO, I get the errors as above.
When I send the PO Again, the email shows up in my inbox, but everything except for the template is empty. so I see something like this.

TO: , , , ()

Dear ,

PO #12 Our order # (timestamp: )


I'm eager to launch my zencart site with this module, is there any resolution for this problem?

my details...
PHP version is: 5.2.5
mySQL version is: 5.0.45


Thank you!
11 Feb 2008, 05:30
#12
jgarvas avatar

jgarvas

New Zenner

Join Date:
Feb 2008
Posts:
15
Plugin Contributions:
0

Re: Drop Shipping Purchase Orders Module for v1.3.8

I installed in a 1.3.7 installation. Setup a fake SC for myself. Ordered an item I had associated with me as the SC.

I went into Customers -> P/O's Send receiver -> Picked the third order and checked the box, saw that it had my SC. I hit submit and leave the first two orders alone.

I get this text back:

Nie mo¿na otworzyc pliku

...and the item remains as a new PO not sent. Did I do something wrong on the install?

11 Feb 2008, 05:51
#13
jgarvas avatar

jgarvas

New Zenner

Join Date:
Feb 2008
Posts:
15
Plugin Contributions:
0

Re: Drop Shipping Purchase Orders Module for v1.3.8

Ok I peeked at the code and I wasn't loading the templates. Turns out I didn't copy the email/ directory over. Didn't realize that from the directions.

Now I submitted one PO to my fake SC and it is no longer in the list, but I get this on the redrawn page:

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in .../admin/send_pos.php on line 367

Line 367 is the second of these two:

                            $check_if_po_sent = mysql_query("SELECT * FROM orders_products WHERE orders_products_id = '$tm'");
                            $if_po_sent = mysql_fetch_assoc($check_if_po_sent);

Thoughts?

11 Feb 2008, 16:03
#14
jgarvas avatar

jgarvas

New Zenner

Join Date:
Feb 2008
Posts:
15
Plugin Contributions:
0

Re: Drop Shipping Purchase Orders Module for v1.3.8

Keepsake:

I'm having another issue that is confusing me. I received the email as a SC and there was a link to go to confirm_track_sub.php in that email. I can't get that to work for anything.

First, the confirm_track_sub is full of references to zarzad/includes -- I tried changing all occurrences of this to admin but I'm still getting all types of session errors and such.

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at .../devel/confirm_track_sub.php:10) in .../devel/includes/functions/sessions.php on line 108

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at .../devel/confirm_track_sub.php:10) in .../devel/includes/functions/sessions.php on line 108

Warning: Cannot modify header information - headers already sent by (output started at .../devel/confirm_track_sub.php:10) in .../devel/includes/init_includes/init_templates.php on line 78

Warning: main(admin/includes/extra_datafiles/po_database_names.php) [function.main]: failed to open stream: No such file or directory in .../devel/confirm_track_sub.php on line 39

Fatal error: main() [function.require]: Failed opening required 'admin/includes/extra_datafiles/po_database_names.php' (include_path='.:/home/myuser/php4/lib/php') in .../devel/confirm_track_sub.php on line 39

I did some digging around to see if I could figure something out, and I noticed that this doesn't exist, nor does it appear to be added by the Ty package manager or this mod:

admin/includes/extra_datafiles/po_database_names.php

14 Feb 2008, 00:30
#15
duran_goodyear avatar

duran_goodyear

New Zenner

Join Date:
Jan 2005
Posts:
22
Plugin Contributions:
0

Re: Drop Shipping Purchase Orders Module for v1.3.8

ping to this thread... does anyone have any suggestions on the MYSQL warnings that I've been getting?

When I send a PO, I get these MYSQL warnings. The Email is sent, but I get one warning.. Code:

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/tanningb/public_html/z/admin/send_pos.php on line 367

But when I send it for a 2nd time, I get a blank email that only has the template text in it, and I get 3 mysql warnings.

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/****/public_html/admin/send_pos.php on line 457

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/****/public_html/admin/send_pos.php on line 460

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/****/public_html/admin/send_pos.php on line 465

Any thoughts?

14 Feb 2008, 05:17
#16
jgarvas avatar

jgarvas

New Zenner

Join Date:
Feb 2008
Posts:
15
Plugin Contributions:
0

Re: Drop Shipping Purchase Orders Module for v1.3.8

I believe I've fixed the problem for my issues on line 367. I tried running the SELECT query from 366 myself and it failed. No such table -- but when I installed I made all of my tables prefixed by zen_

So I took this code:

$check_if_po_sent = mysql_query("SELECT * FROM orders_products WHERE orders_products_id = '$tm'");

and I changed the 'orders_products' like so:

$check_if_po_sent = mysql_query("SELECT * FROM ".TABLE_ORDERS_PRODUCTS." WHERE orders_products_id = '$tm'");

I think that this might help you as well duran.goodyear.. I looked at line 456:

$orders_table_query = mysql_query("SELECT * FROM orders WHERE orders_id = $orderid");

and 459:

$orders_products_query = mysql_query("SELECT * FROM orders_products WHERE (orders_id = $orderid) AND (products_name = '$product_name')");

and 464:

$subcontractor_query = mysql_query("SELECT * FROM subcontractors WHERE subcontractors_id = $subcontractor_id");

In each of these cases your SQL query may be failing because you have a prefix on each of your tables and the code is looking for the tables without that prefix.

Despite my success here I still can't get the confirm_tracking number for suppliers to use to work. I'm not too sure why yet. Keepsake? :-)

14 Feb 2008, 07:31
#17
keepsake avatar

keepsake

New Zenner

Join Date:
Sep 2005
Posts:
91
Plugin Contributions:
0

Re: Drop Shipping Purchase Orders Module for v1.3.8

Guys,

I'm sorry that the sloppy code caused so many problems for you.

I've just uploaded an updated version to https://www.bumpernut.com/purchaseorders.zip

  1. DATABASE PROBLEMS

There were a few lines in the code that had hardcoded references to database table names and they wouldn't work if your table name prefix was not empty.

I have replaced them with dynamic references as it was done in all other places of this module (and is required by ZenCart, in fact)

  1. CONFIRM_TRACK_SUB PROBLEMS

That code references some of the files in the admin directory: stylesheets, language files, etc. In my installation the admin directory was relocated and so were the references to it.

The uploaded version has references to admin again, however please remember that when you install it, if you have changed admin to something else (as is strongly suggested by the ZenCart team) you need to fix all the references in that file - line numbers are marked in a large comment at the beginning of the file.

Hope that helps everyone! Maciek

14 Feb 2008, 07:39
#18
keepsake avatar

keepsake

New Zenner

Join Date:
Sep 2005
Posts:
91
Plugin Contributions:
0

Re: Drop Shipping Purchase Orders Module for v1.3.8

jgarvas:

admin/includes/extra_datafiles/po_database_names.php

I've fixed that as well, it's called purchaseorders.php now. I didn't catch it because I still had the old file in my test filesystem. :)

I THINK the headers already sent by errors are resulting from a failed require, please upload the new version of the file and tell me if you still get it.

14 Feb 2008, 14:05
#19
duran_goodyear avatar

duran_goodyear

New Zenner

Join Date:
Jan 2005
Posts:
22
Plugin Contributions:
0

Re: Drop Shipping Purchase Orders Module for v1.3.8

Yep, I have a prefix on my table names. I'll give your code fixes a shot tomorrow or over the weekend and see where they take me.

Thanks for the response guys!

14 Feb 2008, 19:12
#20
gabstero avatar

gabstero

Zen Follower

Join Date:
Nov 2007
Posts:
342
Plugin Contributions:
0

Re: Drop Shipping Purchase Orders Module for v1.3.8

Gang,

I seem to be having slightly different error messages upon a click on the link at the bottom of a PO email (although everything seems to be working fine otherwise):

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/admin/confirm_track_sub.php:10) in /home/includes/functions/sessions.php on line 108

Warning: Cannot modify header information - headers already sent by (output started at /home/admin/confirm_track_sub.php:10) in /home/admin/includes/init_includes/init_templates.php on line 36

Any clues where would be the problem?

thanks.