Difference between revisions of "Email Orders"

From Custom Scriptz
Jump to: navigation, search
(Before Installing)
Line 129: Line 129:
 
== Before Installing / Upgrading ==
 
== Before Installing / Upgrading ==
 
'''Thought our modules are exhausted tested, we do not guarantee that everything goes smoothly, so please, backup your database and files before proceed'''
 
'''Thought our modules are exhausted tested, we do not guarantee that everything goes smoothly, so please, backup your database and files before proceed'''
 
This modification needs to replace the file 'admin/manufacturers.php' with a modified one, if you have modded this file, do the replacements by hand in the bottom of this page.<br />
 
The moded file is compatible with [http://www.zen-cart.com Zen Cart] v1.3.8a and it's located at the directory 'extras' within this zip.<br />
 
If you have not changed the original file and your Zen Cart version is 1.3.8a, you can safely replace the file 'admin/manufacturers.php' with the modified one. Just upload the 'admin' directory that is inside your 'extras' directory to your shop-root dir. ex. /home/username/public_html/shop or you can merge the 'admin' directory that is inside the 'extras' directory with the 'upload' directory.
 
  
 
== Installation Instructions ==
 
== Installation Instructions ==
If you receive a message that you don't have ionCube loaders you can:
+
=== Part 1 ===
* Pay us to do it for you (if you are on a shared hosting, this feature maybe be locked by the hosting company, so we can only suggest you to move to another server)
+
# Decompress the zip file that you downloaded from our client area to a temp folder on your computer. (I think that you already did that)
* Ask your host company to do it for you
+
* Do yourself by going to your Cpanel -> PHP Config -> and activate ionCube loaders from there using a php.ini file (if you have ionCube already installed on your host).
+
<br /><br />Ok, I meet all the requiments, let's get started.<br />
+
 
+
# '''Make a backup of your database and files.'''
+
# Uncompress the zip file that you downloaded from our Client Area to a temp folder on your computer.
+
 
# Inside the Zip, you will notice two folders: extras and uploads and one file called README.txt
 
# Inside the Zip, you will notice two folders: extras and uploads and one file called README.txt
 
# If your admin directory has a different name other than "admin", change it.
 
# If your admin directory has a different name other than "admin", change it.
 
# Upload all files that are inside the folder "uploads" to your shop-root directory by using your preferable ftp software. Don't upload the folder "uploads", upload what's inside of it.
 
# Upload all files that are inside the folder "uploads" to your shop-root directory by using your preferable ftp software. Don't upload the folder "uploads", upload what's inside of it.
 
# Go to Customers -> Email Orders (if you have Admin Profiles mod, when you try to access this page you will get a 'Denied' warning, so you must go to Tools -> Admin Settings and allow access to this page and try to access it again). After you access this page Email Orders will be automatically installed and you will see a success message.
 
# Go to Customers -> Email Orders (if you have Admin Profiles mod, when you try to access this page you will get a 'Denied' warning, so you must go to Tools -> Admin Settings and allow access to this page and try to access it again). After you access this page Email Orders will be automatically installed and you will see a success message.
# If you don't to send old orders, append "?action=reset" to your URL. eg. http://www.yourshopaddress.com/admin/email_orders.php?action=reset
+
# If you don't want to send old orders, append "?action=reset" to your Email Orders URL. eg. example.com/admin/email_orders.php?action=reset
  
== Manually editing manufacturers.php file ==
+
=== Part 2 ===
'''File: shop-root/admin/manufacturers.php'''
+
Now you need to make changes to one file:
 +
- 'admin/manufacturers.php'<br />
  
'''FIND:'''
+
There is two ways to do those changes:<br />
<pre>$manufacturers_name = zen_db_prepare_input($_POST['manufacturers_name']);</pre>
+
1. If you did not modified the file manufacturers.php shown above, you can open the dir '''extras''' that came with the zipped file you downloaded from our cliente area, then copy the dir content from the '''admin''' that's inside the dir '''v1.3.8a Patch''' to your shop-root and replace the file. Be sure to keep a backup of this file in case you need to rollback the changes.
  
'''AFTER THAT LINE ADD:'''
+
2. If you changed the file and want to do the modifications by hand. Use a tool like [http://winmerge.org WinMerge] to look at the difference between your modified file and the one that came with the package. If you want us to do it for you, contact us by going to [http://customscriptz.com/support http://customscriptz.com/support].
<pre>$manufacturers_email = zen_db_prepare_input($_POST['manufacturers_email']);</pre>
+
 
+
'''FIND:'''
+
<pre>$sql_data_array = array('manufacturers_name' => $manufacturers_name);</pre>
+
 
+
'''REPLACE WITH:'''
+
<pre>$sql_data_array = array('manufacturers_name' => $manufacturers_name, 'manufacturers_email' => $manufacturers_email);</pre>
+
 
+
'''FIND:'''
+
<pre>$manufacturers_query_raw = "select manufacturers_id, manufacturers_name, manufacturers_image, date_added, last_modified from " . TABLE_MANUFACTURERS . " order by manufacturers_name";</pre>
+
 
+
'''REPLACE WITH:'''
+
<pre>$manufacturers_query_raw = "select manufacturers_id, manufacturers_name, manufacturers_email, manufacturers_image, date_added, last_modified from " . TABLE_MANUFACTURERS . " order by manufacturers_name";</pre>
+
 
+
'''FIND:'''
+
<pre>$contents[] = array('text' => '<br>' . TEXT_MANUFACTURERS_NAME . '<br>' . zen_draw_input_field('manufacturers_name', '', zen_set_field_length(TABLE_MANUFACTURERS, 'manufacturers_name')));</pre>
+
 
+
'''AFTER THAT LINE ADD:'''
+
<pre>$contents[] = array('text' => '<br>' . TEXT_MANUFACTURERS_EMAIL . '<br>' . zen_draw_input_field('manufacturers_email', '', 100));</pre>
+
 
+
'''FIND:'''
+
<pre>$contents[] = array('text' => '<br />' . TEXT_MANUFACTURERS_NAME . '<br>' . zen_draw_input_field('manufacturers_name', $mInfo->manufacturers_name, zen_set_field_length(TABLE_MANUFACTURERS, 'manufacturers_name')));</pre>
+
 
+
'''AFTER THAT LINE ADD:'''
+
<pre>$contents[] = array('text' => '<br />' . TEXT_MANUFACTURERS_EMAIL . '<br>' . zen_draw_input_field('manufacturers_email', $mInfo->manufacturers_email, 100));</pre>
+
 
+
'''FIND:'''
+
<pre>$contents[] = array('text' => '<br>' . zen_info_image($mInfo->manufacturers_image, $mInfo->manufacturers_name));</pre>
+
 
+
'''AFTER THAT LINE ADD:'''
+
<pre>$contents[] = array('text' => '<br>' . $mInfo->manufacturers_email);</pre>
+
 
+
'''SAVE, CLOSE AND UPLOAD TO YOUR shop-root/admin DIR'''
+
  
 
== After installing ==
 
== After installing ==
Line 199: Line 157:
  
 
== Settings ==
 
== Settings ==
The settings below can be found at: Configuration -> Email Orders
+
'''The settings below can be found at: Configuration -> Email Orders'''
  
 
* '''Activate AutoSend:''' If you want the Email Orders to send emails automatically after each processed order, set this to True.
 
* '''Activate AutoSend:''' If you want the Email Orders to send emails automatically after each processed order, set this to True.
Line 227: Line 185:
 
* One product does not appear on the list for me to send, why?
 
* One product does not appear on the list for me to send, why?
 
* Check if this a product have a manufacturer set up on the Products Page. This is a free product and your configuration is set to 'False' to include free products.
 
* Check if this a product have a manufacturer set up on the Products Page. This is a free product and your configuration is set to 'False' to include free products.
 
 
== Change Log ==
 
'''Version 1.0'''
 
<pre>
 
Initial release
 
</pre>
 
 
'''Version 1.1'''
 
<pre>
 
Fixed discounts
 
</pre>
 
 
'''Version 1.2'''
 
<pre>
 
Included report to store owners
 
</pre>
 
 
'''Version 1.3'''
 
<pre>
 
Fixed minor bugs
 
Created Configuration Group
 
</pre>
 
 
'''Version 1.4'''
 
<pre>
 
Included Configuration to Include Free Products
 
Included Configuration to Send or not orders that are $0.00
 
</pre>
 
 
'''Version 1.5'''
 
<pre>
 
Fixed some configurations
 
</pre>
 
 
'''Version 1.6'''
 
<pre>
 
Moved all the code to a class file - preparing to AutoSend feature
 
</pre>
 
 
'''Version 1.7'''
 
<pre>
 
Included initial test to AutoSend
 
Corrected Debug Mode messages
 
</pre>
 
 
'''Version 2.0'''
 
<pre>
 
Many improvements
 
Created Send Old Emails
 
</pre>
 
 
'''Version 3.0'''
 
<pre>
 
Created automatic installer
 
Rewritten mostly of the codes to better perfomance
 
Deleted some useless configurations
 
</pre>
 
 
'''Version 3.1 ~ 3.6'''
 
<pre>
 
Fixed minor bugs
 
</pre>
 
 
'''Version 3.7'''
 
<pre>
 
Included "Minimum Order Status" configuration
 
</pre>
 
  
 
For Bugs, Suggestions and Requests, go to http://customscriptz.com
 
For Bugs, Suggestions and Requests, go to http://customscriptz.com

Revision as of 02:44, 23 January 2010

Email Orders is a module developed by Custom Scriptz for Zen Cart where Manufacturers can receive emails with their sold products for each order.

This module is free?

  • No, this module isn't free and it's for sale at our scripts store.

This module is supported by Zen Cart Team?

  • No, we support this module.

This module will overwrite any of my files?

  • Yes, this module does overwrite 1 (one) core file from Zen Cart.

System Requirements

Zen Cart v1.3.8a or newer
ionCube Loaders
PHP 5.x.x or newer
MySQL 5

Features

  • Send email messages separately by manufacturer that have their products bought in the same order.
  • Example:

Customer buy 10 products from 3 different Manufacturers (often called Designers by Scrapbooking Store Owners). When you use Email Orders, 3 email messages will be sent out with the following contents:

  • ManufacturerA: receive an email message with 3 products and his totals (with discount if any)
  • ManufacturerB: receive an email message with 2 products and his totals (with discount if any)
  • ManufacturerC: receive an email message with 5 products and his totals (with discount if any)
  • Store Owner: receive an email message containing an report with the orders totals sent to this manufacturers.
  • If any coupon is used, the discount will be restricted only to the products/categories that have restriction to it. If a coupon is used and no restriction is applied, the discount is applied to all products for all emails with his own discount.

This module is aimed to be used at Stores that have their default currency set to USD. In the future versions will support different currencies.

Demo Message

Email sent to ManufacturerA

EMAIL ORDER #328

Order Number #6255
Date: 2009-05-30 23:23:39

PRODUCTS ORDERED
---------------------------------
Product name: Example4
Product price: $2.50 (Coupon Applied)
Product quantity: 1
Download 01 of 01

Product name: Example5
Product price: $2.50 (Coupon Applied)
Product quantity: 1
Download 01 of 01

Product name: Example6
Product price: $4.00
Product quantity: 1
Download 01 of 01

---------------------------------
Sub-Total: $9.00
Coupon Discount: $5.00 (Coupon Code: coupon_test_code)
Total: $4.00

Email sent to ManufacturerB

EMAIL ORDER #329

Order Number #6255
Date: 2009-05-30 23:23:39

PRODUCTS ORDERED
---------------------------------
Product name: Example3
Product model: Model_Test3
Product price: $3.50
Product quantity: 1
Download 01 of 01

---------------------------------
Sub-Total: $3.50
Coupon Discount: $0.00
Total: $3.50

Email sent to ManufacturerC

EMAIL ORDER #330

Order Number #6255
Date: 2009-05-30 23:23:39

PRODUCTS ORDERED
---------------------------------
Product name: Example1
Product model: Model_Test1
Product price: $3.50
Product quantity: 1
Download 01 of 01

Product name: Example2
Product model: Model_Test2
Product price: $3.00
Product quantity: 1
Download 01 of 01

---------------------------------
Sub-Total: $6.50
Coupon Discount: $0.00
Total: $6.50

And finally, this is the email that the Store Owner receive at each batch sent:

Email Orders Sent Report
05/30/2009 23:23:39

Email Messages Sent: 3
---------------------------------
ManufacturerA
---------------------------------
Email Order #328 - Order #6255 - Sub-Total: $9.00 - Coupon Discount: $5.00 (Coupon Code: coupon_test_code)

ManufacturerB
---------------------------------
Email Order #329 - Order #6255 - Sub-Total: $3.50

ManufacturerC
---------------------------------
Email Order #330 - Order #6255 - Sub-Total: $6.50

Sub-Total: $19.00
Discounts Total: $5.00
Orders Total: $14.00

Before Installing / Upgrading

Thought our modules are exhausted tested, we do not guarantee that everything goes smoothly, so please, backup your database and files before proceed

Installation Instructions

Part 1

  1. Decompress the zip file that you downloaded from our client area to a temp folder on your computer. (I think that you already did that)
  2. Inside the Zip, you will notice two folders: extras and uploads and one file called README.txt
  3. If your admin directory has a different name other than "admin", change it.
  4. Upload all files that are inside the folder "uploads" to your shop-root directory by using your preferable ftp software. Don't upload the folder "uploads", upload what's inside of it.
  5. Go to Customers -> Email Orders (if you have Admin Profiles mod, when you try to access this page you will get a 'Denied' warning, so you must go to Tools -> Admin Settings and allow access to this page and try to access it again). After you access this page Email Orders will be automatically installed and you will see a success message.
  6. If you don't want to send old orders, append "?action=reset" to your Email Orders URL. eg. example.com/admin/email_orders.php?action=reset

Part 2

Now you need to make changes to one file: - 'admin/manufacturers.php'

There is two ways to do those changes:
1. If you did not modified the file manufacturers.php shown above, you can open the dir extras that came with the zipped file you downloaded from our cliente area, then copy the dir content from the admin that's inside the dir v1.3.8a Patch to your shop-root and replace the file. Be sure to keep a backup of this file in case you need to rollback the changes.

2. If you changed the file and want to do the modifications by hand. Use a tool like WinMerge to look at the difference between your modified file and the one that came with the package. If you want us to do it for you, contact us by going to http://customscriptz.com/support.

After installing

  • Go to Catalog -> Manufacturers and edit each Manufacturer Email Address. If you don't type the email address for a particular Manufacturer, when you try to send a email order for him/her, you will get a error and the email will not be sent until you type his email address.
  • By default the software is set to work in Debug Mode, after you are done testing, you may want to change it to live mode, to do this go to Configuration -> Email Orders -> Debug Mode and set this to False. While debug mode is On, you will see a report at your screen like how the email message would be sent, but no emails will be send until you set debug mode to False.

Upgrading Instructions

  • Make a backup of your database and files.
  • Just upload the files that are inside 'uploads/admin' to your 'admin' dir and you are done. Once you access Email Orders, it will automatically detect and update your current version.

Settings

The settings below can be found at: Configuration -> Email Orders

  • Activate AutoSend: If you want the Email Orders to send emails automatically after each processed order, set this to True.
  • Debug Mode: If this is set to True, you will see the email that would be sent out, but it will not send any email until this is change to True.
  • Include Free Products: If you want to include Free Products on your emails, set this to True.
  • Maximum Emails per Batch: Set the maximum number of emails to be processed for each batch when AutoSend is used. Do not set this too high because of the send limit of emails on your host.
  • Minimum Order Status: Set the minimum order status the orders must be for the products to be available to be sent. You don't want pending orders being send out.
  • Send $0 Email Orders: If the Order Total is $0, would like to send it anyway? Set to false to not send the email when the Order is $0.00 (ex. after a coupon of 100% is applied towards the entire order, the order total will be $0, so if this is false, no one will receive a email)
  • Show Customer Details: Set if the email message sent to the manufacturers should contain the customer details as name, address, telephone, email, etc. Strongly recommended set this to false, because of privacy policy.

The setting below can be found at: Customers -> Email Orders

  • Send Old: You can resend products that have been sent already, when you access the Email Orders page, you will see a 'Send Old' button at the top of the page (allright, I'll move that button to the statistics panel :p). So you click the Send Old and do a search for the period that you want and send the products again as you do normally. Note: Products that have been sent will not disappear for this list, instead the column 'Sent Times' will increase by 1 each time you send the order. If you want to send new emails, just click the Send New button.

The setting below can be found at: Catalog -> Manufacturer -> Manufacturer New/Edit Page

  • Manufacturers Email: This is necessary if you want to send email to this manufacturer.

Tutorial

The first step is not necessary if your Shop is just installed or you don't have any admin besides you.

  • Go to Customers -> Email Orders.
  • In this page you will see a list of Products with their respective Manufacturers. Check the products (99% of the time you will leave all products checked - but you can un/check all the boxes at once - just click the link on the top of the checkboxes column) that you want your manufacturers to receive the email from it and press the button "Send". If everything nothing goes wrong, your manufacturers should receive a email right way with his bought products. Now you are done sending and the next batch/page (if there are remaining products) will be displayed and you press the button "Send" to start again. If failed to send the email out (manufacturer with no email address for example) the products will be displayed again until you you correct the email address at the Manufacturers page. After you are confortable using email orders, if you haven't done so, activate AutoSend and it will do it for you.

Emails Note

This module send a email for each order for each manufacturer that has products in the order. Ex. Order #1234 -> 3 Manufacturers envolved, 3 email messages will be sent out, Order #1235 -> The same 3 Manufacturers, 3 email will sent out for that and this particular order, total = 6 messages. Before complaining that the tool is not working, check your email settings at My Store -> E-Mail Options or ask your host to increase the limit of email messages that you can send per hour. Maybe you have reach this limit.

FAQ

  • One product does not appear on the list for me to send, why?
  • Check if this a product have a manufacturer set up on the Products Page. This is a free product and your configuration is set to 'False' to include free products.

For Bugs, Suggestions and Requests, go to http://customscriptz.com