Page 1 of 5 123 ... LastLast
Results 1 to 10 of 42
  1. #1
    Join Date
    Jul 2006
    Posts
    71
    Plugin Contributions
    0

    Default Quotes have issues affecting my product images [NOTE: magic_quotes_sybase issue]

    I'm using the latest version.

    It seems that if the product name has a single quote in it, the image will not display. Is this normal? How can I fix this?

  2. #2
    Join Date
    Dec 2004
    Location
    New York, USA
    Posts
    1,198
    Plugin Contributions
    0

    Default Re: Quotes have issues

    Try putting a escape backslash \ in front of each single quote. PHP is getting confused with the single quotes and so for your text they need to handled with some extra care.

    more info :: PHP Manual - Strings

    edit:
    FAQ :: reference
    Last edited by lib99; 6 Jun 2007 at 03:37 PM. Reason: additional link reference

  3. #3
    Join Date
    Jul 2006
    Posts
    71
    Plugin Contributions
    0

    Default Re: Quotes have issues

    Okay, I tried that and got this error:
    Code:
    1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's Poem Und. Plexi Glass', products_description = '12" X 15" Simulated Walnut Pla' at line 1
    in:
    [update zen_products_description set products_name = '12" X 15" Sim. Wal. Plq. Chief\''s Poem Und. Plexi Glass', products_description = '12" X 15" Simulated Walnut Plaque, Chief''s Poem Under Plexi Glass With 5 Trumpet Hat Badge.', products_url = '' where products_id = '3739' and language_id = '1']
    If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
    I had changed 12" X 15" Sim. Wal. Plq. Chief's Poem Und. Plexi Glass to 12" X 15" Sim. Wal. Plq. Chief\'s Poem Und. Plexi Glass

  4. #4
    Join Date
    Dec 2004
    Location
    New York, USA
    Posts
    1,198
    Plugin Contributions
    0

    Default Re: Quotes have issues

    Sorry, my initial reply pertained more toward language defines and such. How are you entering this product's data? Is it via the ZC Categories/Products admin, or are you trying to import data with an add-on or other non-Zen-Cart tool?

    afaik, ZC properly sanitizes the inputed data upon submission to avoid such issues. I've checked with a clean installation of ZC 1.3.7, and using single or double quotes randomly within the Product Name and/or Product Description does not demonstrate the issue you are experiencing.

  5. #5
    Join Date
    Jul 2006
    Posts
    71
    Plugin Contributions
    0

    Default Re: Quotes have issues

    Here is the product that has the issue:
    http://aaau.com/cart/index.php?main_...oducts_id=3739

    I am entering it normally, via the admin section.

    If I simply delete the quote, the page is fixed and the image shows up.

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

    Default Re: Quotes have issues

    If you disable javascript in your browser, does it work properly ?
    What addons and customizations have been done to your shop?
    .

    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.

  7. #7
    Join Date
    Jul 2006
    Posts
    71
    Plugin Contributions
    0

    Default Re: Quotes have issues

    Yes, it works fine if Javascript is disabled.

    I should mention most other product images work fine.

    I believe the only changes have been changes to the template.
    Last edited by HDG; 6 Jun 2007 at 07:44 PM.

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

    Default Re: Quotes have issues affecting my product images

    Please post the contents of your /includes/templates/YOURTEMPLATE/templates/tpl_modules_main_product_image.php file.
    .

    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.

  9. #9
    Join Date
    Jul 2006
    Posts
    71
    Plugin Contributions
    0

    Default Re: Quotes have issues affecting my product images

    Code:
    <?php
    /**
     * Module Template
     *
     * @package templateSystem
     * @copyright Copyright 2003-2005 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: tpl_modules_main_product_image.php 3208 2006-03-19 16:48:57Z birdbrain $
     */
    ?>
    <?php require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_MAIN_PRODUCT_IMAGE)); ?>
    <div id="productMainImage" class="centeredContent back">
    <script language="javascript" type="text/javascript"><!--
    document.write('<?php echo '<a href="javascript:popupWindow(\\\'' . zen_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $_GET['products_id$
    //--></script>
    <noscript>
    <?php
      echo '<a href="' . zen_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $_GET['products_id']) . '" target="_blank">' . zen_image($product$
    ?>
    </noscript>
    </div>

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

    Default Re: Quotes have issues affecting my product images

    It appears that your file is corrupt.
    Please re-upload that file from your original Zen Cart zip.

    Be sure to replace the template_default one with the one from the zip, and if you have the same file in various template override folders, be sure to either replace them with the master or merge your customizations with the master before uploading and replacing the one in your overrides folders.
    .

    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.

 

 
Page 1 of 5 123 ... LastLast

Similar Threads

  1. v139h Price by Attribute issue affecting all products when one attribute is out of stock.
    By NCRS 1962 in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 11 Dec 2012, 02:11 AM
  2. Issue with resizing window affecting layout
    By tabitha in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 18 Nov 2009, 08:00 PM
  3. Replies: 1
    Last Post: 11 Jun 2007, 07:13 PM
  4. Credit Note issue page?
    By Stevis2002 in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 27 May 2006, 09:43 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