Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Dreamweaver CS5 (Mac) and Paypal button code changes on copy/paste

Community Beginner ,
Sep 08, 2017 Sep 08, 2017

Copy link to clipboard

Copied

For a long time I have had an issue where I would change my website around a bit (retail site with hundreds of PayPal add to cart buttons) and they would not work after moving them with a copy/paste.

Tonight I decided to see if I could find out why and I see why they don't work, I just have no idea why it's changing the code or how to handle it properly to prevent the issue.

Here is an example of a working button:

  <form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">

          <input type="hidden" name="cmd" value="_cart" />

          <input type="hidden" name="business" value="tmorris9@pacbell.net" />

          <input type="hidden" name="item_name" value="Micro-Mesh sanding pad assortment" />

          <input type="hidden" name="return" value="http://epoxyjewelry.com/confirm.html" />

          <input type="hidden" name="cancel_return" value="http://epoxyjewelry.com" />

          <input type="hidden" name="amount" value="9.55" />

          <input type="hidden" name="currency_code" value="USD" />

          <input type="hidden" name="lc" value="US" />

          <input type="image" src="https://www.paypal.com/images/x-click-but22.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!" />

          <input type="hidden" name="add" value="1" />

        </form>

And here is the same button after a copy and paste to a new location on page (also happens with a cut and paste):

     <form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">

          <input type="hidden" name="cmd2" value="_cart" />

          <input type="hidden" name="business2" value="tmorris9@pacbell.net" />

          <input type="hidden" name="item_name2" value="Micro-Mesh sanding pad assortment" />

          <input type="hidden" name="return2" value="http://epoxyjewelry.com/confirm.html" />

          <input type="hidden" name="cancel_return2" value="http://epoxyjewelry.com" />

          <input type="hidden" name="amount2" value="9.55" />

          <input type="hidden" name="currency_code2" value="USD" />

          <input type="hidden" name="lc2" value="US" />

          <input type="image" src="https://www.paypal.com/images/x-click-but22.gif" border="0" name="submit2" alt="Make payments with PayPal - it's fast, free and secure!" />

          <input type="hidden" name="add2" value="1" />

        </form>

You can see the #2 has been added to lots of the commands and this makes the button not work.

cmd becomes cmd2

business becomes business2

It reminds me of downloading something a few times they rename as in program, program1, program2 so I am assuming it's something to do with it being a "copy" but I need it to NOT do this or find some other method to prevent it. Sometimes I change lots of items on a page and rearrange them then for weeks I get no orders for a particular product until a customer tells me the button won't work.

Any ideas?

Views

463
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Sep 08, 2017 Sep 08, 2017

I cant replicate that using CS4.

Are you just copying and pasting while in code view?????

Right I see what you are doing you are copying and pasting in design view which indeed does add the additional code.

I would switch to code view and paste the code.

I guess DW is working its magic in deisgn view because in normal circumstances you would not want form fields to have the same name. Its a bit over zealous as it should know that they are in different <form></form> tags

Edited:

You could just keep a c

...

Votes

Translate
LEGEND ,
Sep 08, 2017 Sep 08, 2017

Copy link to clipboard

Copied

I cant replicate that using CS4.

Are you just copying and pasting while in code view?????

Right I see what you are doing you are copying and pasting in design view which indeed does add the additional code.

I would switch to code view and paste the code.

I guess DW is working its magic in deisgn view because in normal circumstances you would not want form fields to have the same name. Its a bit over zealous as it should know that they are in different <form></form> tags

Edited:

You could just keep a code snippet of the Paypal form code in your DW snippets panel. Then when you want to insert a Paypal button just insert your cursor on the page where you want it to appear whilst in design view, then switch to code view and then click on your snippet in the snippets panel, then swich back to design view to update the prices etc if  youre not comfortable in code view....

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 10, 2017 Sep 10, 2017

Copy link to clipboard

Copied

LATEST

Thanks, I hadn't thought about it but yes I am doing it in design since I normally move the whole product (with photos and description) all as one but I can do that in code view.

Code snippet might not be the best for me since the code for each product is different and there are about 400 different ones I use so it would just be a pain to find the right one.

I remember way back one of Adobe's HTML programs (Pagemill?? Pagemaker??) had a <no_edit> </no_edit> bracket that forced the program to keep it's grubby mitts off the code inside. Ahh the good ol' days..

Thanks!

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines