Re: Drop Shipping Purchase Orders Module for v1.3.8
Quote:
Originally Posted by
srturner47
zura.ge -- see page 19 of this thread for help
Thanks for your reply. Read the page 19 fully and found a solution there for the sizeOfText function. After applying the solution the "Division by zero" error went away, but the email was not sent anyway....
I will adjust that I don't care about admin side errors and manual send of the emails. It was just for your information to help discover the problem. What I need is to send an email to subcontractor when the order is made. So I think the problem can be narrowed down to the code that is added to tpl_checkout_success_default.php file.
IMPORTANT UPDATE: I changed value of body variable($newzawartosc) in the code to something simple(like "abc") before passing to zen_mail() function and the email has been sent! So there is something in the email body that prevents sending the emails. What it can be?
Re: Drop Shipping Purchase Orders Module for v1.3.8
Found the reason of malfunction: It was "TO" at the beginning of the email. Probably it confused the mailserver while sending. I removed the whole line that started with the "TO" and it fixed the problem.
Now the email is sending, but I get the email without the PDF attachment. So what can be wrong there now?
Some things that might be helpful:
- The 'yes' is set in admin.
- admin/packinglist.pdf has permission of 777
- admin/fpdf folder(and the inner content) has permission of 755
I hope this is an easier issue to fix. Please help me ASAP as I already passed my deadline. :(
Re: Drop Shipping Purchase Orders Module for v1.3.8
This mod will not send POs on checkout success. Version 5 does this, but its not free. You will need to manually send each PO with v3.
Are you using ZC 1.3.8? Before 1.3.8 ZC didn't have mail functions that support attachments, hence they don't work.
Not sure why the TO line would cause a problem...Strange.... Anyway, glad you figured that out.
Re: Drop Shipping Purchase Orders Module for v1.3.8
Quote:
Originally Posted by
srturner47
This mod will not send POs on checkout success. Version 5 does this, but its not free. You will need to manually send each PO with v3.
Are you using ZC 1.3.8? Before 1.3.8 ZC didn't have mail functions that support attachments, hence they don't work.
Not sure why the TO line would cause a problem...Strange.... Anyway, glad you figured that out.
As I already posted I have V5 and ZC 1.3.8
Solved the issue with the PDF attachments: I tried different things, but I think it was permissions of admin folder...
Now the PDF is sent, but it's not quite proper: For an unknown reason product names are missing there...
Re: Drop Shipping Purchase Orders Module for v1.3.8
Oh-sorry. Didn't realize you were using v5. Send me an email through the website in my signature and I will help you out. This thread is only for v3 or below.
Re: Drop Shipping Purchase Orders Module for v1.3.8
how do i add custom fields to this like the product weight .. order delivery date ?
Re: Drop Shipping Purchase Orders Module for v1.3.8
Quote:
Oh-sorry. Didn't realize you were using v5. Send me an email through the website in my signature and I will help you out. This thread is only for v3 or below.
Thank you. I already fixed the problem myself. I will contact you directly if I will have problems again.
Re: Drop Shipping Purchase Orders Module for v1.3.8
Quote:
Originally Posted by
cowboyfred
Got it to work in the email.
Here is how i did it:
go to:
email_header.txt
insert:
Telephone: {customers_phone}
E-mail: {customers_email}
Getting it to go to the pdf is not a big deal. Change admin/send_pos.php (inserting the code in Red)
Around line 189:
Code:
$query=mysql_query("SELECT p.orders_products_id, p.products_model, p.products_name, p.final_price, p.products_quantity,
o.customers_name, o.customers_street_address, o.customers_city, o.customers_postcode, o.customers_state, o.customers_country, o.customers_telephone, o.customers_email_address,
o.delivery_name, o.delivery_company, o.delivery_street_address, o.delivery_city, o.delivery_state, o.delivery_postcode, o.delivery_country,
o.billing_name, o.billing_company, o.billing_street_address, o.billing_city, o.billing_state, o.billing_postcode, o.billing_country,
o.payment_method, o.date_purchased, o.currency, o.customers_id, o.orders_id, o.shipping_method, o.orders_status, o.customers_suburb, o.delivery_suburb, o.billing_suburb, o.customers_company
FROM ".TABLE_ORDERS_PRODUCTS." as p, ".TABLE_ORDERS." as o
WHERE
p.orders_id=o.orders_id
AND
p.orders_products_id='$idk[$i]'")
or die('Failed to connect database: 3');
// $shipway = '';
while($row4=mysql_fetch_array($query, MYSQL_NUM))
{
$strCustomerTelephone = $row4[11] . "\n";
if ($row4[37] != '' && $row4[37] != NULL)
$adres = $row4[37]."\n";
else
Then again, around line 279:
Code:
$wielowymiar[$i][0]=$subk[$i]; //id_subcontractors
$wielowymiar[$i][1]=$row4[30]; //id_customers
$wielowymiar[$i][2]=$idk[$i]; //id_produktu zamowionego
$wielowymiar[$i][3]=$zawartosc2[$i]; //zawartosc
$wielowymiar[$i][4]=$row4[31]; //id_orders
$wielowymiar[$i][5]=$row4[13]."\n".$adres_deliver . "\n" . $strCustomerTelephone;
$wielowymiar[$i][6]=$row4[20]."\n".$adres_biling;
$wielowymiar[$i][7]=$row4[32]; //shipping
Keep in mind that much of this code is written in Polish, with Polish comments, so you may have to do a little translation if you want to understand variable names and comments.
Brad Scott
ClermontSoftware.com
Re: Drop Shipping Purchase Orders Module for v1.3.8
Hey Guys,
First off, I'd like to thank everyone who has contributed to this addon, it will save me a lot of time manually copying and pasting into an email.
I think something may be wrong with how i'm doing this. I already have TY Package Tracker installed and have been using it for awhile with no problem. First time using Purchase orders.
I think i've tracked down where the problem is occuring in the SQL patch:
I get this error:
1366 Incorrect integer value: '' for column 'configuration_group_id' at row 1 in:
[INSERT INTO zen_configuration_group VALUES ('', 'Purchase Orders', 'Purchase Order Settings', '1', '1');]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
When inserting
INSERT INTO configuration_group VALUES ('', 'Purchase Orders', 'Purchase Order Settings', '1', '1');
UPDATE configuration_group SET sort_order = last_insert_id() WHERE configuration_group_id = last_insert_id();
SET @poid=9999;
SELECT (@poid:=configuration_group_id) as poid
FROM configuration_group
WHERE configuration_group_title= 'Purchase Orders';
I got everything else to go, and I was able to email purchase orders but couldnt get a PDF to attach (probably permissions problem) but I'm more concerned about the fact that in the readme it says to go to ADMIN>Configuration>Purchase Orders and there is such area to go to.
Any ideas? Should I be concerned that there is no area under Configuration for Purchase orders?
Any help would be greatly appreciated!
Matt
Re: Drop Shipping Purchase Orders Module for v1.3.8
UPDATE: I was able to get it to show up in the admin area, but its empty. I suspect its something to do with this error:
1366 Incorrect integer value: '' for column 'configuration_id' at row 1
in:
[INSERT INTO zen_configuration VALUES ('','PO - send packing lists', 'PO_SEND_PACKING_LISTS', '1', '0 - never, 1 - always, 2 - sometimes (default yes), 3 - sometimes (default no)', @poid, 101, now(), now(), NULL, NULL), ('','PO - notify customer', 'PO_NOTIFY', '1', '0 - no customer notification of PO updates, 1 - notify customer', @poid, 102, now(), now(), NULL, NULL), ('','PO - subject', 'PO_SUBJECT', '{contact_person}: New order (#{po_number}) for {full_name}', 'Subject of PO emails, {po_number} will be replaced with the actual number', @poid, 103, now(), now(), NULL, NULL), ('','PO - from email name', 'PO_FROM_EMAIL_NAME', 'PurchaseOrderManager', 'The FROM email NAME for sent Purchase Orders', @poid, 104, now(), now(), NULL, NULL), ('','PO - from email address', 'PO_FROM_EMAIL_ADDRESS', '[email protected]', 'The FROM email ADDRESS for sent Purchase Orders', @poid, 105, now(), now(), NULL, NULL), ('','PO - sent comments', 'PO_SENT_COMMENTS', 'Order Submitted to Shipping Department for Fulfillment', 'Comments added to the account when submitted to subcontractor', @poid, 106, now(), now(), NULL, NULL), ('','PO - full ship comments', 'PO_FULLSHIP_COMMENTS', 'Thanks for your order!', 'Comments added to the account when the order has shipped in full', @poid, 107, now(), now(), NULL, NULL), ('','PO - partial ship comments', 'PO_PARTIALSHIP_COMMENTS', 'Part of your order has shipped! The rest of your order will ship soon. You will be notified by email when your order is complete.', 'Comments added to the account when part of the order has shipped', @poid, 108, now(), now(), NULL, NULL), ('','PO - full ship packinglist', 'PO_FULLSHIP_PACKINGLIST', 'Thanks for your order!', 'Comments added to the packing list when the order has shipped in full', @poid, 109, now(), now(), NULL, NULL), ('','PO - partial ship packinglist', 'PO_PARTIALSHIP_PACKINGLIST', 'This is a partial shipment. The rest of your order has shipped or will ship separately.', 'Comments added to the packing list when part of the order has shipped', @poid, 110, now(), now(), NULL, NULL), ('','PO - packinglist filename', 'PO_PACKINGLIST_FILENAME', 'packinglist.pdf', 'packing list filename', @poid, 111, now(), now(), NULL, NULL), ('','PO - omit from unknown email 1', 'PO_UNKNOWN_OMIT1', '\nIf you would prefer to enter tracking information for this order\ndirectly, please visit:\n', 'Text to omit from emails sent for unknown customers 1 of 3', @poid, 112, now(), now(), NULL, NULL), ('','PO - omit from unknown email 2', 'PO_UNKNOWN_OMIT2', '{delivery_name}\n', 'Text to omit from emails sent for unknown customers 2 of 3', @poid, 113, now(), now(), NULL, NULL), ('','PO - omit from unknown email 3', 'PO_UNKNOWN_OMIT3', '', 'Text to omit from emails sent for unknown customers 3 of 3', @poid, 114, now(), now(), NULL, NULL), ('','PO - change shipping from', 'PO_CHANGE_SHIPPING_FROM', '', 'Change this shipping option to something else on POs and Packing Lists', @poid, 115, now(), now(), NULL, NULL), ('','PO - change shipping to', 'PO_CHANGE_SHIPPING_TO', 'Cheapest', 'Value to change shipping option to on POs and Packing Lists', @poid, 116, now(), now(), NULL, NULL);]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.