-
Drop Shipping Purchase Order Module
I know that this old module is no longer being developed, but I need it for Zen Cart 1.3.7. Has anyone got it working for the latest release?
Apparently, there are some files that have been removed in the most recent releases that are still included in the file confirm_track_sub.php:
require('../includes/classes/email.php');
require('../includes/classes/mime.php');
These files are no longer in Zen Cart. Does anyone know how to make this work with 1.3.7? Please help - this is causing problems so that I cannot offer my suppliers to click a link in the email in order to enter the tracking information themselves. This will require me to take an extra step to get the tracking info from them and add it myself.
Thank you!
-
Re: Drop Shipping Purchase Order Module
email.php and mime.php were core Zen Cart files, certainly up to 1.2.7 If the mod requires them, simply copy them into the classes folder.
-
Re: Drop Shipping Purchase Order Module
These files were deleted in 1.3.x so I do not have them - were they replaced by other specific files that I can substitute. If not, and I grab them from an old version, wouldn't that mess something up in my current setup?
-
Re: Drop Shipping Purchase Order Module
I just tested this out and it still doesn't work. No matter what I do I get errors or "Illegal Access"...I wonder if anyone got this working for 1.3.x..........
-
Re: Drop Shipping Purchase Order Module
Are your permissions set correctly? Illegal access may indicate a problem there.
Can you PM me the mod you are working with (zipped). I'll take a look.
-
Re: Drop Shipping Purchase Order Module
I sent you a link in a PM. I don't know which permissions to set. Also, I mentioned that I am using Super Orders 2.0 as well so I don't know if that might be an issue too.
-
Re: Drop Shipping Purchase Order Module
The mod works fine with version 1.3.X with some small edits. Those files you are worried about can probably be commented out, as I suspect they are no longer required. if not, simply download a copy of Zen Cart 1.2.7, extract those two files, and put them in the right place.
However, you are attempting to use Ty Package tracker, as the area in which you are having problems is in the Po Modules integration with the tracker. Between the ZC 1.2.X and 1.3.X versions of the tracker, several file names changed, so that is hardly surprising, but it shouldn't be too difficult to fix.
-
1 Attachment(s)
Re: Drop Shipping Purchase Order Module
-
Re: Drop Shipping Purchase Order Module
Hey Chuckl - this worked (thanks!) except I get the following above the tracking info:
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/think28/public_html/shop/admin/confirm_track_sub.php:10) in /home/think28/public_html/shop/includes/functions/sessions.php on line 108
Warning: Cannot modify header information - headers already sent by (output started at /home/think28/public_html/shop/admin/confirm_track_sub.php:10) in /home/think28/public_html/shop/admin/includes/init_includes/init_templates.php on line 36
??
-
Re: Drop Shipping Purchase Order Module
Then I logged out of admin and got this:
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/think28/public_html/shop/admin/confirm_track_sub.php:10) in /home/think28/public_html/shop/includes/functions/sessions.php on line 108
Warning: Cannot modify header information - headers already sent by (output started at /home/think28/public_html/shop/admin/confirm_track_sub.php:10) in /home/think28/public_html/shop/admin/includes/init_includes/init_templates.php on line 36
Warning: Cannot modify header information - headers already sent by (output started at /home/think28/public_html/shop/admin/confirm_track_sub.php:10) in /home/think28/public_html/shop/admin/includes/functions/general.php on line 34
So I wonder if I need to change session settings or something. I obviously can't create admin profiles for each supplier...
-
Re: Drop Shipping Purchase Order Module
No idea. I neither get the error messages, nor use tracking. Normally, the 'headers already sent means that you have blank lines at the top or bottom of the file, so check the new file for blank lines at the end, and remove them, if any.
Might also have something to do with your session settings in Admin-Configuration
-
Re: Drop Shipping Purchase Order Module
I got it working ok but the email that goes to the customer with the tracking information looks like this now:
EMAIL_SEPARATOR
EMAIL_TEXT_ORDER_NUMBER 4
EMAIL_TEXT_INVOICE_URL
EMAIL_TEXT_DATE_ORDERED 2007-05-02 21:35:32
EMAIL_TEXT_COMMENTS_UPDATEPartial shipping, items:Test Product Numero Dos
Your FedEx Tracking ID is 7693346523456788
You can track your package at
EMAIL_TEXT_STATUS_UPDATEDEMAIL_TEXT_STATUS_LABELEMAIL_TEXT_STATUS_PLEASE_REPLYHo w can I get those fixed?
-
Re: Drop Shipping Purchase Order Module
Quote:
Originally Posted by
jderrers
I got it working ok but the email that goes to the customer with the tracking information looks like this now:
EMAIL_SEPARATOR
EMAIL_TEXT_ORDER_NUMBER 4
EMAIL_TEXT_INVOICE_URL
EMAIL_TEXT_DATE_ORDERED 2007-05-02 21:35:32
EMAIL_TEXT_COMMENTS_UPDATEPartial shipping, items:Test Product Numero Dos
Your FedEx Tracking ID is 7693346523456788
You can track your package at
EMAIL_TEXT_STATUS_UPDATEDEMAIL_TEXT_STATUS_LABELEMAIL_TEXT_STATUS_PLEASE_REPLYHo w can I get those fixed?
Sounds like the defines for those CONSTANTS are not "linking up".
-
Re: Drop Shipping Purchase Order Module
FIXED :)
I just needed to add back require('includes/languages/english/orders.php'); into the file that Chuckl modified for me. That's where those defines were coming from. Thanks everyone! I think I got it.
:clap:
-
Re: Drop Shipping Purchase Order Module
:frusty:
Alrighty. I have another issue with this mod. If I am not logged into the admin, the supplier cannot access the tracking page because they are not an admin and the mod is located in admin. They would need their own login or a generic login, but this causes other issues I can't deal with. I also can't create a bunch of logins with different settings for all the different suppliers.
So, is there a way for them to bypass logging in just for the tracking and purchaseorder mod (ie, make it accessible without being an administrator)?
-
Re: Drop Shipping Purchase Order Module
Have you looked at the "Admin Profiles" module yet? I would allow you to assign logins to people and then only give them access to the sections of the cart (within the admin) that you designate.
Link to the download is:
http://www.zen-cart.com/index.php?ma...products_id=86
You could create an account there, and only give it access to that Purchase Order Module.
-
Re: Drop Shipping Purchase Order Module
I tried that but when they click the tracking link they are prompted to log in, which is fine. But once they are logged in, it doesn't continue on to the tracking page. Instead it takes them to the main admin page. That means, they have to go back to the email and click the link again to get to the tracking page. Seems more trouble for them...
-
Re: Drop Shipping Purchase Order Module
Sorry to ######## in on this thread but I was wondering how to remove the section of the email that allows the subcontractor to click to enter tracking information?
I can't seem to find it.
-
Re: Drop Shipping Purchase Order Module
Will there be an update to this?
I can live with most of it anyway.
I too would like to know how to take out that tracking line.
(Would rather have it work... ) But having the company do anything but
just clicking the link would be a nightmare.
I would like to know if I could do one thing.
How can I make the list go from the most current order first???
-
Re: Drop Shipping Purchase Order Module
I tried every combination in my developers tool kit.
How can I get rid of the link in the emails that says
If you'd like to enter tracking information for this order, please visit:
http://www.******.com/admin/confirm_...ub.php?x=0&y=4
While I am there, I would also like to take out the customers email address and phone number.
The sub contractor doesn't need that information.
Heck, while I am there. I think it would be good to add some text, Like Our Companies Phone Number and some sort of message...
Can this be edited???
-
Re: Drop Shipping Purchase Order Module
Of course reading the readme files sometimes helps.... :yes:
Quote:
2) If you are not interested in the tracking functionalities, you need to remove links to that functionality so that your admin menu doesn't show them. In the contribution files, find /admin/includes/boxes/extra_boxes/send_po_customers_dhtml and add two slashes (//) in front of this line:
$za_contents[] = array('text' => BOX_CUSTOMERS_CONFIRM_TRACKING, 'link' => zen_href_link(FILENAME_CONFIRM_TRACKING, '', 'NONSSL'));
3) Copy the entire structure starting with admin to your store.
4) Customize the email templates if you want. There are two three text files in /admin starting with email_. These contain the templates for the PO description (header and footer) and the PO fields (the product data rows). The tags enclosed in {} brackets are replaced with actual values when POs are being sent. I`m sure the rest is self-explanatory. :)
If you are removing tracking functionality, make sure to remove the {tracking_link} tag so that the emails do not contain a link for your subcontractors to enter tracking information.
-
Re: Drop Shipping Purchase Order Module
I know.. I am talking to myself alot this thread..
Ok. Editing the three files was VERY easy.
Taking out the tracking info.. Easy as well.
Now I am just dying to have the orders appear from the most recent order first.
Any way to change how its listed??
-
Re: Drop Shipping Purchase Order Module
Yea Yea its me once again...
When an email goes out, there is no name on the "From:" section in the email being sent. I cant seem to find where the From is being pulled from.
-
Re: Drop Shipping Purchase Order Module
Ok...
So here are my list of questions.
#1) Can I change the order from Ascending to Decending
#2) When it sends out emails, it says the sender is from "( none )" How can I fix this?
#3) In the admin where you can edit the subject line:
Quote:
Subject of PO emails, {po_number} will be replaced with the actual number
How Can I change {po_number} with {order_number} (It wouldn't just take {order_number})
#4) And I seriously doubt there is anything that can be done with this.
What do I do if there are 2 items ordered for the same subcontractor that has to be ordered together.
Is this mod going to be picked up by anyone for further development? I think it should. Its really is a huge thing for us!
This is a a dream mod for anyone who has a site with dropshipping needs.
And I think its 90% there with the 10% just being what I mentioned above.
-
Re: Drop Shipping Purchase Order Module
#1
I presume you means that you want newest orders first?
Yes you can change the order, in admin/send_pos.php, line 778 or so, change the line reads
query=mysql_query("SELECT orders_products_id, orders_id, orders_products_id, products_name, products_id FROM ".TABLE_ORDERS_PRODUCTS." WHERE po_sent='0' AND po_number IS NULL LIMIT $start, $l_odp_nastronie")
to
query=mysql_query("SELECT orders_products_id, orders_id, orders_products_id, products_name, products_id FROM ".TABLE_ORDERS_PRODUCTS." WHERE po_sent='0' AND po_number IS NULL ORDER BY 2 DESC LIMIT $start, $l_odp_nastronie")
#2
Same file, line 33, it uses the 'Email Address (Sent From)' in Admin-Configuration-Email Options.
#3
I presume you want to use the cutomer order number there, not the po number?
It won't accept order_number because the database field is called order_id, not order_number
#4
I assume you mean that you would like to combine multiple products on 1 customer order supplied by the same subcontractor onto 1 email?
The whole package is set up on a per product basis, rather than a per subcontractor basis, but this could probably be done without too much effort.
Regarding whether anyone is going to pick up this mod, it is by no means clear to me that all of it is released under the GPL. No one is going to touch proprietary code, or submit it to the ZC downloads section.
Secondly, even if the code is indeed unencumbered, anyone attempting this will have to ask 'How fluent am I in Polish?'
-
Re: Drop Shipping Purchase Order Module
Hello all,
Is this the module called DropShippingSuppliersInterface?
Thanks,
-
Re: Drop Shipping Purchase Order Module
No, the Drop Shipping supplier interface is for websites that act as a 'marketplace' for a number of different suppliers. The website owner supplies the showcase, and the individual suppliers manage their own products on the site.
The module being discussed here is generally for a site owner who supplies a variety of goods from different manufacturers, and wants the site software to produce a purchase order for ordering the goods from one of these manufacturers when a customer places an order on the site.
The goods are often drop shipped directly to the customer.
The difference between Ebay and Amazon might be a good analogy.
-
Re: Drop Shipping Purchase Order Module
Hello Chuckl,
Many thanks for getting back to me. I understand. I was looking through the downloads section, and my save mods on my hard drive, but I don't think I spotted it. Do you know where I can obtain this module from?
Thanks in advance,
Heathenmagic :smile:
-
Re: Drop Shipping Purchase Order Module
It has never been available from the downloads section here, hence my comments above about GPL, updating and distribution.
But, short answer, yes. Have a look here:
http://www.zen-cart.com/forum/showthread.php?t=29466
If you read the whole thread, there are references to changes, additions, options, etc e.g. a send_pos_verbose.php that I have never seen, and the zip file 'as is' is extremely unlikely to work with 1.3.X versions.
Again, as noted above, there are 5 or 6 files in the package without GPL headers, which makes running with it a little awkward.
-
Re: Drop Shipping Purchase Order Module
Hello Chuckl,
Much obliged. Will look through the thread for fixes and have found the zip file.
All the best,
Heathenmagic :lookaroun
-
Re: Drop Shipping Purchase Order Module
Thanks so much Chuckl!
The decending code worked like a charm!
Now this is what I am running into...
Quote:
Originally Posted by
Chuckl
#2
Same file, line 33, it uses the 'Email Address (Sent From)' in Admin-Configuration-Email Options.
I have an email address in that section in Admin- Email Options but its not picking it up.
Quote:
Originally Posted by
Chuckl
#3
I presume you want to use the cutomer order number there, not the po number?
It won't accept order_number because the database field is called order_id, not order_number
Do you think there would be any way to change this? I just tried butting in {order_id} in this area. However the only thing working is {po_number}[/QUOTE]
Quote:
Originally Posted by
Chuckl
#4
I assume you mean that you would like to combine multiple products on 1 customer order supplied by the same subcontractor onto 1 email?
The whole package is set up on a per product basis, rather than a per subcontractor basis, but this could probably be done without too much effort.
}
Cool. Now I wish I only knew how to do this....:lookaroun
Because we rely on alot of Dropshipping companies. I see this as an indespensable mod that should be incorparated into the core release on zen. But who knows, maybe thats just me.
-
Re: Drop Shipping Purchase Order Module
Thats odd on the email from side. I assume we are talking about the same thing, which is the From: in the email header?
You can try forcing it, by just under this line in send_pos.php (line 35 or so)
$PO_FROM=$row_from[0];
add
$PO_FROM='[email protected]';
just below the above line,
obviously replacing the correct email address in there, and see if that helps.
I just checked the code to do with the Subject PO number. While it gives you the choice to have 'anything' in there in the admin config, in practice it is 'anything as long as it's the PO number'. I need to spend a minute or two to work out how to fix that.
Don't fret too much about the one email/multiple product, it's a very good suggestion. I'll have a look when I get a mo'. Main blocking factor is the dreadful tortuous SQL code I have to wade through.
-
Re: Drop Shipping Purchase Order Module
I tried this on that line:
Quote:
//wyciaganie informacji od kogo jest e-mail
$result_po_from=mysql_query("SELECT configuration_value FROM ".TABLE_CONFIGURATION." WHERE configuration_key='EMAIL_FROM'");
$row_from=mysql_fetch_array($result_po_from, MYSQL_NUM);
$PO_FROM=$row_from[0];
$PO_FROM='nothingbutcostumes.com';
But I still get (None) from the sender section in the email :frusty:
Quote:
Originally Posted by
Chuckl
I just checked the code to do with the Subject PO number. While it gives you the choice to have 'anything' in there in the admin config, in practice it is 'anything as long as it's the PO number'. I need to spend a minute or two to work out how to fix that.
Oh Thank you so much. The Link To add tracking numbers (As stated earlier does not work) So instead what I am asking from my vendors inside the email is to just reply leaving our order number in the subject of the email. Which would save me a step from having to look up the PO number to get the Order Number.
Quote:
Don't fret too much about the one email/multiple product, it's a very good suggestion. I'll have a look when I get a mo'. Main blocking factor is the dreadful tortuous SQL code I have to wade through.
Which, If all of the above gets fixed would make this in fact a complete solution if any one wants to implement drop shipping into their site. :clap:
-
Re: Drop Shipping Purchase Order Module
The
$PO_FROM='nothingbutcostumes.com';
needs to be [email protected]
i.e.
$PO_FROM = '[email protected]';
If that fails, I'd also suggest you put a space in front of the email address, to see if that cures your 'none' problems
i.e.
$PO_FROM = ' [email protected]';
if not, I'm afraid it is an email problem with your server setup, not a po mod problem.
The Order # rather than PO # looks like it can be cured quite simply. Elegantly might take a bit more time.
I don't have time to test it at the moment, I'll post it when I have done so.
-
Re: Drop Shipping Purchase Order Module
Quote:
Originally Posted by
Chuckl
Sends it the same way I am having problems with.
Quote:
Originally Posted by
Chuckl
If that fails, I'd also suggest you put a space in front of the email address, to see if that cures your 'none' problems
i.e.
$PO_FROM = '
[email protected]';
Doesnt send anything out at all.
if not, I'm afraid it is an email problem with your server setup, not a po mod problem.
Argh... I wouldnt know where to start. Its not on the server side, All that does it foward the address to a location. I cant find anything in conf....
Quote:
Originally Posted by
Chuckl
The Order # rather than PO # looks like it can be cured quite simply. Elegantly might take a bit more time.
I don't have time to test it at the moment, I'll post it when I have done so.
I look foward to it.. Thanks!
-
Re: Drop Shipping Purchase Order Module
It sounds like your hosting setup is not allowing you to override the 'sendmail_from' address. Unfortunately send_pos.php uses the native mail() function on the server, rather than using the zen_mail function in Zen Cart, so nothing you change will make any difference. Another small change I should look at....
Back to your order numbers, firstly, you would need to change the PO from in Admin-My Store from
PO #{po_number}
to
Order # {order_number}
Then look for the line
$wielowymiar[$i][4]=$row4[31]; //id_orders
around line 297, and add, repeat add
$orderno=$row4[31];
immediately after it.
Then find
$tematk=str_replace("{po_number}",$kod,$tematk);
around line 433, and replace, repeat replace it with
if (strpos($tematk,"{order_number}")) {
$tematk=str_replace("{order_number}",$orderno,$tematk);
}
else $tematk=str_replace("{po_number}",$kod,$tematk);
That should then give you your order site number in the subject, with the PO number in the body of the message.
-
Re: Drop Shipping Purchase Order Module
Parse error: parse error, unexpected T_STRING in /home/***/send_pos.php on line 436
Quote:
$tematk=$PO_SUBJECT;
if (strpos($tematk,"{order_number}")) {
$tematk=str_replace("{order_number}",$orderno,$tem atk);
}
else $tematk=str_replace("{po_number}",$kod,$tematk);
$po_from="FROM:".$PO_FROM;
$tracking_link_1=HTTP_SERVER.DIR_WS_ADMIN."confirm_track_sub.php?x=".$dlaemaila. "&y=".$kod;
-
Re: Drop Shipping Purchase Order Module
Probably the space in the second $tematk
$tematk=str_replace("{order_number}",$orderno,$tem atk);
remove it.
Suffered in the translation I guess.
-
Re: Drop Shipping Purchase Order Module
Ok!
It working! Uhhh... Almost!
The only problem is when you click on morew then 1 Po to send out at
one time. Then it sends the same number in the header in all the emails.
Ok if you want to send out 1 at a time. But not good for multibles....
-
Re: Drop Shipping Purchase Order Module
Ah, not all of us are in direct competition with Amazon and Co. Not used to sending out more than 1 PO at a time.
Just add [$i] after each instance of $orderno -
i.e. Change $orderno to $orderno[$i] in both areas you edited.
-
Re: Drop Shipping Purchase Order Module
:shocking: Ok this is strange... Now the email address as sender is showing up :shocking:
The strange part... In the OLDER emails too!!!
Weird...
Ok.. Also the Orders Numbers is working properly :clap:
So the only thing left is the combined orders... Thanks so much Chuckl!
-
Re: Drop Shipping Purchase Order Module
Milo,
Regarding combined orders, I noticed while playing around with another change that I've been meaning to do, namely HTML email for Po's, that if you tick/select 2 or more items from the same subcontractor on the same customer order, they are combined into 1 email.
So that aspect of combined orders is already there.
Rgds,
-
Re: Drop Shipping Purchase Order Module
Chuckl:
I dont think that is the case with what I have.
I haven't set up my contractors yet.
So All I have done to test has been re-sending the same 3 Po's as
"Own Stock" so they are sent to me. (That How I knew that the 3 emails had
the same item number to it and you told me to add the $)
Now do you think its possible to fix the TY Package tracker to allow the vendors to add a tracking number with a click of a button??? ( well.. Just because if I get the combined thing figured out, Ill have nothing left to talk about on this thread )
-
Re: Drop Shipping Purchase Order Module
I'm hobnail booting round a semi-live site, so I have real data in there, including a forest of unsent Po's that were filled from stock. I'm also set up as dummy subcontractor, and if I take an order for 5 items, tick each one, change the sub on each one to me, and hit send PO's, 1 email arrives, listing 5 items and quantities. I'll test a bit more tomorrow, but looks promising.
Regarding Ty, I have it installed as it's needed for Drop Ship, but never used it. Do you mean the email link? We have it commented out/disabled, so I've never tried it.
-
Re: Drop Shipping Purchase Order Module
Quote:
Originally Posted by
Chuckl
I take an order for 5 items, tick each one, change the sub on each one to me, and hit send PO's, 1 email arrives, listing 5 items and quantities. I'll test a bit more tomorrow, but looks promising.
I do the same and I get 5 different emails. I am using the latest version from the download section. Not sure how to know if I have a different version.
Quote:
Do you mean the email link? We have it commented out/disabled, so I've never tried it.
Yes. Only because if I can get the emails to combine, Its the only thing I can ask for! :D
-
Re: Drop Shipping Purchase Order Module
What file is the combine code in?
I can cut a paste a clip and see if its the same.
If not, perhaps you can swap the file with me.
-
Re: Drop Shipping Purchase Order Module
Main problem is that there is no header on the file, so any 1 version looks just like any other. I sent you a PM yesterday about it.
-
Re: Drop Shipping Purchase Order Module
Very simple...
(Sorry I didn't look at my PM)
Just let me know what file it is... Tell me to look at say LINE 324 where the combine is. then I can paste the code in here so you can see what I have.
-
Re: Drop Shipping Purchase Order Module
What does this module do ? There is no README or description.
-
Re: Drop Shipping Purchase Order Module
Maybe im missing files for this module the download on page 1 of this thread has only ONE file.
Is there more files ?
-
Re: Drop Shipping Purchase Order Module
Have installed this module and it works great !!! needed some heavy modifying, but thanks to all in this thread who helped, also had to add a few more fields (qnty, payment method and publisher) we sell books, now here comes the fun part!!!! we are trying to get an api built that goes to the book distributor, this module has 90% of the code already created, and works great !!
what we are trying to do, is
bypass email and send a .dat file to server
accept a return and process/update zen customer and shipping information
i have all the specs from the distributor and think this may be a bit out of my realm!!! has anyone tried this w/ this mod?? and if not, would anyone be interested in trying this ?? or have any information on who would accept a job like this !!!
thanks again all who have designed and helped w/ mod so far !!! this is something that weve been looking for , for a bit now !!!
-
Re: Drop Shipping Purchase Order Module
Chuckl
I decided to give it a try to this module... Where can I download the files?
Thanks!
Gabstero
-
Re: Drop Shipping Purchase Order Module
Links to the download in the first post here
http://www.zen-cart.com/forum/showthread.php?t=29466
You'll also need the Ty package tracker module from the downloads area here.
-
Re: Drop Shipping Purchase Order Module
I've installed this mod in 1.3.7 (including Ty Package tracker).
Everything works in terms of configuring subcontractors (drop shippers), and the mod seems to function when I edit and set subcontractors.
What doesn't seem to work is the actual sending of emails. Can other 1.3.7 users comment on this?
I get the default order notification as before, but no Purchase Orders are sent to any of my test addresses.
-
1 Attachment(s)
Re: Drop Shipping Purchase Order Module
I actually work with creativearc (the guy who just posted above this). We have been trying to work out some of the bugs that we found with this module. Here's the things that we didn't like about it, or that didn't work:
- wouldn't send the emails (bug for 1.3.7?)
- when you resent a PO, it would increment the PO number (not sure why it needed to do this... but we didn't like it)
- Didn't display the PO number on the already sent list
So, I modified the send_pos.php file quite a bit to fix/add these features. The main bulk of the update is that resending POs does not increment the PO number. It keeps the PO number as was originally set. Everything seems to be working flawlessly now on 1.3.7. I even cleaned up the code so that it is correctly tabbed in it's if/while/for statements for the all the code at the top portion of the page before the HTML.
I'll attach the file to this post. You will need to edit two variables near the top of the page - I have labeled them though, so you can't miss them. They are just for the From Name, and From Email address for when POs are sent out.
Have any questions, please let me know. I'll try to do my best to answer them.
-
1 Attachment(s)
Re: Drop Shipping Purchase Order Module
Updated File:
Here is an updated zip file. I found a bug in it that when resending multiple POs, it would get stuck on a specific PO number for all of the POs, which was incorrect.
Here is the new file:
-
Re: Drop Shipping Purchase Order Module
I found another bug - minor - but if you want to fix this issue, here is how to do it:
In the Admin, when you go to the "Edit Drop Shippers" page, you'll notice that when you change different drop shippers to edit, you'll notice that the dark green background header information doesn't change. The fix is simple.
Open up this file: /admin/edit_subcontrac.php
if you haven't edited it much, head on down to line 260 or so. You'll see this code:
Code:
<td colspan="2" width='' class="infoBoxHeading">
<? echo "ID:$fond[0] Full name:$fond[1] "; ?>
</td>
</tr>
<?
$query2=mysql_query("SELECT * FROM ".TABLE_SUBCONTRACTORS." WHERE subcontractors_id='$cid'")
or die("Nie mozna sie polaczyc z baza danych");
$row2=mysql_fetch_array($query2, MYSQL_NUM);
// projekt szablonu do wyswietlania subcontracotow oraz wyswietlanie ich
?>
Change that code to this: (essentially just moving the query, and editing the values for the header ID and Full name)
Code:
<?
$query2=mysql_query("SELECT * FROM ".TABLE_SUBCONTRACTORS." WHERE subcontractors_id='$cid'")
or die("Nie mozna sie polaczyc z baza danych");
$row2=mysql_fetch_array($query2, MYSQL_NUM);
// projekt szablonu do wyswietlania subcontracotow oraz wyswietlanie ich
?>
<td colspan="2" width='' class="infoBoxHeading">
<? echo "ID:$row2[0] Full name:$row2[2] "; ?>
</td>
</tr>
-
Re: Drop Shipping Purchase Order Module
I've also found a way to take the confirm_track_sub.php out of the admin directory, making it possible for drop shippers to enter in tracking numbers without needing to login to the admin.
If anyone is interested, let me know and I will post the details.
-
Re: Drop Shipping Purchase Order Module
Thanks for everyone's help. This module seems to work okay now. I would like to make a few changes. Please advise. Thank you.
1. How do I change the email subject line to "Order # for (customer's name)"?
2. How do I add supplier's name in the email? I have quite a lot of suppliers.
-
1 Attachment(s)
Re: Drop Shipping Purchase Order Module
I've gotten a request as to how to move the confirm_track_sub.php out of the admin directory, so that the dropshippers don't have to login to zencart.
It's quite simple, yet complicated all at the same time. I'm including both send_pos.php and confirm_track_sub.php in a zip file on this message.
I'm sure there might be a better way to do what I did, but what I did seems to work fine. The only non-dynamic information in there (I think...) is the tracking links for each shipper. You'll see that I manually put those in near the top of confirm_track_sub.php.
Basically, open up send_pos.php (it is quite modified, so don't just overwrite your file with mine if you don't want the updates/fixes that I've done to it, as explained in the posts above). In it there is a line or two pointing to the confirm_track_sub.php. You'll need to change this in your file to point to the new file outside the admin directory.
Take my confirm_track_sub.php and put it in the main store directory (just outside the admin directory). Make the changes noted at the beginning of the file (should be only 3 or 4 lines to change I believe).
Once you've done that - it should work like a charm. Let me know if there are any issues or questions you have.
-
Re: Drop Shipping Purchase Order Module
Quote:
Originally Posted by
dealbyethan.com
Thanks for everyone's help. This module seems to work okay now. I would like to make a few changes. Please advise. Thank you.
1. How do I change the email subject line to "Order # for (customer's name)"?
2. How do I add supplier's name in the email? I have quite a lot of suppliers.
Alright - if you are using my modification, you will need to change two places. If you are not using my mod - the first change only should do it.
First Change:
I haven't tried this yet, but I imagine it will work: Find this code:
Code:
$tematk=$PO_SUBJECT;
$tematk=str_replace("{po_number}",$kod,$tematk);
Comment those both out, and then add this below it:
Code:
$tematk = 'Order #'.$kod.' for '.$row4[5];
Second Change:
This should only be done if you used my modification (written about in posts above)
Find this code:
Code:
$subject = 'PO #'.$ponumber;
Comment that out and add this below it:
Code:
$subject = 'Order #'.$ponumber.' for '.$orders['customers_name'];
Supplier's Name
As for adding the suppliers name into the email - yes, that should be easy. Just depends on where you want to add it. If you are using my modified code, the query to get the subcontractors information is already there. Simply use this variable where you want to add the name into the email:
Code:
$subcontractor['email_address'];
Hopefully that helps!
-
Re: Drop Shipping Purchase Order Module
Hi,
Thanks for your suggestion. I followed your instructions. But it didn't work. The email subject becomes Order # (wrong number) for (without customer's name). Don't we also have to also set the PO-subject in admin > configuration > my store to something? At the moment it's set to Order # {order_number}.
I want to put supplier's name in the email right at the top where I say "Hi (supplier name)". Where do I put the code $subcontractor['email_address']; ?
I tried your send_pos.php and confirm_track_sub.php file. However it doesn't work. When I clicked on the link in the email, I get the following error. Did I do something wrong? Please advise. Thank you.
Warning: main(includes/database_tables.php) [function.main]: failed to open stream: No such file or directory in /home/dealbyet/public_html/admin/confirm_track_sub.php on line 39
Warning: main(includes/database_tables.php) [function.main]: failed to open stream: No such file or directory in /home/dealbyet/public_html/admin/confirm_track_sub.php on line 39
Warning: main(includes/database_tables.php) [function.main]: failed to open stream: No such file or directory in /home/dealbyet/public_html/admin/confirm_track_sub.php on line 39
Fatal error: main() [function.require]: Failed opening required 'includes/database_tables.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/dealbyet/public_html/admin/confirm_track_sub.php on line 39
-
Re: Drop Shipping Purchase Order Module
Quote:
Originally Posted by
dealbyethan.com
Hi,
Thanks for your suggestion. I followed your instructions. But it didn't work. The email subject becomes Order # (wrong number) for (without customer's name). Don't we also have to also set the PO-subject in admin > configuration > my store to something? At the moment it's set to Order # {order_number}.
I want to put supplier's name in the email right at the top where I say "Hi (supplier name)". Where do I put the code $subcontractor['email_address']; ?
I tried your send_pos.php and confirm_track_sub.php file. However it doesn't work. When I clicked on the link in the email, I get the following error. Did I do something wrong? Please advise. Thank you.
Warning: main(includes/database_tables.php) [function.main]: failed to open stream: No such file or directory in /home/dealbyet/public_html/admin/confirm_track_sub.php on line 39
Warning: main(includes/database_tables.php) [function.main]: failed to open stream: No such file or directory in /home/dealbyet/public_html/admin/confirm_track_sub.php on line 39
Warning: main(includes/database_tables.php) [function.main]: failed to open stream: No such file or directory in /home/dealbyet/public_html/admin/confirm_track_sub.php on line 39
Fatal error: main() [function.require]: Failed opening required 'includes/database_tables.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/dealbyet/public_html/admin/confirm_track_sub.php on line 39
Hmm.. This kind of thing is always hard to debug with other people. I really need a lot of specific details to know how to debug it with you.
1.) What number should the order# be, and what did it put in the email?
2.) You don't have to set the PO-NUMBER with the way I showed you. The code I gave you just bypasses the need for using that.
3.) You need to debug those errors you are getting. Did you edit the files I gave you? There are specific lines given in both files that you need to edit. Make sure they are in the correct location as well. send_pos.php is supposed to be in the /admin/ directory of the store - and confirm_track_send.php is supposed to be in the root directory of the store.
Adding the name to your email:
In the admin directory - find and edit email_header.txt. Add whatever text you want to add - adding {subcontractor_name} where you want the name to show up.
Then in your send_pos.php file, search for this line:
Code:
$zawartosc2[$i]=str_replace("{customers_name}",$row4[5],$zawartosc);
Underneath that - add this:
Code:
$subcontractor_id = $subk[$i];
$subcontractor_query = mysql_query("SELECT * FROM subcontractors WHERE subcontractors_id = $subcontractor_id");
$subcontractor = mysql_fetch_assoc($subcontractor_query); $zawartosc2[$i]=str_replace("{subcontractor_name}",$subcontractor['full_name'],"$zawartosc2[$i]");
And if you used my mod - find this code:
Code:
$header = str_replace("{customers_name}",$orders['customers_name'],$header);
And underneath that - add this code:
Code:
$header = str_replace("{subcontractor_name}",$subcontractor['fullname'],$header);
After trying all of what I wrote - let me know if you are still running into any problems.
-
Re: Drop Shipping Purchase Order Module
Hi everyone,
this is Keepsake, the guy who wrote this back in the day. :)
I just remembered some of the stuff I did and I can't belive that little tweak got so much popularity. Really makes me proud. :)
Thank you Prattski for all your support while I wasn't around. I'd be glad to work on rolling out a new, updated version of this module for 1.3.8 since I'm going to be updating a store that uses this module.
Quote:
Originally Posted by
Prattski
Here's the things that we didn't like about it, or that didn't work:
- wouldn't send the emails (bug for 1.3.7?)
I believe so, it works for me (1.2.6)
Quote:
Originally Posted by
Prattski
- when you resent a PO, it would increment the PO number (not sure why it needed to do this... but we didn't like it)
I believe the reason for that was that when you re-send a PO you can change it (add items to it or delete them) so it's better if it is renumbered.
I have no problem with the fact that it seems it would be better if the old number was retained though.
Quote:
Originally Posted by
Prattski
- Didn't display the PO number on the already sent list
So, I modified the send_pos.php file quite a bit to fix/add these features. The main bulk of the update is that resending POs does not increment the PO number. It keeps the PO number as was originally set. Everything seems to be working flawlessly now on 1.3.7. I even cleaned up the code so that it is correctly tabbed in it's if/while/for statements for the all the code at the top portion of the page before the HTML.
I'll attach the file to this post. You will need to edit two variables near the top of the page - I have labeled them though, so you can't miss them. They are just for the From Name, and From Email address for when POs are sent out.
Have any questions, please let me know. I'll try to do my best to answer them.
Do you mind if I incoporate it into the new version of the module that I'll have replace the old one on all the download sites I'm aware of?
Thank you again, Great work!
-
Re: Drop Shipping Purchase Order Module
Quote:
Originally Posted by
Chuckl
Regarding whether anyone is going to pick up this mod, it is by no means clear to me that all of it is released under the GPL. No one is going to touch proprietary code, or submit it to the ZC downloads section.
Secondly, even if the code is indeed unencumbered, anyone attempting this will have to ask 'How fluent am I in Polish?'
It's GPL all right. Feel free to use it. Buy something at www.redlinegoods.com if you want to compensate me for developing it in any way. :)
I can help with translating all the bits that are in Polish.
Once I get a 1.3.8 compliant version together, how do I submit it to ZC downloads?
-
Re: Drop Shipping Purchase Order Module
Quote:
Originally Posted by
Keepsake
Once I get a 1.3.8 compliant version together, how do I submit it to ZC downloads?
Super easy. Just go to zen-cart.com, click on the "downloads" link near the top, then you'll see a button labeled: "submit your file".
I'm willing to help you out, Keepsake, with a new updated version. I sent you a private message.
-
Re: Drop Shipping Purchase Order Module
Hi,
Where can I download this module?
Regards
Zis
-
Re: Drop Shipping Purchase Order Module
Hi,
Where can I download this module?
-
Re: Drop Shipping Purchase Order Module
Unfortunately, I don't know! My boss already had it - and he sent it to me and I worked on it from there.
If you can though - be patient. The original person who did this mod is working on updating it, and will be implementing some of the modifications that I made to it. When it is ready, it will be posted in the Zen Cart downloads. Subscribe to this thread - I'm sure when it is ready for download it will be posted here.
-
Re: Drop Shipping Purchase Order Module
Quote:
Originally Posted by
Prattski
Adding the name to your email:
In the admin directory - find and edit email_header.txt. Add whatever text you want to add - adding {subcontractor_name} where you want the name to show up.
Then in your send_pos.php file, search for this line:
Code:
$zawartosc2[$i]=str_replace("{customers_name}",$row4[5],$zawartosc);
Underneath that - add this:
Code:
$subcontractor_id = $subk[$i];
$subcontractor_query = mysql_query("SELECT * FROM subcontractors WHERE subcontractors_id = $subcontractor_id");
$subcontractor = mysql_fetch_assoc($subcontractor_query); $zawartosc2[$i]=str_replace("{subcontractor_name}",$subcontractor['full_name'],"$zawartosc2[$i]");
And if you used my mod - find this code:
Code:
$header = str_replace("{customers_name}",$orders['customers_name'],$header);
And underneath that - add this code:
Code:
$header = str_replace("{subcontractor_name}",$subcontractor['fullname'],$header);
After trying all of what I wrote - let me know if you are still running into any problems.
Subcontractor name didn't appear in the email. When I did a test to send po to myself in admin. I received the following warnings
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/dealbyet/public_html/admin/send_pos.php on line 210
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/dealbyet/public_html/admin/send_pos.php on line 210
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/dealbyet/public_html/admin/send_pos.php on line 389
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/dealbyet/public_html/admin/send_pos.php on line 389
Quote:
Originally Posted by
Prattski
1.) What number should the order# be, and what did it put in the email?
2.) You don't have to set the PO-NUMBER with the way I showed you. The code I gave you just bypasses the need for using that.
3.) You need to debug those errors you are getting. Did you edit the files I gave you? There are specific lines given in both files that you need to edit. Make sure they are in the correct location as well. send_pos.php is supposed to be in the /admin/ directory of the store - and confirm_track_send.php is supposed to be in the root directory of the store.
1 & 2. The order # should be the same as my store order # which I have already achieved. At the moment the email subject appears as Order # XXX. I would like it to show up as Order # XXX for YYY (i.e. customer name). When I tried your code, the email subject becomes Order # XX (but wrong order number) for (no customer name). Don't we also have to also set the PO-subject in admin > configuration > my store to something? At the moment it's set to Order # {order_number}.
3. I followed your instructions to change the files. There might be some slight differences but those are from the previous versions of your files. Yes send_pos.php and confirm_track_send.php are at the correct locations. I think I also have a copy of confirm_track_send.php in /admin. Should I remove it?
Thanks for your help.
-
Re: Drop Shipping Purchase Order Module
dealbyethan,
Unfortunately, this modification is too broad, and there are too many settings/etc. that makes it difficult to troubleshoot what might be wrong for you. I've tried to guide you towards fixing/adding what you requested, but I don't think I'm really able to help you much more with such broad problems.
First thing you need to do is troubleshoot your SQL errors that you are getting. You have to remove all the errors - that's step one.
Then, you need to play around with the code - and the things I suggested. Use PHP to help you (echo out variables, etc.). You've got to get your hands dirty to figure out the problem sometimes.
Once you've ridded of the errors - and you've played around with the code for a while, and then you've got more specific questions, I might be able to help you more. Without actually having your store to work with - and your code, I can't do a whole lot of help.
All of my modifications of this have taken me a lot of time and testing. Good luck bro!
-
Re: Drop Shipping Purchase Order Module
If someone can please put a NEWlink to this script.. we have a few people intrested in the script.. we would be greatful for this..
thanks
John
-
Re: Drop Shipping Purchase Order Module
Quote:
Originally Posted by
Zis
Hi,
Where can I download this module?
yes it is in this for but it is in polish and working on gettting it translated..
-
Re: Drop Shipping Purchase Order Module
Quote:
Originally Posted by
Therose
If someone can please put a NEWlink to this script.. we have a few people intrested in the script.. we would be greatful for this..
thanks
John
I'm working on it now. I should have a proper 1.3.8 version available later today.
-
Re: Drop Shipping Purchase Order Module
1.3.8 compatible version was just released.
Named 1.3B since I always liked that version number - back to the day GEOS for my C64 was numbered that way 15 years ago! - and it somewhat coindices with the current ZC release. :)
http://www.zen-cart.com/forum/showthread.php?t=86503
I would like you to please provide feedback from testing/usage in the above thread, I'd like this one to die off since I've done my best to address ALL issues reported in this thread.
big THANK YOU to Prattski for his work!
-
Re: Drop Shipping Purchase Order Module
I dont know if working with the mod for this makes sense or not.
One of my drop shippers will only take the orders through xml
Now I am sure that it has to be in some format
But to be honest I know nothing about setting this up.
The data I would use would be sending a PO to my own email
then converting to the xml.
Does anyone know of a simple program to do this with???
-
Re: Drop Shipping Purchase Order Module
Is there a way of setting it up so that I get a copy of the emails that are sent to my suppliers for my own reference?
-
Re: Drop Shipping Purchase Order Module
Yes - just edit the mail function and add your email address in there.
-
Re: Drop Shipping Purchase Order Module
Oh blimey! I don't suppose you could give me any more detail on how I might do that? Which file to edit and the format of hardcoding the address?
I've been using Zencart for a while now but I've found that this is still a bit above my capabilities!
Cheers,
Nick
-
Re: Drop Shipping Purchase Order Module
There is a typo in the Order Status...
The phrase is: Order submitted for dop shipment and should be
Order submitted for dRop shipment (missing the "r" in drop).
I've checked the forums and used the Developers Tool Kit but can not find the string to correct it.
V1.3B
Thanks in advance!
-
Re: Drop Shipping Purchase Order Module
I don't know where you'd see this phrase. If it is in the email itself, you need to edit the email files. You can customize your emails to look like whatever you want.
-
1 Attachment(s)
Re: Drop Shipping Purchase Order Module
Thanks but the typo is in the Order Information screen. I've attached an image of the error.
-
Re: Drop Shipping Purchase Order Module
I'd upgrade to v3 or v5. Both of these versions allow you to change this text from admin.
If you don't want to upgrade, check send_pos.php in admin and the language file for it. It should be in one of those two files.
-
Re: Drop Shipping Purchase Order Module
Hi I have this module on my site for a year now and it has work nicely. but now I just setup a forum within my site and created a database named forum. but now when clicking the link to enter the tracking ID i get this error "Table 'database _forum.orders_products' doesn't exist" I think it should be accessing 'database _orders_products'
Has anyone have any clues as to why it's now decided to access the wrong database?
-
Re: Drop Shipping Purchase Order Module
Starbuck,
Not quite sure. If you backup your database (backup first!!!) and then delete it does everything work fine? Maybe you should try using a different name for your other database. What directory did you install your forum too? If it was a Zen Cart directory, that might cause problems!
-
Re: Drop Shipping Purchase Order Module
Hi M8 sorry I did not explain it correctly before
The Zen cart database is: database_root
The Forum database is: database_forum
The forum is just in a sub dir so it is aquacooledpc.co.uk/forum
now that i have setup the forum when i go to POs -enter tracking #s and click one a PO i get this error
Table 'aquacooledpc_co_uk_forum.orders_products' doesn't exist
i have looked at the code in confirm_track_sub.php and it can see the i gets the database name form mysql_select_db(DB_DATABASE) or die(mysql_error()); and in configure.php it is defined with define('DB_DATABASE', 'database_root');
I even tried changing the code to mysql_select_db(database_root) or die(mysql_error()); but i still got the same error referring to database_forum. I just don't know what I am missing here. Everything else is working it's just when trying to enter the tracking that I have problems.
I haven't backed up the database and restored it I would relay like to not do that if I don't have to.
-
Re: Drop Shipping Purchase Order Module
I can't seem to figure this one out. If configure.php defines this as root, then how is it pulling up forum? Strange...The only thing I can think of is that forum might have another configure.php that is being pulled up instead, but even this seems unlikely as the forum is in its own directory.
One last thought -- entering tracking happens in the root folder using confirm_track_sub.php. To make it work right, you need to make sure that your admin folder is correctly identified in the code since it runs from the root folder, not the admin folder. If you renamed your admin folder and didn't make these changes as instructed to in the manual you would have problems.