Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2011
    Posts
    52
    Plugin Contributions
    0

    Default Text Editor CKEditor turns 'Button' option into add to cart????

    Hi,

    I have a basic code using a form and button format.

    <form action="http://www.EXAMPLE.com/" method="get" target="_blank">
    <p>
    <input name="key" type="hidden" value="KEY GOES HERE" /><input name="product" type="hidden" value="PRODUCT CODE GOES HERE" /></p>
    <p>
    <font face="Arial" size="2">Forename:<br />
    <input name="forename" /><br />
    <br />
    Surname:<br />
    <input name="surname" /><br />
    <br />
    Number:<br />
    <input name="number" /><br />
    <br />
    <input name="preview" type="submit" value="PREVIEW" /></font></p>
    </form>

    This basically generates two text fields and a 'PREVIEW' button.

    When I use this code in my product descriptions, everything is fab, until you click the PREVIEW button and it takes you to the shopping cart? Once clicked the PREVIEW button is 'supposed' to apply a new window which generates a preview image of the customers personalisation.

    I can get the whole thing to work on the home page, ezpages, define pages 2 3 4 etc.... but not the product pages, which is where I need this to be and it works fantastic.

    Is there any way to sort the button option to only generate the URL that is specified in the code rather than jumping to the shopping cart?

    Many thanks in advance.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Text Editor CKEditor turns 'Button' option into add to cart????

    This has nothing to do with CKEditor, or any editor, for that matter. It's what you're doing that's wrong.

    On a product page, the product description sits inside an existing <form>. So, since forms cannot be nested, the submit button you're adding actually submits the first form on the page.

    I'm not sure how what you're doing makes sense, but I'm sure you've got your reasons. If you need to insert your own forms to completely kill the normal functionality of the Zen Cart Shopping Cart, re-arrange the HTML in your custom template to either push your product description elsewhere on the page, or remove the proper default form entirely. If you're going to do that, it sounds like you really ought to be using a completely different product type. Seems a bit pointless to be inserting forms into product descriptions.
    .

    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.

  3. #3
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,263
    Plugin Contributions
    3

    Default Re: Text Editor CKEditor turns 'Button' option into add to cart????

    As with DrByte, I too fail to see the logic of what you are trying to do, but it seems as if it might have something to do with capturing bits of data from the customer, relative to the product they are viewing.

    Have you looked at using ATTRIBUTES - particularly text input attributes?
    20 years a Zencart User

  4. #4
    Join Date
    Mar 2011
    Posts
    52
    Plugin Contributions
    0

    Default Re: Text Editor CKEditor turns 'Button' option into add to cart????

    Hi,

    I already use text attributes to collect the customers personalisation on their orders.

    What I am trying to do is create a form on the product page, which the customer then enters their personalisation details and clicks a PREVIEW button which will generate a new page with an image of the product they are viewing, with their personalisation featured on the product.

    Is this not something that can be done within the Zen Cart product pages?

    Many thanks.

  5. #5
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Text Editor CKEditor turns 'Button' option into add to cart????

    The way the Zen Cart product pages are built by default, the purpose of the form on the page is to be used to add-to-cart.

    If you're wanting to make the page do something else for your unique needs, you're certainly welcome to. That would mean you'll need to move the entire add-to-cart architecture to another stage in the process, probably into your preview screen or whatever.
    It would probably be best to build a new product type for that, so that your other products aren't forced into that alternate flow if they don't need it.
    .

    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.

 

 

Similar Threads

  1. v151 Add To Cart displaying alt text instead of add to cart button
    By AquaticAddiction in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 8 Feb 2014, 07:58 PM
  2. Replies: 2
    Last Post: 19 Nov 2013, 07:01 PM
  3. v139h ckeditor plugin--text size question-source button
    By DarkAngel in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 11 Jun 2013, 08:22 PM
  4. Add To Cart Button pushed into left column
    By mezloh in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 27 Jun 2008, 03:49 AM
  5. Add to Cart Button pushing into left column
    By mezloh in forum General Questions
    Replies: 3
    Last Post: 26 Jun 2008, 06:48 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR