Results 1 to 9 of 9
  1. #1
    Join Date
    Nov 2012
    Posts
    4
    Plugin Contributions
    0

    Default Broken image and attributes issues

    Hi, this is my first time using Zen Cart, and I'm having 2 problems:

    1. I'm trying to load pictures of the product for my client, and no matter what graphic type or size, the image is always broken, and never shows up. I changed permissions to 777, but that didn't seem to do anything.

    2. My client sells herbs online, and I need to have different sizes and weights for the herbs. How do I do this?

    Thank you!

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Broken image and attributes issues

    I'm trying to load pictures of the product for my client, and no matter what graphic type or size, the image is always broken, and never shows up.
    If account uses cpanel - check that hotlinking is not enabled

    My client sells herbs online, and I need to have different sizes and weights for the herbs. How do I do this?
    If I understand your question - this is done by adding attributes to these products

    http://www.zen-cart.com/content.php?...to-my-products
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Nov 2012
    Posts
    4
    Plugin Contributions
    0

    Default Re: Broken image and attributes issues

    Quote Originally Posted by kobra View Post
    If account uses cpanel - check that hotlinking is not enabled
    I disabled hotlinking, but it's still not working, switching it to a GIF doesn't work either. I enter the path as images/imagename.jpg, do I need to add more so it finds the right image?

    Quote Originally Posted by kobra View Post
    If I understand your question - this is done by adding attributes to these products

    http://www.zen-cart.com/content.php?...to-my-products
    This helped a lot, thank you!

    Also, how do

  4. #4
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Broken image and attributes issues

    I enter the path as images/imagename.jpg
    Where are you entering this??
    Zen-Venom Get Bitten

  5. #5
    Join Date
    Nov 2012
    Posts
    4
    Plugin Contributions
    0

    Default Re: Broken image and attributes issues

    Or, select an existing image file from server, filename: ##########__

    It's at the bottom of the product page. Also I'm using this with Dreamhost, if that helps.

  6. #6
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Broken image and attributes issues

    Or, select an existing image file from server, filename: ##########__
    Insure that the filename is correct - spelling, caps, spaces if you have them

    If you are sure but still no joy - try uploading from your PC using the "browse" function

    If still no joy, post the contents of your configure.php file
    Zen-Venom Get Bitten

  7. #7
    Join Date
    Nov 2012
    Posts
    4
    Plugin Contributions
    0

    Default Re: Broken image and attributes issues

    Quote Originally Posted by kobra View Post
    Insure that the filename is correct - spelling, caps, spaces if you have them

    If you are sure but still no joy - try uploading from your PC using the "browse" function

    If still no joy, post the contents of your configure.php file
    So since none of that worked, here's my configure.php file:

    <?php
    /**
    * @package admin
    * @copyright Copyright 2003-2012 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 GIT: $Id: Author: Ian Wilson Thu Aug 16 12:36:12 2012 +0100 Modified in v1.5.1 $
    */


    require('includes/application_top.php');

    $action = (isset($_GET['action']) ? $_GET['action'] : '');

    if (zen_not_null($action)) {
    switch ($action) {
    case 'save':
    // demo active test
    if (zen_admin_demo()) {
    $_GET['action']= '';
    $messageStack->add_session(ERROR_ADMIN_DEMO, 'caution');
    zen_redirect(zen_href_link(FILENAME_CONFIGURATION, 'gID=' . $_GET['gID'] . '&cID=' . $cID));
    }
    $configuration_value = zen_db_prepare_input($_POST['configuration_value']);
    $cID = zen_db_prepare_input($_GET['cID']);

    $db->Execute("update " . TABLE_CONFIGURATION . "
    set configuration_value = '" . zen_db_input($configuration_value) . "',
    last_modified = now() where configuration_id = '" . (int)$cID . "'");
    $configuration_query = 'select configuration_key as cfgkey, configuration_value as cfgvalue
    from ' . TABLE_CONFIGURATION;

    $configuration = $db->Execute($configuration_query);

    // set the WARN_BEFORE_DOWN_FOR_MAINTENANCE to false if DOWN_FOR_MAINTENANCE = true
    if ( (WARN_BEFORE_DOWN_FOR_MAINTENANCE == 'true') && (DOWN_FOR_MAINTENANCE == 'true') ) {
    $db->Execute("update " . TABLE_CONFIGURATION . "
    set configuration_value = 'false', last_modified = '" . NOW . "'
    where configuration_key = 'WARN_BEFORE_DOWN_FOR_MAINTENANCE'"); }

    $configuration_query = 'select configuration_key as cfgkey, configuration_value as cfgvalue
    from ' . TABLE_CONFIGURATION;

    $configuration = $db->Execute($configuration_query);

    zen_redirect(zen_href_link(FILENAME_CONFIGURATION, 'gID=' . $_GET['gID'] . '&cID=' . $cID));
    break;
    }
    }

    $gID = (isset($_GET['gID'])) ? $_GET['gID'] : 1;
    $_GET['gID'] = $gID;
    $cfg_group = $db->Execute("select configuration_group_title
    from " . TABLE_CONFIGURATION_GROUP . "
    where configuration_group_id = '" . (int)$gID . "'");

    if ($gID == 7) {
    $shipping_errors = '';
    if (zen_get_configuration_key_value('SHIPPING_ORIGIN_ZIP') == 'NONE' or zen_get_configuration_key_value('SHIPPING_ORIGIN_ZIP') == '') {
    $shipping_errors .= '<br />' . ERROR_SHIPPING_ORIGIN_ZIP;
    }
    if (zen_get_configuration_key_value('ORDER_WEIGHT_ZERO_STATUS') == '1' and !defined('MODULE_SHIPPING_FREESHIPPER_STATUS')) {
    $shipping_errors .= '<br />' . ERROR_ORDER_WEIGHT_ZERO_STATUS;
    }
    if (defined('MODULE_SHIPPING_USPS_STATUS') and (MODULE_SHIPPING_USPS_USERID=='NONE' or MODULE_SHIPPING_USPS_SERVER == 'test')) {
    $shipping_errors .= '<br />' . ERROR_USPS_STATUS;
    }
    if ($shipping_errors != '') {
    $messageStack->add(ERROR_SHIPPING_CONFIGURATION . $shipping_errors, 'caution');
    }
    }

    ?>
    <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html <?php echo HTML_PARAMS; ?>>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
    <title><?php echo TITLE; ?></title>
    <link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
    <link rel="stylesheet" type="text/css" href="includes/cssjsmenuhover.css" media="all" id="hoverJS">
    <script language="javascript" src="includes/menu.js"></script>
    <script language="javascript" src="includes/general.js"></script>
    <script type="text/javascript">
    <!--
    function init()
    {
    cssjsmenu('navbar');
    if (document.getElementById)
    {
    var kill = document.getElementById('hoverJS');
    kill.disabled = true;
    }
    }
    // -->
    </script>
    </head>
    <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onLoad="init()">
    <!-- header //-->
    <?php require(DIR_WS_INCLUDES . 'header.php'); ?>
    <!-- header_eof //-->

    <!-- body //-->
    <table border="0" width="100%" cellspacing="2" cellpadding="2">
    <tr>
    <!-- body_text //-->
    <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
    <tr>
    <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
    <tr>
    <td class="pageHeading"><?php echo $cfg_group->fields['configuration_group_title']; ?></td>
    <td class="pageHeading" align="right"><?php echo zen_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
    </tr>
    </table></td>
    </tr>
    <tr>
    <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
    <tr>
    <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
    <tr class="dataTableHeadingRow">
    <td class="dataTableHeadingContent" width="55%"><?php echo TABLE_HEADING_CONFIGURATION_TITLE; ?></td>
    <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CONFIGURATION_VALUE; ?></td>
    <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?>&nbsp;</td>
    </tr>
    <?php
    $configuration = $db->Execute("select configuration_id, configuration_title, configuration_value, configuration_key,
    use_function from " . TABLE_CONFIGURATION . "
    where configuration_group_id = '" . (int)$gID . "'
    order by sort_order");
    while (!$configuration->EOF) {
    if (zen_not_null($configuration->fields['use_function'])) {
    $use_function = $configuration->fields['use_function'];
    if (preg_match('/->/', $use_function)) {
    $class_method = explode('->', $use_function);
    if (!is_object(${$class_method[0]})) {
    include(DIR_WS_CLASSES . $class_method[0] . '.php');
    ${$class_method[0]} = new $class_method[0]();
    }
    $cfgValue = zen_call_function($class_method[1], $configuration->fields['configuration_value'], ${$class_method[0]});
    } else {
    $cfgValue = zen_call_function($use_function, $configuration->fields['configuration_value']);
    }
    } else {
    $cfgValue = $configuration->fields['configuration_value'];
    }

    if ((!isset($_GET['cID']) || (isset($_GET['cID']) && ($_GET['cID'] == $configuration->fields['configuration_id']))) && !isset($cInfo) && (substr($action, 0, 3) != 'new')) {
    $cfg_extra = $db->Execute("select configuration_key, configuration_description, date_added,
    last_modified, use_function, set_function
    from " . TABLE_CONFIGURATION . "
    where configuration_id = '" . (int)$configuration->fields['configuration_id'] . "'");
    $cInfo_array = array_merge($configuration->fields, $cfg_extra->fields);
    $cInfo = new objectInfo($cInfo_array);
    }

    if ( (isset($cInfo) && is_object($cInfo)) && ($configuration->fields['configuration_id'] == $cInfo->configuration_id) ) {
    echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . zen_href_link(FILENAME_CONFIGURATION, 'gID=' . $_GET['gID'] . '&cID=' . $cInfo->configuration_id . '&action=edit') . '\'">' . "\n";
    } else {
    echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . zen_href_link(FILENAME_CONFIGURATION, 'gID=' . $_GET['gID'] . '&cID=' . $configuration->fields['configuration_id'] . '&action=edit') . '\'">' . "\n";
    }
    ?>
    <td class="dataTableContent"><?php echo $configuration->fields['configuration_title']; ?></td>
    <td class="dataTableContent"><?php echo htmlspecialchars($cfgValue, ENT_COMPAT, CHARSET, TRUE); ?></td>
    <td class="dataTableContent" align="right"><?php if ( (isset($cInfo) && is_object($cInfo)) && ($configuration->fields['configuration_id'] == $cInfo->configuration_id) ) { echo zen_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . zen_href_link(FILENAME_CONFIGURATION, 'gID=' . $_GET['gID'] . '&cID=' . $configuration->fields['configuration_id']) . '" name="link_' . $configuration->fields['configuration_key'] . '">' . zen_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?>&nbsp;</td>
    </tr>
    <?php
    $configuration->MoveNext();
    }
    ?>
    </table></td>
    <?php
    $heading = array();
    $contents = array();

    switch ($action) {
    case 'edit':
    $heading[] = array('text' => '<b>' . $cInfo->configuration_title . '</b>');

    if ($cInfo->set_function) {
    eval('$value_field = ' . $cInfo->set_function . '"' . htmlspecialchars($cInfo->configuration_value, ENT_COMPAT, CHARSET, TRUE) . '");');
    } else {
    $value_field = zen_draw_input_field('configuration_value', htmlspecialchars($cInfo->configuration_value, ENT_COMPAT, CHARSET, TRUE), 'size="60"');
    }

    $contents = array('form' => zen_draw_form('configuration', FILENAME_CONFIGURATION, 'gID=' . $_GET['gID'] . '&cID=' . $cInfo->configuration_id . '&action=save'));
    if (ADMIN_CONFIGURATION_KEY_ON == 1) {
    $contents[] = array('text' => '<strong>Key: ' . $cInfo->configuration_key . '</strong><br />');
    }
    $contents[] = array('text' => TEXT_INFO_EDIT_INTRO);
    $contents[] = array('text' => '<br><b>' . $cInfo->configuration_title . '</b><br>' . $cInfo->configuration_description . '<br>' . $value_field);
    $contents[] = array('align' => 'center', 'text' => '<br>' . zen_image_submit('button_update.gif', IMAGE_UPDATE, 'name="submit' . $cInfo->configuration_key . '"') . '&nbsp;<a href="' . zen_href_link(FILENAME_CONFIGURATION, 'gID=' . $_GET['gID'] . '&cID=' . $cInfo->configuration_id) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
    break;
    default:
    if (isset($cInfo) && is_object($cInfo)) {
    $heading[] = array('text' => '<b>' . $cInfo->configuration_title . '</b>');
    if (ADMIN_CONFIGURATION_KEY_ON == 1) {
    $contents[] = array('text' => '<strong>Key: ' . $cInfo->configuration_key . '</strong><br />');
    }

    $contents[] = array('align' => 'center', 'text' => '<a href="' . zen_href_link(FILENAME_CONFIGURATION, 'gID=' . $_GET['gID'] . '&cID=' . $cInfo->configuration_id . '&action=edit') . '">' . zen_image_button('button_edit.gif', IMAGE_EDIT) . '</a>');
    $contents[] = array('text' => '<br>' . $cInfo->configuration_description);
    $contents[] = array('text' => '<br>' . TEXT_INFO_DATE_ADDED . ' ' . zen_date_short($cInfo->date_added));
    if (zen_not_null($cInfo->last_modified)) $contents[] = array('text' => TEXT_INFO_LAST_MODIFIED . ' ' . zen_date_short($cInfo->last_modified));
    }
    break;
    }

    if ( (zen_not_null($heading)) && (zen_not_null($contents)) ) {
    echo ' <td width="25%" valign="top">' . "\n";

    $box = new box;
    echo $box->infoBox($heading, $contents);

    echo ' </td>' . "\n";
    }
    ?>
    </tr>
    </table></td>
    </tr>
    </table></td>
    <!-- body_text_eof //-->
    </tr>
    </table>
    <!-- body_eof //-->

    <!-- footer //-->
    <?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
    <!-- footer_eof //-->
    <br>
    </body>
    </html>
    <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

  8. #8
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Broken image and attributes issues

    That is not configure.php
    It looks more like index.php
    Zen-Venom Get Bitten

  9. #9
    Join Date
    Sep 2009
    Location
    Florida
    Posts
    2
    Plugin Contributions
    0

    Default Re: Broken image and attributes issues

    I had the same problem. I resolved it by uploading to a different folder. I used 'medium' from the pulldown. Not sure why this should change anything... The generated source looks fine either way and the permissions are both at '777'.... Anyway, it may be worth a try.
    Last edited by jazzplayermark; 2 Dec 2012 at 08:27 PM. Reason: found the fix

 

 

Similar Threads

  1. v153 Image Import and Sizing Issues
    By jokkah in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 1 Sep 2014, 02:01 AM
  2. broken image and want it removed
    By BABY-INFORMATION in forum Templates, Stylesheets, Page Layout
    Replies: 22
    Last Post: 29 Oct 2011, 09:00 AM
  3. Replies: 2
    Last Post: 12 Mar 2010, 09:09 PM
  4. Product Info Page - Aligning issues regarding Shopping Cart and Attributes.
    By Treasuresbycaz in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 5 Jul 2009, 01:56 PM
  5. Issues with product attributes and proper use
    By DagLindt in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 10 May 2009, 02:48 PM

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