If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / Dreamweaver ruined my files!! Please Help

Dreamweaver ruined my files!! Please Help

Locked

Started by rastabloke on 30 Jul 2009, 5:59 PM · Views: 1,632

Results 1 to 13 of 13
This thread is locked. New replies are disabled.
30 Jul 2009, 5:59 PM
#1
rastabloke avatar

rastabloke

New Zenner

Join Date:
Dec 2008
Posts:
45
Plugin Contributions:
0

Dreamweaver ruined my files!! Please Help

AAARRRGGGG:censored::censored:

Adobe has a BIG problem... ME

I use dreamweaver as an editor. I just downloaded the shopping_cart.php file, made one simple change to it, then put it back on the server. Then everything went blank.

It seems that, by default, dreamweaver inserts all sorts of white space when opening a php doc... it inserts a blank line after every line!!

Is the shopping_cart.php file something I can just copy from another cart? Or do I have to start over:lamo:

30 Jul 2009, 6:40 PM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Dreamweaver ruined my files!! Please Help

Just download the Zencart zip file, unzip it on your local computer, and upload that file to your site.

As you've learned, always use a text editor to edit PHP files.

30 Jul 2009, 6:40 PM
#3
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: Dreamweaver ruined my files!! Please Help

I'm assuming you made changes to includes/languages/english/shopping_cart.php. Did you save the edited version to includes/languages/english/YOUR_TEMPLATE/shopping_cart.php?

If you did, you can copy the original (includes/languages/english/shopping_cart.php) back into your custom folder (includes/languages/english/YOUR_TEMPLATE) and start over. If not, you'll have to get another copy of Zen Cart (or at least the shopping_cart.php file) and start again.

Alternately, you can open shopping_cart.php with a good text editor like Crimson Editor or Notepad++ and remove the additional white space. Both are available free on the net.

ALWAYS use a good text editor with php files.

Anywhere you see a /classic/ folder, you can create a folder for your custom template. Doing so will allow you to start over if you make a mistake AND your changes will be protected during an update/upgrade.

Mary Ellen
I came; I saw; I Zenned
Taking over the world... one website at a time
Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

Holzheimer
Fan Odyssey

30 Jul 2009, 6:50 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: Dreamweaver ruined my files!! Please Help

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

30 Jul 2009, 6:55 PM
#5
rastabloke avatar

rastabloke

New Zenner

Join Date:
Dec 2008
Posts:
45
Plugin Contributions:
0

Re: Dreamweaver ruined my files!! Please Help

The edits were to the includes/classes/shopping_cart.php file. I did an undo on the edit that I made... but that did not remove all of the blank lines that were put in by DW.

I also tried copying the same file from another cart, and replacing the broken one.. didn't seem to work.

I'm nearly in tears!!

I can't believe DW does that!

30 Jul 2009, 6:58 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: Dreamweaver ruined my files!! Please Help

It's probably gotten confused about line-endings, and it might be possible to change a setting in DW's FTP configuration to get around that problem. But the problem might really have been with whatever tool was used to upload the files to the server in the first place ... maybe the original upload was damaged, and DW is merely getting confused by whatever damage it's encountering. You might want to check whether the files on the server are already "double-spaced" somehow.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

30 Jul 2009, 7:03 PM
#7
rastabloke avatar

rastabloke

New Zenner

Join Date:
Dec 2008
Posts:
45
Plugin Contributions:
0

Re: Dreamweaver ruined my files!! Please Help

The cart was installed by fantastico.. and it worked until this point.

All I really need to know is:

Is the includes/classes/shopping_cart.php file one that is the same throughout all zen carts.. or did it get changed as I customized the cart?

30 Jul 2009, 7:14 PM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: Dreamweaver ruined my files!! Please Help

/includes/classes/shopping_cart.php is a core program file, and is generally the same for all Zen Cart sites which share the same version number.

I'm not sure what you were editing or why, but in most cases you probably shouldn't have been editing that file in the first place. Most often one would be editing /includes/**languages/english/**shopping_cart.php if they wanted to change the text that shows up on the shopping cart page.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

30 Jul 2009, 7:20 PM
#9
rastabloke avatar

rastabloke

New Zenner

Join Date:
Dec 2008
Posts:
45
Plugin Contributions:
0

Re: Dreamweaver ruined my files!! Please Help

Thanks for the good news:clap:

My discounts are not adding up right.. I was advised to put a small amount of code in that file.

30 Jul 2009, 7:25 PM
#10
rastabloke avatar

rastabloke

New Zenner

Join Date:
Dec 2008
Posts:
45
Plugin Contributions:
0

Re: Dreamweaver ruined my files!! Please Help

Now its saying:

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/adtraffi/public_html/shop/includes/classes/shopping_cart.php:3787) in /home/adtraffi/public_html/shop/includes/functions/sessions.php on line 108

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/adtraffi/public_html/shop/includes/classes/shopping_cart.php:3787) in /home/adtraffi/public_html/shop/includes/functions/sessions.php on line 108

Warning: Cannot modify header information - headers already sent by (output started at /home/adtraffi/public_html/shop/includes/classes/shopping_cart.php:3787) in /home/adtraffi/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/adtraffi/public_html/shop/includes/classes/shopping_cart.php:3787) in /home/adtraffi/public_html/shop/admin/includes/functions/general.php on line 21

The domain is adtrafficbiz.com

Can anyone save my hyde?:blush:

30 Jul 2009, 7:34 PM
#11
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: Dreamweaver ruined my files!! Please Help

Looking up the "headers already sent" error message in the FAQ area reveals this article: https://www.zen-cart.com/tutorials/index.php?article=87

You've got extra blank lines at the bottom of your shopping_cart.php file, namely on line 3787.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

30 Jul 2009, 7:52 PM
#12
rastabloke avatar

rastabloke

New Zenner

Join Date:
Dec 2008
Posts:
45
Plugin Contributions:
0

Re: Dreamweaver ruined my files!! Please Help

YAY!!:clap::clap::bigups:

The file I was trying to copy over was from another version... I got it to work

Thank you all very much:laugh:

30 Jul 2009, 8:01 PM
#13
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: Dreamweaver ruined my files!! Please Help

Rastabloke:

The file I was trying to copy over was from another version...
Oh. Ya, must use same version ... mixing versions of files is a bad idea.

Glad you got it figured out.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.