Re: COWOA Updated and Combined for ZC v1.5.x
:huh:
Not sure if you fully comprehend what I was trying to say. And, yes, I fully understand what "YOUR_TEMPLATE" means. You'll notice I only flagged certain lines with YOUR_TEMPLATE. I'm stating the directory structure DOESN'T match my installation.
In my case YOUR_TEMPLATE = wmbrownholster.
Referring to the specific lines I flagged as errors from the installation document and replacing YOUR_TEMPLATE with wmbrownholster:
- includes/languages/wmbrownholster/english.php
- includes/languages/english/wmbrownholster/checkout_confirmation.php
- includes/languages/english/wmbrownholster/checkout_payment.php
- includes/languages/english/wmbrownholster/checkout_process <-- Filename missing the .php extension!!!
- includes/languages/english/wmbrownholster/checkout_shipping.php
- includes/languages/english/wmbrownholster/gv_redeem.php
- includes/languages/english/wmbrownholster/login.php
- includes/languages/english/wmbrownholster/logoff.php
- includes/languages/english/wmbrownholster/time_out.php
- includes/modules/wmbrownholster/create_account.php
So, are you telling me, from the above references, this is how your installation is structured? I don't have a sub-directory called wmbrownholster. The other lines from the instructions showing "YOUR_TEMPLATE" do match my installation.
Referring to the above erroneous lines my installation instead is as shown here:
- includes/languages/english.php
- includes/languages/english/checkout_confirmation.php
- includes/languages/english/checkout_payment.php
- includes/languages/english/checkout_process.php
- includes/languages/english/checkout_shipping.php
- includes/languages/english/gv_redeem.php
- includes/languages/english/login.php
- includes/languages/english/logoff.php
- includes/languages/english/time_out.php
- includes/modules/create_account.php
I'm going to use my directory structure and test. I have no intention of adding the "wmbrownholster" directories just to make it match the instructions. I'm pretty sure that would break my system.
Re: COWOA Updated and Combined for ZC v1.5.x
Yes, we understand. You may not see an override directory, but that doesn't mean it's correct that way. Certain parts of Zen Cart are set up to allow you to customize your site without munging original files. It's a great way to give you a fall-back/comparison file or directory when things go bump in the night or it's time for an upgrade.
I keep a copy of lat9's overrides cheatsheet in the drawer next to me. As you get more familiar with the system, you'll better appreciate the reasoning behind its use. Definitely a trick of the trade that has saved us time and time again.
Print out a copy of the Cheatsheet and take advantage of what it can do for you.:bigups:
Re: COWOA Updated and Combined for ZC v1.5.x
:no:
I've decided to abandon any attempts to install this plugin. Disregard my previous posts.
:no:
Re: COWOA Updated and Combined for ZC v1.5.x
You might want to try lat9's One Page Checkout. Be aware that it uses the override system as well.
That said, you'll not find better documentation anywhere for all aspects of the mod.
Re: COWOA Updated and Combined for ZC v1.5.x
Re: COWOA Updated and Combined for ZC v1.5.x
Quote:
Originally Posted by
seadog
I'm going to use my directory structure and test. I have no intention of adding the "wmbrownholster" directories just to make it match the instructions. I'm pretty sure that would break my system.
It's real easy to do. It will take all of 10 minutes, if that. I can walk you through it if you are still interested.
Once done, if you don't like it, 10 seconds to undo.
Re: COWOA Updated and Combined for ZC v1.5.x
Using store version 1.5.5f and cowoa 2.4.
Couple questions:
1) Is the double semi-colon intentional? $htmlInvoiceURL=EMAIL_TEXT_INVOICE_URL_CLICK;;
2) Confirmation emails come through with define variable names:
$EMAIL_THANKS_FOR_SHOPPING
$EMAIL_DETAILS_FOLLOW
$INTRO_ORDER_NUM_TITLE $INTRO_ORDER_NUMBER
$INTRO_DATE_TITLE $INTRO_DATE_ORDERED
$INTRO_URL_TEXT
This only happens with orders from COWOA customers. Other confirmation emails are fine, so I don't think it's as simple as missing language files.
Comparing code blocks within the file for the various if statements and just not seeing any differences.
Did a file compare with original, code blocks seem OK.
Code:
// COWOA:If COWOA and Send Order Status is True
if ($_SESSION['COWOA'] && (COWOA_ORDER_STATUS == 'true')) {
$htmlInvoiceURL=EMAIL_TEXT_INVOICE_URL_CLICK;;
$htmlInvoiceValue=zen_href_link(FILENAME_ORDER_STATUS, 'order_id=' . $zf_insert_id, 'SSL', false);
$email_order = EMAIL_TEXT_HEADER . EMAIL_TEXT_FROM . STORE_NAME . "\n\n" .
$this->customer['firstname'] . ' ' . $this->customer['lastname'] . "\n\n" .
EMAIL_THANKS_FOR_SHOPPING . "\n" . EMAIL_DETAILS_FOLLOW . "\n" .
EMAIL_SEPARATOR . "\n" .
EMAIL_TEXT_ORDER_NUMBER . ' ' . $zf_insert_id . "\n" .
EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n" .
EMAIL_TEXT_INVOICE_URL . ' ' . zen_href_link(FILENAME_ORDER_STATUS, 'order_id=' . $zf_insert_id, 'SSL', false) . "\n\n";
$html_msg['EMAIL_TEXT_HEADER'] = EMAIL_TEXT_HEADER;
$html_msg['EMAIL_TEXT_FROM'] = EMAIL_TEXT_FROM;
$html_msg['INTRO_STORE_NAME'] = STORE_NAME;
$html_msg['EMAIL_THANKS_FOR_SHOPPING'] = EMAIL_THANKS_FOR_SHOPPING;
$html_msg['EMAIL_DETAILS_FOLLOW'] = EMAIL_DETAILS_FOLLOW;
$html_msg['INTRO_ORDER_NUM_TITLE'] = EMAIL_TEXT_ORDER_NUMBER;
$html_msg['INTRO_ORDER_NUMBER'] = $zf_insert_id;
$html_msg['INTRO_DATE_TITLE'] = EMAIL_TEXT_DATE_ORDERED;
$html_msg['INTRO_DATE_ORDERED'] = strftime(DATE_FORMAT_LONG);
$html_msg['INTRO_URL_TEXT'] = EMAIL_TEXT_INVOICE_URL_CLICK;
$html_msg['INTRO_URL_VALUE'] = zen_href_link(FILENAME_ORDER_STATUS, 'order_id=' . $zf_insert_id, 'SSL', false);
}
// COWOA:If COWOA but Send Order Status is False
if ($_SESSION['COWOA'] && (COWOA_ORDER_STATUS == 'false')){
$htmlInvoiceURL='';
$htmlInvoiceValue='';
$email_order = EMAIL_TEXT_HEADER . EMAIL_TEXT_FROM . STORE_NAME . "\n\n" .
$this->customer['firstname'] . ' ' . $this->customer['lastname'] . "\n\n" .
EMAIL_THANKS_FOR_SHOPPING . "\n" . EMAIL_DETAILS_FOLLOW . "\n" .
EMAIL_SEPARATOR . "\n" .
EMAIL_TEXT_ORDER_NUMBER . ' ' . $zf_insert_id . "\n" .
EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";
$html_msg['EMAIL_TEXT_HEADER'] = EMAIL_TEXT_HEADER;
$html_msg['EMAIL_TEXT_FROM'] = EMAIL_TEXT_FROM;
$html_msg['INTRO_STORE_NAME'] = STORE_NAME;
$html_msg['EMAIL_THANKS_FOR_SHOPPING'] = EMAIL_THANKS_FOR_SHOPPING;
$html_msg['EMAIL_DETAILS_FOLLOW'] = EMAIL_DETAILS_FOLLOW;
$html_msg['INTRO_ORDER_NUM_TITLE'] = EMAIL_TEXT_ORDER_NUMBER;
$html_msg['INTRO_ORDER_NUMBER'] = $zf_insert_id;
$html_msg['INTRO_DATE_TITLE'] = EMAIL_TEXT_DATE_ORDERED;
$html_msg['INTRO_DATE_ORDERED'] = strftime(DATE_FORMAT_LONG);
$html_msg['INTRO_URL_TEXT'] = '';
$html_msg['INTRO_URL_VALUE'] = '';
}
// NO COWOA, so lets set up the Text and HTML E-mail Information for the Order History Info
if (!$_SESSION['COWOA']){
$invoiceInfo=EMAIL_TEXT_INVOICE_URL . ' ' . zen_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $zf_insert_id, 'SSL', false) . "\n\n";
$htmlInvoiceURL=EMAIL_TEXT_INVOICE_URL_CLICK;;
$htmlInvoiceValue=zen_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $zf_insert_id, 'SSL', false);
$email_order = EMAIL_TEXT_HEADER . EMAIL_TEXT_FROM . STORE_NAME . "\n\n" .
$this->customer['firstname'] . ' ' . $this->customer['lastname'] . "\n\n" .
EMAIL_THANKS_FOR_SHOPPING . "\n" . EMAIL_DETAILS_FOLLOW . "\n" .
EMAIL_SEPARATOR . "\n" .
EMAIL_TEXT_ORDER_NUMBER . ' ' . $zf_insert_id . "\n" .
EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n" .
EMAIL_TEXT_INVOICE_URL . ' ' . zen_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $zf_insert_id, 'SSL', false) . "\n\n";
$html_msg['EMAIL_TEXT_HEADER'] = EMAIL_TEXT_HEADER;
$html_msg['EMAIL_TEXT_FROM'] = EMAIL_TEXT_FROM;
$html_msg['INTRO_STORE_NAME'] = STORE_NAME;
$html_msg['EMAIL_THANKS_FOR_SHOPPING'] = EMAIL_THANKS_FOR_SHOPPING;
$html_msg['EMAIL_DETAILS_FOLLOW'] = EMAIL_DETAILS_FOLLOW;
$html_msg['INTRO_ORDER_NUM_TITLE'] = EMAIL_TEXT_ORDER_NUMBER;
$html_msg['INTRO_ORDER_NUMBER'] = $zf_insert_id;
$html_msg['INTRO_DATE_TITLE'] = EMAIL_TEXT_DATE_ORDERED;
$html_msg['INTRO_DATE_ORDERED'] = strftime(DATE_FORMAT_LONG);
$html_msg['INTRO_URL_TEXT'] = EMAIL_TEXT_INVOICE_URL_CLICK;
$html_msg['INTRO_URL_VALUE'] = zen_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $zf_insert_id, 'SSL', false);
}
Any suggestions?
Note I have reordered a couple lines as part of the trouble shooting, to see which code block is executing. Date before order number and details follow before thanks for shopping.
Re: COWOA Updated and Combined for ZC v1.5.x
Add to previous question:
In the cowoa if statements it check for status of COWOA_ORDER_STATUS.
I have search for this (store admin and in the original download files) and do see where it is set, just where is checked.
Where is this variable set?
Re: COWOA Updated and Combined for ZC v1.5.x
Anyone have this working on 1.5.6 yet? Seems there are a lot of significant changes in the admin pages for 1.5.6.
Re: COWOA Updated and Combined for ZC v1.5.x
As mentioned above, I'm working on trying to get this working on a 1.5.6 site.
It looks like the code from admin/index.php needs to be merged into the new index_dashboard file, so that should probably be pretty straight forward.
however, there is a bunch of code from admin/orders.php that I'm not quite sure what to do with...
Code:
// BOF COWOA SEND ORDER_STATUS EMAIL
if (COWOA_ORDER_STATUS == 'true') {
if ($check_status->fields['COWOA_order'] == 1) {
$message =
EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n\n" .
EMAIL_TEXT_INVOICE_URL . ' ' . zen_catalog_href_link(FILENAME_ORDER_STATUS, 'order_id=' . $oID, 'SSL') . "\n\n" .
EMAIL_TEXT_DATE_ORDERED . ' ' . zen_date_long($check_status->fields['date_purchased']) . "\n\n" .
strip_tags($notify_comments) .
EMAIL_TEXT_STATUS_UPDATED . sprintf(EMAIL_TEXT_STATUS_LABEL, $orders_status_array[$status] ) .
EMAIL_TEXT_STATUS_PLEASE_REPLY;
$html_msg['EMAIL_CUSTOMERS_NAME'] = $check_status->fields['customers_name'];
$html_msg['EMAIL_TEXT_ORDER_NUMBER'] = EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID;
$html_msg['EMAIL_TEXT_INVOICE_URL'] = '<a href="' . zen_catalog_href_link(FILENAME_ORDER_STATUS, 'order_id=' . $oID, 'SSL') .'">'.str_replace(':','','Click here to check the status of your order:').'</a>';
$html_msg['EMAIL_TEXT_DATE_ORDERED'] = EMAIL_TEXT_DATE_ORDERED . ' ' . zen_date_long($check_status->fields['date_purchased']);
$html_msg['EMAIL_TEXT_STATUS_COMMENTS'] = nl2br($notify_comments);
$html_msg['EMAIL_TEXT_STATUS_UPDATED'] = str_replace('\n','', EMAIL_TEXT_STATUS_UPDATED);
$html_msg['EMAIL_TEXT_STATUS_LABEL'] = str_replace('\n','', sprintf(EMAIL_TEXT_STATUS_LABEL, $orders_status_array[$status] ));
$html_msg['EMAIL_TEXT_NEW_STATUS'] = $orders_status_array[$status];
$html_msg['EMAIL_TEXT_STATUS_PLEASE_REPLY'] = str_replace('\n','', EMAIL_TEXT_STATUS_PLEASE_REPLY);
zen_mail($check_status->fields['customers_name'], $check_status->fields['customers_email_address'], EMAIL_TEXT_SUBJECT . ' #' . $oID, $message, STORE_NAME, EMAIL_FROM, $html_msg, 'order_status');
$customer_notified = '1';
}
}
if (COWOA_ORDER_STATUS == 'false') {
if ($check_status->fields['COWOA_order'] == 1) {
$htmlInvoiceURL='';
$htmlInvoiceValue='';
$message =
EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n\n" .
EMAIL_TEXT_DATE_ORDERED . ' ' . zen_date_long($check_status->fields['date_purchased']) . "\n\n" .
strip_tags($notify_comments) .
EMAIL_TEXT_STATUS_UPDATED . sprintf(EMAIL_TEXT_STATUS_LABEL, $orders_status_array[$status] ) .
EMAIL_TEXT_STATUS_PLEASE_REPLY;
$html_msg['EMAIL_CUSTOMERS_NAME'] = $check_status->fields['customers_name'];
$html_msg['EMAIL_TEXT_ORDER_NUMBER'] = EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID;
$html_msg['INTRO_URL_TEXT'] = '';
$html_msg['INTRO_URL_VALUE'] = '';
$html_msg['EMAIL_TEXT_DATE_ORDERED'] = EMAIL_TEXT_DATE_ORDERED . ' ' . zen_date_long($check_status->fields['date_purchased']);
$html_msg['EMAIL_TEXT_STATUS_COMMENTS'] = nl2br($notify_comments);
$html_msg['EMAIL_TEXT_STATUS_UPDATED'] = str_replace('\n','', EMAIL_TEXT_STATUS_UPDATED);
$html_msg['EMAIL_TEXT_STATUS_LABEL'] = str_replace('\n','', sprintf(EMAIL_TEXT_STATUS_LABEL, $orders_status_array[$status] ));
$html_msg['EMAIL_TEXT_NEW_STATUS'] = $orders_status_array[$status];
$html_msg['EMAIL_TEXT_STATUS_PLEASE_REPLY'] = str_replace('\n','', EMAIL_TEXT_STATUS_PLEASE_REPLY);
zen_mail($check_status->fields['customers_name'], $check_status->fields['customers_email_address'], EMAIL_TEXT_SUBJECT . ' #' . $oID, $message, STORE_NAME, EMAIL_FROM, $html_msg, 'order_status');
$customer_notified = '1';
}
}
// EOF COWOA SEND ORDER_STATUS EMAIL
if ($check_status->fields['COWOA_order'] != 1) {
$message =
EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n\n" .
EMAIL_TEXT_INVOICE_URL . ' ' . zen_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . "\n\n" .
EMAIL_TEXT_DATE_ORDERED . ' ' . zen_date_long($check_status->fields['date_purchased']) . "\n\n" .
strip_tags($notify_comments) .
EMAIL_TEXT_STATUS_UPDATED . sprintf(EMAIL_TEXT_STATUS_LABEL, $orders_status_array[$status] ) .
EMAIL_TEXT_STATUS_PLEASE_REPLY;
$html_msg['EMAIL_CUSTOMERS_NAME'] = $check_status->fields['customers_name'];
$html_msg['EMAIL_TEXT_ORDER_NUMBER'] = EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID;
$html_msg['EMAIL_TEXT_INVOICE_URL'] = '<a href="' . zen_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') .'">'.str_replace(':','',EMAIL_TEXT_INVOICE_URL).'</a>';
$html_msg['EMAIL_TEXT_DATE_ORDERED'] = EMAIL_TEXT_DATE_ORDERED . ' ' . zen_date_long($check_status->fields['date_purchased']);
$html_msg['EMAIL_TEXT_STATUS_COMMENTS'] = nl2br($notify_comments);
$html_msg['EMAIL_TEXT_STATUS_UPDATED'] = str_replace('\n','', EMAIL_TEXT_STATUS_UPDATED);
$html_msg['EMAIL_TEXT_STATUS_LABEL'] = str_replace('\n','', sprintf(EMAIL_TEXT_STATUS_LABEL, $orders_status_array[$status] ));
$html_msg['EMAIL_TEXT_NEW_STATUS'] = $orders_status_array[$status];
$html_msg['EMAIL_TEXT_STATUS_PLEASE_REPLY'] = str_replace('\n','', EMAIL_TEXT_STATUS_PLEASE_REPLY);
$html_msg['EMAIL_PAYPAL_TRANSID'] = '';
zen_mail($check_status->fields['customers_name'], $check_status->fields['customers_email_address'], EMAIL_TEXT_SUBJECT . ' #' . $oID, $message, STORE_NAME, EMAIL_FROM, $html_msg, 'order_status');
$customer_notified = '1';
}
// PayPal Trans ID, if any
$sql = "select txn_id, parent_txn_id from " . TABLE_PAYPAL . " where order_id = :orderID order by last_modified DESC, date_added DESC, parent_txn_id DESC, paypal_ipn_id DESC ";
$sql = $db->bindVars($sql, ':orderID', $oID, 'integer');
$result = $db->Execute($sql);
if ($result->RecordCount() > 0) {
$message .= "\n\n" . ' PayPal Trans ID: ' . $result->fields['txn_id'];
$html_msg['EMAIL_PAYPAL_TRANSID'] = $result->fields['txn_id'];
}
//send extra emails
if (SEND_EXTRA_ORDERS_STATUS_ADMIN_EMAILS_TO_STATUS == '1' and SEND_EXTRA_ORDERS_STATUS_ADMIN_EMAILS_TO != '') {
zen_mail('', SEND_EXTRA_ORDERS_STATUS_ADMIN_EMAILS_TO, SEND_EXTRA_ORDERS_STATUS_ADMIN_EMAILS_TO_SUBJECT . ' ' . EMAIL_TEXT_SUBJECT . ' #' . $oID, $message, STORE_NAME, EMAIL_FROM, $html_msg, 'order_status_extra');
}
} elseif (isset($_POST['notify']) && ($_POST['notify'] == '-1')) {
// hide comment
$customer_notified = '-1';
}
$db->Execute("insert into " . TABLE_ORDERS_STATUS_HISTORY . "
(orders_id, orders_status_id, date_added, customer_notified, comments)
values ('" . (int)$oID . "',
'" . zen_db_input($status) . "',
now(),
'" . zen_db_input($customer_notified) . "',
'" . zen_db_input($comments) . "')");
$order_updated = true;
}
It looks like the process of emailing has actually been moved into another file, but I am unclear whether this needs to be moved to that other file - wherever it is - or if this needs to be processed before the function of sending emails is called...