E-mail Mod

Completed modifications to the NOP Shopping Cart. Additions, modifications, and more.

Moderators: Koibito, Stefko, Randy, Rosey

E-mail Mod

Postby Stefko » Fri Jan 31, 2003 4:02 pm

Change the look of the Product List in your E-mail

=====================================================================
Qty: 1
Item No: OS-456
Descpition: PRE-APPLICATION QUESTIONNAIRE
Addtl. Info:
Price: $2.34 ea.

=====================================================================


Replace with this code in the checkout.pl

Code: Select all
print MAIL " \n";
print MAIL " \n";
 print MAIL "===================================================================== \n";
   print MAIL "Qty: $QUANTITY_1   \nItem No: $ID_1   \nDescpition: $NAME_1   \nAddtl. Info: $ADDTLINFO_1   \nPrice: \$$PRICE_1 ea.   \n\n";
   if( $NAME_2 ) {print MAIL " Qty: $QUANTITY_2   \nItem No: $ID_2   \nDescpition: $NAME_2   \nAddtl. Info: $ADDTLINFO_2   \nPrice: \$$PRICE_2 ea.   \n\n";}
   if( $NAME_3 ) {print MAIL " Qty: $QUANTITY_3   \nItem No: $ID_3   \nDescpition: $NAME_3   \nAddtl. Info: $ADDTLINFO_3   \nPrice: \$$PRICE_3 ea.   \n\n";}
   if( $NAME_4 ) {print MAIL " Qty: $QUANTITY_4   \nItem No: $ID_4   \nDescpition: $NAME_4   \nAddtl. Info: $ADDTLINFO_4   \nPrice: \$$PRICE_4 ea.   \n\n";}
   if( $NAME_5 ) {print MAIL " Qty: $QUANTITY_5   \nItem No: $ID_5   \nDescpition: $NAME_5   \nAddtl. Info: $ADDTLINFO_5   \nPrice: \$$PRICE_5 ea.   \n\n";}
   if( $NAME_6 ) {print MAIL " Qty: $QUANTITY_6   \nItem No: $ID_6   \nDescpition: $NAME_6   \nAddtl. Info: $ADDTLINFO_6   \nPrice: \$$PRICE_6 ea.   \n\n";}
   if( $NAME_7 ) {print MAIL " Qty: $QUANTITY_7   \nItem No: $ID_7   \nDescpition: $NAME_7   \nAddtl. Info: $ADDTLINFO_7   \nPrice: \$$PRICE_7 ea.   \n\n";}
   if( $NAME_8 ) {print MAIL " Qty: $QUANTITY_8   \nItem No: $ID_8   \nDescpition: $NAME_8   \nAddtl. Info: $ADDTLINFO_8   \nPrice: \$$PRICE_8 ea.   \n\n";}
   if( $NAME_9 ) {print MAIL " Qty: $QUANTITY_9   \nItem No: $ID_9   \nDescpition: $NAME_9   \nAddtl. Info: $ADDTLINFO_9   \nPrice: \$$PRICE_9 ea.   \n\n";}
   if( $NAME_10 ) {print MAIL " Qty: $QUANTITY_10   \nItem No: $ID_10   \nDescpition: $NAME_10   \nAddtl. Info: $ADDTLINFO_10   \nPrice: \$$PRICE_10 ea.   \n\n";}
   if( $NAME_11 ) {print MAIL " Qty: $QUANTITY_11   \nItem No: $ID_11   \nDescpition: $NAME_11   \nAddtl. Info: $ADDTLINFO_11   \nPrice: \$$PRICE_11 ea.   \n\n";}
   if( $NAME_12 ) {print MAIL " Qty: $QUANTITY_12   \nItem No: $ID_12   \nDescpition: $NAME_12   \nAddtl. Info: $ADDTLINFO_12   \nPrice: \$$PRICE_12 ea.   \n\n";}
   if( $NAME_13 ) {print MAIL " Qty: $QUANTITY_13   \nItem No: $ID_13   \nDescpition: $NAME_13   \nAddtl. Info: $ADDTLINFO_13   \nPrice: \$$PRICE_13 ea.   \n\n";}
   print MAIL "===================================================================== \n";
   print MAIL "\n";
   print MAIL "  SUBTOTAL    $SUBTOTAL \n";
   print MAIL "  TAX              $TAX \n";
   print MAIL "  FREIGHT     $SHIPPING \n";
   print MAIL "\n";
   print MAIL "  TOTAL          $TOTAL \n";
   print MAIL "\n\n";
   print MAIL "Comments: \n";
   print MAIL "-------------------------------------------------------------------- \n";
   print MAIL "$comment \n";
   print MAIL " \n";
   close MAIL;
Last edited by Stefko on Tue Apr 29, 2003 7:08 pm, edited 1 time in total.
KFL Technologies
Web-Enabled Solutions
e-Commerence Solutions
Stefko
Contributor / Guru
 
Posts: 833
Joined: Wed Sep 18, 2002 1:11 am
Location: Wichita, KS

Tax Mod

Postby freeswami » Tue Apr 29, 2003 5:33 pm

Where exactly is this code supposed to go?
freeswami
 
Posts: 7
Joined: Fri Apr 18, 2003 6:38 pm

Postby Stefko » Tue Apr 29, 2003 7:05 pm

Replace your original e-mail code w/ this one in the checkout.pl file
KFL Technologies
Web-Enabled Solutions
e-Commerence Solutions
Stefko
Contributor / Guru
 
Posts: 833
Joined: Wed Sep 18, 2002 1:11 am
Location: Wichita, KS

Postby lilac » Sun Sep 21, 2003 12:18 pm

Hi,
This is exactly what I have been looking for!!! But I am new to this and am having trouble finding exactly where in the checkout.pl file this code should go. My *.pl page is like a continuous block of text with symbols and black boxes, I can't find where the e-mail code starts and stops, and don't want to delete anything I ought not too! :?
Please could you give an idiots guide to exactly where this is supposed to be placed?
Thanks!
Lucie
lilac
 
Posts: 12
Joined: Fri Sep 19, 2003 2:04 pm

Postby Stefko » Sun Sep 21, 2003 12:43 pm

First, go to http://www.perlvision.com and download there "FREE" perl editor.

Now you can edit perl code without any problems.


HINT: Before saving your editted *.pl file, click EDIT in the tool bar, scrool down to CONVERT LINE ENDINGS, click and choose your type of server!!

Remember to always keep a working back-up in case you code somthing wrong, you'll be able to return to the same code before the changes were made!

Happy Coding!!
KFL Technologies
Web-Enabled Solutions
e-Commerence Solutions
Stefko
Contributor / Guru
 
Posts: 833
Joined: Wed Sep 18, 2002 1:11 am
Location: Wichita, KS

Postby lilac » Sun Sep 21, 2003 4:16 pm

Hey thanks Stefko,
I am downloading it as we speak and shall then continue my learning curve of perl!
Thanks for the advice, I hope you don't hear from me again!
Lucie
lilac
 
Posts: 12
Joined: Fri Sep 19, 2003 2:04 pm

Postby lilac » Sun Sep 21, 2003 5:00 pm

Hi me again!
Firstly I am amazed at the difference that perl code editor made to the script, I am actually halfway to understanding what it all means now! :D
I have put the code in on my checkout.pl page (a copy!) under the bit that said - # Send email order to you...
and obviously pointed the cart to the new page, but the emails are still coming out like this - (I didn't fill in the name etc as just testing layout)

Item no.1=
QUANTITY-1=2
PRICE-1=1.85
NAME-1=Cross Door Card
1=0.00
1=
Item no.2=
QUANTITY-2=1
PRICE-2=1.85
NAME-2=Celtic Knot Card
2=0.00
2=
SUBTOTAL=£5.55
TAX=£0.00
AMOUNT=£5.55
NAME=
ADDRESS=
Email address=
Payment method=Cheque
ANY COMMENTS=
/start

Where am I going wrong? :(
Thanks for your time on this! We all live and learn eh!?!
Lucie
lilac
 
Posts: 12
Joined: Fri Sep 19, 2003 2:04 pm

Postby John_p » Mon Sep 22, 2003 6:29 am

I just tried this mod and it worked well for me. Let's see if I can be of any help here. With Perl Code Editor find where it says (MAIN) in your checkout.pl and find this section:
This is about line 281 or near that depending on how much your pl has been modified. Highlight and cut this section.
Code: Select all
   print MAIL "Qty  Price(\$)   Product ID  - Product Name\n";
   print MAIL "===================================================================== \n";
   print MAIL "$QUANTITY_1    \$$PRICE_1    $ID_1 - $NAME_1   $ADDTLINFO_1  \n";
   if( $NAME_2 ) {print MAIL "$QUANTITY_2    \$$PRICE_2    $ID_2 - $NAME_2   $ADDTLINFO_2  \n";}
   if( $NAME_3 ) {print MAIL "$QUANTITY_3    \$$PRICE_3    $ID_3 - $NAME_3   $ADDTLINFO_3  \n";}
   if( $NAME_4 ) {print MAIL "$QUANTITY_4    \$$PRICE_4    $ID_4 - $NAME_4   $ADDTLINFO_4  \n";}
   if( $NAME_5 ) {print MAIL "$QUANTITY_5    \$$PRICE_5    $ID_5 - $NAME_5   $ADDTLINFO_5  \n";}
   if( $NAME_6 ) {print MAIL "$QUANTITY_6    \$$PRICE_6    $ID_6 - $NAME_6   $ADDTLINFO_6  \n";}
   if( $NAME_7 ) {print MAIL "$QUANTITY_7    \$$PRICE_7    $ID_7 - $NAME_7   $ADDTLINFO_7  \n";}
   if( $NAME_8 ) {print MAIL "$QUANTITY_8    \$$PRICE_8    $ID_8 - $NAME_8   $ADDTLINFO_8  \n";}
   if( $NAME_9 ) {print MAIL "$QUANTITY_9    \$$PRICE_9    $ID_9 - $NAME_9   $ADDTLINFO_9  \n";}
   if( $NAME_10 ){print MAIL "$QUANTITY_10    \$$PRICE_10    $ID_10 - $NAME_10   $ADDTLINFO_10 \n";}
   if( $NAME_11 ){print MAIL "$QUANTITY_11    \$$PRICE_11    $ID_11 - $NAME_11   $ADDTLINFO_11 \n";}
   if( $NAME_12 ){print MAIL "$QUANTITY_12    \$$PRICE_12    $ID_12 - $NAME_12   $ADDTLINFO_12 \n";}
   if( $NAME_13 ){print MAIL "$QUANTITY_13    \$$PRICE_13    $ID_13 - $NAME_13   $ADDTLINFO_13 \n";}
   print MAIL "===================================================================== \n";

Replace it with this:
Code: Select all
   print MAIL "===================================================================== \n";
   print MAIL "Qty: $QUANTITY_1   \nItem No: $ID_1   \nDescpition: $NAME_1   \nAddtl. Info: $ADDTLINFO_1   \nPrice:      \$$PRICE_1 ea.   \n\n";
   if( $NAME_2 ) {print MAIL " Qty: $QUANTITY_2   \nItem No: $ID_2   \nDescpition: $NAME_2   \nAddtl. Info: $ADDTLINFO_2      \nPrice: \$$PRICE_2 ea.   \n\n";}
   if( $NAME_3 ) {print MAIL " Qty: $QUANTITY_3   \nItem No: $ID_3   \nDescpition: $NAME_3   \nAddtl. Info: $ADDTLINFO_3      \nPrice: \$$PRICE_3 ea.   \n\n";}
   if( $NAME_4 ) {print MAIL " Qty: $QUANTITY_4   \nItem No: $ID_4   \nDescpition: $NAME_4   \nAddtl. Info: $ADDTLINFO_4      \nPrice: \$$PRICE_4 ea.   \n\n";}
   if( $NAME_5 ) {print MAIL " Qty: $QUANTITY_5   \nItem No: $ID_5   \nDescpition: $NAME_5   \nAddtl. Info: $ADDTLINFO_5      \nPrice: \$$PRICE_5 ea.   \n\n";}
   if( $NAME_6 ) {print MAIL " Qty: $QUANTITY_6   \nItem No: $ID_6   \nDescpition: $NAME_6   \nAddtl. Info: $ADDTLINFO_6      \nPrice: \$$PRICE_6 ea.   \n\n";}
   if( $NAME_7 ) {print MAIL " Qty: $QUANTITY_7   \nItem No: $ID_7   \nDescpition: $NAME_7   \nAddtl. Info: $ADDTLINFO_7      \nPrice: \$$PRICE_7 ea.   \n\n";}
   if( $NAME_8 ) {print MAIL " Qty: $QUANTITY_8   \nItem No: $ID_8   \nDescpition: $NAME_8   \nAddtl. Info: $ADDTLINFO_8      \nPrice: \$$PRICE_8 ea.   \n\n";}
   if( $NAME_9 ) {print MAIL " Qty: $QUANTITY_9   \nItem No: $ID_9   \nDescpition: $NAME_9   \nAddtl. Info: $ADDTLINFO_9      \nPrice: \$$PRICE_9 ea.   \n\n";}
   if( $NAME_10 ) {print MAIL " Qty: $QUANTITY_10   \nItem No: $ID_10   \nDescpition: $NAME_10   \nAddtl. Info:    $ADDTLINFO_10   \nPrice: \$$PRICE_10 ea.   \n\n";}
   if( $NAME_11 ) {print MAIL " Qty: $QUANTITY_11   \nItem No: $ID_11   \nDescpition: $NAME_11   \nAddtl. Info:    $ADDTLINFO_11   \nPrice: \$$PRICE_11 ea.   \n\n";}
   if( $NAME_12 ) {print MAIL " Qty: $QUANTITY_12   \nItem No: $ID_12   \nDescpition: $NAME_12   \nAddtl. Info:    $ADDTLINFO_12   \nPrice: \$$PRICE_12 ea.   \n\n";}
   if( $NAME_13 ) {print MAIL " Qty: $QUANTITY_13   \nItem No: $ID_13   \nDescpition: $NAME_13   \nAddtl. Info:    $ADDTLINFO_13   \nPrice: \$$PRICE_13 ea.   \n\n";}
   print MAIL "===================================================================== \n";


Now go to about line 534 and do the same.

I did the mod and my mail looks like this:

=====================================================================
Qty: 2
Item No: phma87
Descpition: Test-1
Addtl. Info:
Price: $3.00 ea.

Qty: 4
Item No: phno87
Descpition: Test-2
Addtl. Info:
Price: $3.00 ea.

Qty: 1
Item No: phde87
Descpition: Test-3
Addtl. Info:
Price: $3.00 ea.

=====================================================================
SUBTOTAL: $21.00

SHIPPING: $3.95
TOTAL: $24.95

I'm still doing a bit of tweeking but I can live with it as is.

I hope this gives you what you need.
John_p
 
Posts: 5
Joined: Sun Sep 14, 2003 7:50 am

Postby lilac » Mon Sep 22, 2003 1:41 pm

Thanks for all your help folks. I am still battling to get the format more presentable, but not having much luck at the moment :(
I now have to work out why my thank you page won't show up after the order has been sent :? If it's not one thing it's another in this life!
lilac
 
Posts: 12
Joined: Fri Sep 19, 2003 2:04 pm

php version?

Postby Kendra » Fri Jan 19, 2007 5:37 pm

I am using the php and am just wondering if there is a similar code.

Thanks
Kendra
WebMaster
 
Posts: 25
Joined: Tue Jan 09, 2007 2:31 pm

Re: E-mail Mod

Postby nescaf3 » Fri Feb 05, 2010 2:42 pm

how to change the $ into RM?

i got exatly what i want in my mail

Ship To: --------
Use Billing Address
=====================================================================
Qty: 2
Item No: HAMMER-HS
Descpition: ZOWIEGEAR HAMMER HEADSET
Addtl. Info:
Price: $299.00 ea.
=====================================================================
SUBTOTAL: RM598.00
TOTAL: RM612.00
FREIGHT: RM14.00
Comments:


how to change Price: $299.00 ea. into RM?
nescaf3
WebMaster
 
Posts: 18
Joined: Tue Feb 02, 2010 9:38 am

Re: E-mail Mod

Postby Koibito » Fri Feb 05, 2010 5:36 pm

nescaf3 wrote:how to change the $ into RM?


You'll have to replace every occurence of \$ by RM.
John
Koibito
Site Admin / Guru
 
Posts: 918
Joined: Sun May 28, 2006 1:59 am
Location: New Jersey, USA

Re: E-mail Mod

Postby nescaf3 » Sat Feb 06, 2010 3:41 am

thanks problem solve
nescaf3
WebMaster
 
Posts: 18
Joined: Tue Feb 02, 2010 9:38 am


Return to Modifications

Who is online

Users browsing this forum: No registered users and 0 guests

cron